InstaSearch (eclipse plugin) functionality in intelliJ v11.x? - eclipse

One thing I miss about moving from eclipse to intelliJ is the InstaSearch plugin that would let you to search the source code codes of your entire project very quickly, really simple and effective.
Is there such a functionality in intelliJ either baked in or added via a plugin?

IntelliJ supports search and replace in your entire project.
To find a text in all files within the specified path
1. On the main menu, choose Edit | Find | Find in Path, or press Ctrl+Shift+F.
2. In the Find In Path Dialog, specify the following options:
Text to find (you can select one from the recent history drop-down list).
Search scope (project, module or directory).
Search options (case sensitivity, whole words, and regular expressions).
See instructions here.

Related

Highlighting all occurrences of a search string in Eclipse Java editor

If you search for a String in Netbeans Java editor, it automatically highlights all occurrences of that string.
But, how can I achieve this feature in Eclipse?
(I checked Preferences > Java > Editor > Mark Occurrences, but it seems it is only for similar variables methods etc. but not for for search matches)
Have you tried the Glance plugin for Eclipse? fully meet your requirements and even with more features.
demo and Github of this project:
http://ystrot.github.io/glance/
UPDATE: available in Eclipse marketplace
http://marketplace.eclipse.org/marketplace-client-intro?mpc_install=1012
You can enable "Toggle Mark Occurrences" (shortkey is ALT+SHIFT+O).
For the color of the select text,you can:
Window->Preferences->General->Editors->Text Editors->Annotations->Occurrences
Hope it useful.
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

search for line within specific package in eclipse

I'm working with eclipse and want to find a specific line that is being output in an error message. The line is not in any code I've written, but I believe it's comeing from a specific library I've included. Eclipse is able to navigated through classes within the library so it has the source from somewhere, the jars were fetched from Mavin and I assume the jar it fetched was a source jar?
The problem is that, by default, the simple java search does not search inside of jar's for lines, and I didn't see an obvious way to tell it to. IN addition I don't want to search all the jars, or even all the code within the one suspected jar, for a line as it could take awhile. Is there a way I can tell eclipse to do a text search of every file within a specific package only? Failing that how would I tell it to do a text search of all code within a specific jar?
Thanks.
Eclipse's 'File Search' which you'd need to find arbitrary text in files doesn't "look into" JARs. Its 'Java Search' on the other hand doesn't look at source code specifically but allows to search types, methods, fields etc. (i.e. things Eclipse doesn't need source code for). Hence, Eclipse can't help you here.
You weren't asking for alternatives but on Unix there's zipgrep and for Windows I believe Actual Search & Replace does the same.

Eclipse: quick search on filename

Very often while working in Eclipse I realize that I remember class name, but forgot in which package this class is. Using Search is not very convenient. Too many clicks and key presses. I wonder, is there a plugin to simplify this process? For example, would be great if there was text-edit box in the top of package explorer which could filter showing packages and .java files depending of entered text. Anyone knows something like that?
Eclipse does provide similar functions:
Open Resource Shift+Ctrl+R for all resource files (including Java files)
Open Type Shift+Ctrl+T for all Java classes in classpath.
They also filter the list as you type.
Note that they search all files of all opened projects in current workspace.

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.

Why can't I search maven projects in eclipse

I'm using the m2Eclipse plugin (http://m2eclipse.sonatype.org/) to handle maven modules in eclipse. After enabling a project for dependency management and for nested modules, I can no longer do a 'File Search' over the project. The search finishes instantly with the search window display "0 matches in empty scope".
Any ideas how I can make search work again?
It would appear the plugin marks any non java folder as 'derived', which is why it gets ignored by the search. Right clicking on the non java folders and deselecting the check box fixed this.
Small addition to #slashnick’s answer:
In the “File Search” dialog of Eclipse you can also use the checkbox “Consider derived resources” to search those “derived” resources. This may be more convenient if you don’t want to change the properties of multiple resources just for a search.