Page 1 of 3
PHPEclipse Questions
Posted: Thu Nov 16, 2006 6:44 pm
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?
Posted: Thu Nov 16, 2006 7:19 pm
by feyd
... last I checked that was automatic. You just have to wait a second or two.
Posted: Thu Nov 16, 2006 7:48 pm
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.
Posted: Thu Nov 16, 2006 7:55 pm
by feyd
Did you save the file?
Posted: Thu Nov 16, 2006 8:08 pm
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.
Posted: Thu Nov 16, 2006 9:13 pm
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?
Posted: Fri Nov 17, 2006 2:52 am
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.
Posted: Fri Nov 17, 2006 3:06 am
by Case-
For the auto complete menu, try to hit Ctrl+Space.
Posted: Fri Nov 17, 2006 7:25 am
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

Posted: Fri Nov 17, 2006 8:54 am
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?
Posted: Fri Nov 17, 2006 10:45 am
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.
Posted: Fri Nov 17, 2006 11:53 am
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.
Posted: Fri Nov 17, 2006 12:12 pm
by feyd
Considering there's no actual installation, it'd be hard to bork your machine.

Posted: Fri Nov 17, 2006 12:45 pm
by RobertGonzalez
Cool. Commence the download!
Posted: Fri Nov 17, 2006 1:45 pm
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
