An Oracle blog about NetBeans for PHP

Go to Declaration for class members - improved

I will try to explain this feature on an example. In an application there are a few classes that has Draw methods without a parameter.  The classes are Point, Triangle and Circle. In another php file there  is a varibale $shape, where the Draw method is used.

In the case when NetBeans are not able to find out the type of the $shape variable and you want to navigate to the Draw method declaration, then it looks for all Draw methods with the same signature that are available in all classes in the project.  In this example there are tree classes with Draw method without a parameter and all these classes are offered and you can select in which you want to jump. If there is only one class that has the Draw method, then it jumps to the Draw method declaration directly.

For navigation to the Draw method declaration you can place caret into Draw method name and press shortcut CTRL+B or you can use the hyperlink functionality (push CTRL and place mouse cursor over the Draw method name and click). You can also use main menu Navigate -> Go to Declaration or context menu in the editor.

Join the discussion

Comments ( 9 )
  • raymond Thursday, December 11, 2008

    Hi Petr,

    This is kind of off topic but I was looking for a way to link my php help file with netbeans so that I can have integrated help when I press F1 but could not find out how to do it.

    Is this possible with NetBeans 6.5? Or will it be added later?

  • Stefan Sturm Thursday, December 11, 2008


    the functions are still not part of the development builds :-(


    Stefan Sturm

  • Petr Thursday, December 11, 2008

    To raymond:

    Which exactly help do you want to add? The php manual?

    To Stefan: The functionality has to be there. There will be problem somewhere else. Could you try to start NetBeans from command line with --userdir parameter ( http://blogs.sun.com/netbeansphp/entry/userdir ). Let me know, whether it helps.



  • optik Friday, December 12, 2008

    Current Hudson devel builds are more unstable in a comparsion when you developed 6.5 line, IDE some times show only "Please Wait" box for completion and nothing more, sometimes (mostly when a phpdoc generation for method occurs - when I typed

    /\*\* ENTER) IDE totaly freezes. Maybe because you rewrite some core parts fo code completion, I don't know.

  • Petr Sunday, December 14, 2008

    Hi Optik,

    are you able to reproduce the problem. I mean, whether you know about a reproducible test case.



  • Tomas Friday, December 19, 2008

    This is great feature. This would be great also in Java development. Where i ctrl+click on method on interface which has several implementation. Netbeans would open this same dialog with all interface implementations.

  • Michael Blake Thursday, February 19, 2009

    It's slightly annoying where I have a subversion repository and netbeans keeps picking up .svn/filename.php files in the list.

    Could .svn and .CVS folders be ignored (without removing support for all .xxx folders as we use hidden folders to store a few classes).

  • next Saturday, June 27, 2009

    how to add php manual in context help (f1 key) ?


  • guest Friday, August 7, 2009


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.