Netbeans Shortcut to Open File - netbeans

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?

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:
(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:
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:
The default Open File dialog is this:
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.
Go To Type: CTRL-O, appears to list classes, variables, and all sorts of stuff.
Go To Symbol: CTRL-ALT-SHIFT-O
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.

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

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

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

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.

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

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

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.

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

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!

Related

How to quickly find files or symbols in a project in visual studio code?

Here's a demonstration of the feature in IntelliJ (https://www.youtube.com/watch?v=EtnI2doW6XE)?
In case the video isn't viewable, basically the user presses a key-combo, and a dialog box pops up that will reactively response and filter based on the string the user starts to type in. It will show classes and files (and much more) matching what you've typed in. I won't go in to all the details, as I'm not looking for an exact match to this functionality -- I'd be happy if it just searched based on file name for starters! Anything to prevent me from having to browse for a filename in the project Explorer to open the file in vs code when I want to switch to the given file.
I saw How do I search for files in Visual Studio Code? - for me (on Linux) Ctrl-E just shows the file I currently have open under the project explorer (useful sometimes, but not what I'm looking for).
Cmd + P opens a search bar for files (doc),
Cmd + T opens a search bar for symbols (doc),
Are you just looking for CTRL-P That brings up a file list. Which is searchable. You can then tab down and right arrow opens up that file. Enter will open a split editor on the file.
Also, if you CTR-p and then type ? you will get a list of keys you can hit such as to "Go to Symbols" and much more in your file or workspace.
And look at CTRL-R it probably does exactly what you are looking for as far as files go.

How to open a resource at specified line in Eclipse (in one step)?

I am looking for a built-in feature or plugin for Eclipse to do the following:
Open Resource + Jump to Line (in one step)
Ideal would be to do this:
Open Resource (Ctrl+Shift+R)
Type: FileName:LineNumber (eg. test.html:50)
I know i can do it in 2 steps, but when copying "File:Line" from somewhere i need to paste it in "Open Resource", copy or memorize and delete the line-number, open the file and then invoke "Go to line" (Ctrl+L) and paste or type the line number and confirm. This is very complicated.
It would be great if the "Open resource" dialog could combine these steps.
Is there a built-in feature or plugin for Eclipse that can do this?
If not could anybody write such a plugin?
You can use eclipse's 'Open from clipboard' navigation option. In Mac, the keyboard shortcut is Command+Shift+V. To use this option copy the java file and line number as it appears in the stackframe and press Command+Shift+V. The file should open at the specified line.
You can change the keybinding in eclipse preferences
Read eclipse's documentation for navigation menu actions
Open from clipboard :
Open from clipboard Tries to open the matching Java element in the editor if the clipboard contains a single line. Otherwise it opens the contents in the Java Stack Trace Console. Examples:
java.lang.String
String
String#getBytes
String.getBytes
java.lang.String.getBytes(String)
String.java:123
at java.lang.String.matches(String.java:1550)
java.lang.String.valueOf(char) line: 1456
currentTimeMillis()
The Open Resource dialog does not have such feature. If you think this is a generally useful feature you should open an enhancement request
Writing an external plug-in that provides this feature would be hard as the Open Resource dialog isn't meant to be extended.
In the meanwhile you'd have to hit two more keys:
Ctrl+Shift+R test.html Return Ctrl+L 50 Return

"Quick Access" for all workspace files?

It seems that this handy "Quick Access" window does not show the items available via the project explorer. Instead it only allows navigation to items that already have opened editors.
I haven't found a way to configure this and am starting to suspect this is not yet implemented. But I would love to have a quick way to access workspace items without using the mouse, how do you do that?
Use Ctrl + Shift +R to quickly search and open a file of any types in the workspace
Use Ctrl + Shift +T to quickly search and open the source code of your java classes and the 3rd parties jar that your project uses.
I think what you want is the "Open Resource" command. Control/command-shift-R.

In Eclipse, is there a way to open a file by typing its path and name?

IDEs are wonderful for many things. But I dislike how they make me use a GUI for something I can do faster typing in a command line. For example, opening a known specific file. If I know the name of a file, from the command line I can just type the name of my editor and the filename. With tab-completion I can accomplish this very quickly in a reliable amount of time. No searching through output or moving my fingers off the keyboard.
Is there a way in Eclipse to open a known file simply by typing its path+filename? Maybe through a plugin?
The "Open Resource" shortcut (ctrl-shift-R) is almost it, but it only lets you type the name of the file, not the path. If you have several files of the same name in different directories, you must again hunt with the mouse for what you want.
Actually, if you are using Helios (Eclipse 3.6) you can use paths; for details, see "New features in Open Resource dialog" in that version's "New and Noteworthy" page.
Also, you can Tab to the list of results and use the arrows to pick the right one.
Well, there's the general File>Open option which is meant for opening arbitrary, but I don't know what that does if you point it to a file inside your workspace. This opens your normal platform open dialog which you might be more comfortable using quickly.
I think Open Resource is the closest you're going to get. You shouldn't have more than a couple of files with the same name, I would think, plus you can use wildcards to open files quickly. Also, remember that files you open more recently appear higher up the list of matches so you may find that the file you want is at/near the top of the list already.
In the "Open File" dialog, if you just start typing or paste from clipboard by Ctrl+V, the desired file will be selected.
The dialog before typing something:
The dialog after pasting the file location:
I'm using Neon.3 Release (4.6.3).

searching in eclipse

how can I search something in all files in a given folder in eclipse
also how can I search up, it's seems like only going down the document
sometimes I am working on single files, so there is no project defined. I know about the search in project feature
If you go to Search>Files... you'll have an advanced search dialogue where you amongst others can specify the scope to search in (all of the workspace, selected resources only etc.). Is this what you're looking for?
And also, if searching through a single file (+), you have the standard search dialogue where you can specify search direction to either forward or backward.
Search forward in file: Edit -> Incremental Find Next
Search backward in file: Edit -> Incremental Find Previous
Search in multiple files: Search -> File -> Containing Text.
Search files in a specific subdirectory: Select the sub-directory -> Search -> File -> Scope: Selected resources.
I reccomend that you learn the short-cuts for these tasks. (Key-combination is found right beside the menu-item.)
When you are searching "Java Resources" with "File Search" with "Selected resources" checkbox checked - you will not get any results.
To search recursively a chosen folder for any files:
Select folder (it has to be folder)
Select FileSearch with "Selected resources" checked.
Good luck
Use the Remote Search Feature. Here you can browse for local folders. Some stupid name...
If default eclipse search is not sufficient for your needs, eclipse instasearch plugin is a very useful plugin for search needs inside eclipse.
It is based on lucene. This is also available in eclipse marketplace.
It has extensive feature set.
Instantly shows search results
Shows a preview using relevant lines
Periodically updates the index
Matches partial words (e.g. case in CamelCase)
Opens and highlights matches in files
Searches JAR source attachments
Supports filtering by extension/project/working set
If you want to search for anything without telling Eclipse what it is, use ctrl+shift+L (QuickEclipseSearch). This is the quickest way.
You can also use 'file search' (press ctrl+H) and navigate into file search using left and right arrrows on the top right corner of your windows. Or type 'file search' in the 'Quick Access' window.
If you are looking for a specific method, package, field,type or constructor use JAVA search.
If you want search in a particular file then just press ctr+F and type whatever you want to search in that current file.
Read all the answers above but couldn't figure out the solution working for me. Finally gave a thought process keeping in mind all the solutions provided here and voila it worked for what I'm looking here. Thanks stackoverflow, this site is awesome.
Solution I worked out:
Goto Navigator window in eclipse, select the folder where you want to perform the search operation, now click Alt a & f (shortcut) which opens the file search window. Now select the option "Selected resources" in 'scope' section and hit 'Search' button.
In MAC I use, control+H (^H), it opens a window, where you can search for any text within all the files.