views:

49

answers:

2

when i use netbeans and includes a class in a phpfile and then type $class_name-> it will show all functions and properties of that class.

how can i do that with eclipse?

+2  A: 

The CTRL+Space should work, but I would recommend a recent eclipse and PDT.

At the beginning of PDT, there used to be some completion issues like bug 167626, but they are fixed by now.
Do indicate to eclipse what Php you are using (4? 5? see this thread), and make sure your project is opened as a Php one (see this thread)

VonC
A: 

Code completion in PDT works when Eclipse can understand what is the target class. In some cases this can be derived from the code (e.g. when you have a variable which is assigned an instantiation of a class). In other cases, it is derived from PHPDoc comments which denote the type of vars and arguments, method return types, etc.

See this article for example.

In any event using $class_name-> makes no sense. You need to use a variable name and, in case the variable is recognized as a type, you will get the complete list of methods/field.

zvikico