"Quick Access" for all workspace files? - eclipse

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.

Related

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

Netbeans Shortcut to Open File

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!

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.

How to search all open files in Eclipse?

Simple question: how do I search all the files currently open in Eclipse? Note: I don't wanna search all the files I have in that workspace, just the ones open in tabs. Is there an easy way to do this?
Closest way is selecting several resources in Navigator or Package Explorer view, then press Ctrl+H and choose 'Selected Resources' radio button. It will limit search only to selected files.
CTRL+E on Windows or Linux, and Command+E on OSX.
There's no way to do that at the moment.
The easiest solution would be to select your files manually (holding CTRL + click on file) and to specify "selected resources" as your search scope.
This may come too late for the original poster, but just in case somebody else needs to find out an answer, I had the same problem and found my solution by installing a plug-in named Instasearch. You can get it by going to Help/Eclipse Marketplace and searching for Instasearch.
You can find more about this plug-in in the following address.
http://marketplace.eclipse.org/content/instasearch
Spring produces a stand-alone Eclipse plugin (no dependencies on Spring) called Quick Search
http://marketplace.eclipse.org/content/quick-search-eclipse
For efficiency, it searches your open files first. So while it isn't purely restricting to opened files as you requested, you can still get a similar effect in practice by just clicking the first results that come up.
The currently opened files simply aren't considered special in eclipse - you have far more advanced methods of organizing your files: projects and working sets.
Working sets allow you to define sets of files, which can be used as constraints for many operations. You have to define them explicitly, but then they don't change just because you've closed a file.
There is no find-in-open-files command in Eclipse, no.
I think that the main reason find-in-open-files is not implemented in Eclipse is probably because the set of open files is for many users rather insignificant. (In fact, I don't know (or care) which files I have open. (I even have Eclipse set to automatically close editors/files when they become too many). If I want to navigate to a file, I open it. Limiting a search to the files I currently have open would be completely pointless for me.)