An Oracle blog about NetBeans for PHP

Code Navigation Improvements

Guest Author

When you work on a project, you need to navigate around the source code frequently.  NetBeans  IDE provides many navigation features that are highly useful since 6.5 but there were additional improvements and fixes in 6.7 that are worth of mentioning.

Go to File (Alt+Shift-O)

Much faster now, type file name and you will be pleasantly surprised how fast it is, its the difference especially on huge projects.   

Go to Type (Ctrl-O)

Camel cases can be used now. You can try any of following patterns :

  • MyDatabaseResult
  • MDR

if you wish to find MyDatabaseResult class/interface.

Quick Search (Ctrl-I)

Quickly search for action or type is now easy.

Go to Symbol (Ctrl+Alt+Shift-O)

Powerful - finds  functions, methods, fields, constants, types. Just type its  plane name or camel case patterns.

Go to Test (Ctrl+Shift-T)

PHPUnit support was added to NetBeans. Use Go to Test action it if you need to switch between test and tested source file.

Go to Declaration (Ctrl-B)

Radically improved, fixed many problems, more reliable. One of its improvements described here Go to Declaration for class members

The paragraphs above highlits code navigation improvements in 6.7 that should be released very soon. Release Candidate 3 is now available for download.

Join the discussion

Comments ( 17 )
  • Pet Monday, June 22, 2009

    "Go to File (Ctrl+Shift-O) "

    You mean Alt+Shift-O ?

    Go to Type (Ctrl-O) - Buggy:

    Have FilmMan.class.php

    typing FILM - nothing found

    typing \*film - nothing found

    typing \*Film - found

    FiLm -- nothing found

  • radek Tuesday, June 23, 2009

    Hi Pet,

    thanks for commenting: I've updated blog entry. You are right that also \*film should probably be found - so thanks for finding a bug. On the other hand in queries: FILM and \*FiLm not found as expected (for \*FiLm should compound word look e.g.like FiLmMan).

  • Pet Tuesday, June 23, 2009

    "FILM and \*FiLm not found as expected"

    I don't catch it. It is case insensitive, so should be found

  • radek Tuesday, June 23, 2009

    there is no switch like now use: camel cases search, case insensitive search, wildcards search. Upper case letters in search string is such a switch, thus in \*FiLm 'F' and 'L' are expected to be first capitalized letters in elements forming the compound word, but if you believe it should work the other way - report it

  • Pet Tuesday, June 23, 2009

    It's ok, now I understand what camel case is. :)

    Improvement could be to prefer current file. I.e. If I search a function name, first hit should be from current file. Or even better, a flag to restrict searching only in current file. It currently to slow for big project if using \*partname as pattern. So searching a function in file would be quicker then, I suppose

  • alexey_baranov Tuesday, June 23, 2009

    Would we expect to navigate a hierarchical tree? jump up and down? transition to an parent's overloaded method? and visual hints near overloaded methods like in PDT2.0? And very well it would be quickly moved inside the bundle model-view-controller.

    I have more than 300 classes. A lack of support the OOP. I will wait very much.


  • Stephen Tuesday, June 23, 2009

    How about being able to edit a readonly file, its too tedious to change to Windows Explorer to change this value59

  • radek Tuesday, June 23, 2009

    to alexey_baranov:

    yes, everything you mention is in our plan for 6.8 though not top priority, but definitely these features I personally like very much and I would like to see them implemented

  • radek Tuesday, June 23, 2009

    to Stephen:

    can you explain what NetBeans could do for you. Read only files are just for reading, but probably I don't understand your request

  • Patrick Gotthardt Tuesday, June 23, 2009

    I really like ctrl+O, however, it would be a lot more useful to me if it had some support for Zend Framework/PEAR naming conventions.

    So while its cool that I can get to MyDatabaseResult just by typing "MDR" that is worth nothing to me because the class is named "My_Database_Result". This is one of the points where NetBeans could be worth so much to me, but isn't, just because it doesn't handle naming conventions.

    Is there any chance you could change that? (Or point me to where I can download the sources and maybe a faint idea of where to change it?)


  • Pet Tuesday, June 23, 2009

    I agree underscores should be ignored in any searching of files, types, etc.

  • radek Tuesday, June 23, 2009

    to Patrick:

    of course generally speaking you are right that we should support php conventions at first place, on the other hand I think that MDR query works fine for class My_Database_Result or it doesn't work for you?

  • Patrick Gotthardt Wednesday, June 24, 2009


    did you change that behaviour since RC2? Just tried in RC3 and indeed it does do something.

    However, it still doesn't do the "right" thing. Let's take the Zend Framework for an example.

    Say I'd like to go to the "Zend_Form" class. In an ideal world, I'd just type "ZF" and be there (that'd be the case if the class was named "ZendForm").

    Now the problem with the query "ZF" is that I just don't know where the Zend_Form class is. I got like 20-thousand results. Among those are "Zend_Auth_Adapter_Http_Resolver_File" and other classes that I never intended to look for.

    So it appears to me that a very fuzzy search is used to find the file (basicly: /Z.\*F.\*/).

    I'd like a more "java-like" behaviour on this one, where the "_" is treated as if it was just another lowercase letter, so "ZF" would find everything that matches /Z[a-z_]\*F.\*/ - that is: it should be case sensitive and not allow any uppercase letter between "Z" and "F" to appear.

    Hope that helps,

    - Patrick

  • radek Wednesday, June 24, 2009

    to Patrick:

    you know what you want and I admit it makes sense, so report it as enhancement, please.

  • deeper voice Saturday, August 29, 2009

    This is one of the points where NetBeans could be worth so much to me, but isn't, just because it doesn't handle naming conventions.

  • Malware Removal Bot Wednesday, September 2, 2009

    Sometimes you want indexing turned off for a folder because you know, there's nothing important (index-wise) in it, but still you need to be able to edit some of it's files.

  • java to php Monday, June 13, 2011
    when developping in java with Netbeans, I used Navigate goto source, then the arrow to go back. I do not have that in php Netbeans developpement why ? Can you add this ?
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.