PHPEclipse Questions

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

PHPEclipse Questions

Post by Luke »

I am new to PHPEclipse (and eclipse in general) and I am going to use this thread to ask questions I can't find answers for elsewhere... firstly... how do I get it do auto-complete custom functions/classes? I did this once when I first started using it, but that was like a month ago and I've already forgotten. What I mean is say I have a class like this...

Code: Select all

class foo{

    public function bar($fooey)
    {

        echo $fooey;

    }

    public function foofoo()
    {

        echo 'YAY!';

    }

}
If I include this class, and type $foo = new foo; and then below that I type $foo-> I'd like it to bring up bar() and foofoo()

Also... what is an "Include Path"... do these have to do with the auto-complete?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

... last I checked that was automatic. You just have to wait a second or two.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

hmm... not working. I remember it being automatic as well... last time I used the program, but it's not working now. Strange.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Did you save the file?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

yup

EDIT: Weird... it works fine on my machine at home... just at work it doesn't work. I'm gonna try reinstalling eclipse at work tomorrow... maybe that will fix it.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Another question... at work, eclipse shows me what the file will look like in a browser in a "view" I think it's called on the right... but the one here... on my laptop doesn't. How do I get that to show up? Is it a plugin?
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

I've never got the browser working, but the auto-complete is not always instant. Same for when you add php-doc comments to the code (using Zend PHPIDE) if it recognises it's a function, it will add the params and return @'s for you, but it can take ages to read it.
User avatar
Case-
Forum Newbie
Posts: 22
Joined: Fri Aug 04, 2006 5:52 am
Location: Finland

Post by Case- »

For the auto complete menu, try to hit Ctrl+Space.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Case- wrote:For the auto complete menu, try to hit Ctrl+Space.
That looks right, but it throws an exception when I try it on my linux system :(
User avatar
Case-
Forum Newbie
Posts: 22
Joined: Fri Aug 04, 2006 5:52 am
Location: Finland

Post by Case- »

d11wtq wrote:
Case- wrote:For the auto complete menu, try to hit Ctrl+Space.
That looks right, but it throws an exception when I try it on my linux system :(
You should try to uninstall Eclipse, does the java side work fine?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Case- wrote:
d11wtq wrote:
Case- wrote:For the auto complete menu, try to hit Ctrl+Space.
That looks right, but it throws an exception when I try it on my linux system :(
You should try to uninstall Eclipse, does the java side work fine?
Haven't written any Java in it yet. I was using Kate (purely as an editor) before. I'll have a play around. I think it's likely just the JRE on my work machine needs upgrading. I'll see what happens at home.

EDIT | Ok, at home it throws a java.lang.ClassCastException when I try the auto-complete with CTRL+SPC. It was a different exception at work. I bet if I upgrade my JRE it'll work fine. I'm not using Java5 although I thought it was only the "unstable" version which needed Java5.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Would you all be willing to help a brotha out? How did you all setup your Eclipse installs? I went to the Eclipse web site and the download is like 120MB. Is that right? Then I need to install a few other things in order to get PHPEclipse working? I just want to make sure I don't bork my system at work.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Considering there's no actual installation, it'd be hard to bork your machine. :P
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Cool. Commence the download!
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Yeah; because it's written in Java you can just run it right form what you download. You'll need to grab phpeclipse from sourceforge and copy the files from its "plugins" directory into the Eclipse plugins directory then close and re-open eclipse :)
Post Reply