47

I remember seeing someone use a shortcut in NetBeans to open a dialog similar to phpStrom that can open files based on class names or is it file name. whats that?

IAdapter
  • 62,595
  • 73
  • 179
  • 242
Jiew Meng
  • 84,767
  • 185
  • 495
  • 805

10 Answers10

82

Updated

I'm fairly certain you are referring to the "Quick File Chooser" plugin. As someone else points out, though, there are several other candidates. I list them below...

The Quick File Chooser Plugin:

By default CTRL-SHIFT-O opens the Open Project dialog, and once the plugin is installed, you will get the dialog pictured here automatically:

Quick File Chooser - Open Project Dialog

(The Quick File Chooser plugin replaces the default open project dialog with its own.)

When opening a file with the Quick File Chooser plugin, you see this:

Quick File Chooser - Open File Dialog

I did not find that the plugin was able to open based on a class name.

Quick File Chooser is available through the NetBeans Plugin Portal. You can also install it directly from within NetBeans versions 7.1 and 7.3 if you have the "Plugin Portal" Update Center configured. (See the bottom of this answer for instructions.)

NetBeans Core (no plugin)

By default CTRL-SHIFT-O opens the Open Project dialog, and without the QFC plugin, you will get the default dialog:

default Open Project dialog (Windows)

The default Open File dialog is this:

default Open File dialog (Windows)

The Open File dialog does not have a keyboard shortcut by default, but you can easily add it:

  • Click on Tools, then Options, then on the Keymap icon in the tool bar of the dialog.
  • In Search: type "Open Fi" and you should see "Open File..." in the Actions list.
  • Double click on the Shortcut box for that entry, and select an appropriate shortcut (either by pressing the key combination, or by selecting it from the drop-down).
  • Click OK.

The Go To... Dialogs:

The Go To... dialogs are provided by core NetBeans, and are available even if the QFC plugin is installed (the QFC plugin does not override them).

The Go To File dialog is ALT-SHIFT-O.

alt text

Go To Type: CTRL-O, appears to list classes, variables, and all sorts of stuff.

alt text

Go To Symbol: CTRL-ALT-SHIFT-O

alt text

For PHP projects, Go To Type and Go To Symbol appear to list the same set. As mentioned, all of these are available on the Navigate menu.

Installing Quick File Chooser from the Plugin Portal Update Center

In NetBeans:

  • Click on Tools, then Plugins
  • Go to the Settings tab
  • Ensure that the "Plugin Portal" is listed in Configuration of Update Centers and checked as Active. If it is not listed, click Add, give it an appropriate name, and the URL is http://plugins.netbeans.org/nbpluginportal/updates/7.3/catalog.xml.gz for versions 7.3.x. (In the URL replace the "7.3" with, e.g., "7.2" or "7.1" if you are using an older version of NetBeans.)
  • Click on the Available Plugins tab.
  • Click on Reload Catalog just to be sure you have the latest contents.
  • In Search: type "Quick". That should be enough to get it listed by itself (or at least on a short list).
  • Click on the check box under the Install column, and then click on the Install button down below.
RobertB
  • 4,592
  • 1
  • 30
  • 29
43

to open a file based on its name Alt+Shift+O.

Gunith D
  • 1,843
  • 1
  • 31
  • 36
faisalbhagat
  • 2,142
  • 24
  • 27
6

Hit Ctrl + O to search files based on their 'Class Name'.

Jasper
  • 2,166
  • 4
  • 30
  • 50
mehdi shahdoost
  • 1,469
  • 5
  • 17
  • 27
5

I think the simplest solution for this would be ALT+f+o

This will open the file open dialog box, now you can browse through the files and open which-ever file you want or if you have the complete path to that file just paste it in the text-field which says "File name:" and press Enter

rohan
  • 51
  • 1
  • 1
3

I use Ctrl + Shift + O to open this dialog for Java classes.
I don't know if this is also valid for PHP though.

If you just want to open some file based on its name, you can use Ctrl + Shift + L.

Edit: Both actions are available in the Navigate menu.

Jasper
  • 2,166
  • 4
  • 30
  • 50
1

This is old and pretty much answered, but you may also try this plugin - works for all up to 8.2:

Jeffz
  • 2,075
  • 5
  • 36
  • 51
  • Yup, that plugin does the job. – jcarballo Jun 07 '16 at 23:26
  • I realize this is a bit older, but I just found this plugin as well. Have you found a way to copy/paste into that dialog box? For some reason it won't let me do so – shenn Feb 03 '17 at 17:31
1

My shortcuts different from answers above (don't know why).

To me its Alt + Shift + L, Or Navigate->"Go to File".

To search by type its Alt + Shift + O or Navigate-> "Go to Type" (you can see the shortcut in front of it)

It did not require me to install any plugins BTW. Netbeans version: 8.2

PJ3
  • 3,870
  • 1
  • 30
  • 34
0

The best way to search and open file in netbeans:

Press ctrl + o and type file name you are looking for, it will search in current projects and list matching files thn you can select file and open.

  • It doesn't answer exactly the question because he wants to open any file but the shortcut you showed could be useful to open Java files – Lorenzo Lerate Mar 31 '17 at 18:42
0

Another way is to use open file fast plugin. it got two matching modes, smart (like in textmate) and exact.

salamas
  • 515
  • 6
  • 13
  • I realize this is a bit older, but I just found this plugin as well. Have you found a way to copy/paste into that dialog box? For some reason it won't let me do so – shenn Feb 03 '17 at 17:32
0

The best way to open the file without any plugins is to use Alt + Shift + O, then netbeans will offer all the available files with your given keywords.

I do also believe the answer from @faisalbhagat must be the accepted answer as @Thor mentioned above!

Stacker
  • 24
  • 3