I just started using Eclipse PHP.
I finally figured out how to turn on auto complete code assist.
My problem is that when I use require or include, those variables in those files aren't showing up.
Example,
code1.php
<? $test = 'hi'; ?>
code2.php
<? require('code1.php'); ?>
When I am editing code2.php, $test variable doesn't show up in auto complete (aka code assist)
In Eclipse 3.6 with PDT 2.2.1, I was able to solve this issue by going to:
Window->Preferences->PHP->Editor->CodeAssist
and then enabling "Show variables from other files", and clicking Apply.
This was the only way I could get the autocompletion to work for non-class-type variables defined in external files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With