Indexed full text search in Eclipse? - eclipse

Is it possible (via a plugin or other way) for Eclipse to build a full text index for a project, so that searching a String does not linearly search all the files in the project?
(or does it automatically build such an index to speed up future searches?)

http://code.inf.unibz.it/projects/instasearch/ (old)
Edit: https://github.com/ajermakovics/eclipse-instasearch
It's a plugin that does indexed search using Lucene. Exactly what you're looking for I think.

The index files used by the search component of Eclipse (like a SearchParticipant) are in your workspace:
.metadata\.plugins\org.eclipse.jdt.core
As mentioned in this thread,
These files are used by the search or some other tools in Eclipse.
If you remove them, they will created again when you restart Eclipse or when you will activate the indexes. Then you will see a progress bar saying the number of files that need to be indexed.

There's an absolutely amazing and free plugin made by Pivotal (the creators of spring) that does indexed search with realtime preview for eclipse and works really good. I use it every day and could not live without it:
Quick Search for Eclipse
https://marketplace.eclipse.org/content/quick-search-eclipse?mpc=true&mpc_state=
After install, it can be easily opened via ctrl+shift+L
Give it a try, in my opinion is better than eclipse instasearch, and periodically maintained

You can write a plugin that does that. Using the "Builder" example in Eclipse PDE in conjunction with Lucene, it should take a novice a couple of days to get something that works.
If you are interested, nWire (for Java or PHP) offers a full text search for all the elements in your code (not just types, but also methods, fields, constants, etc.). It does not index all the code, though.

Related

Eclipse Generic Text Editor Sort OUtline

I thought this would be very simple to achieve but I cannot sort the outline in alphabetical order in the generic text editor that is now the default editor for javascript files in Eclipse 2020-12. In fact I have no sorting options whatsoever in the outline.
This is all I have in any perspective using the generic text editor.
This really affects my productivity having to sroll through many functions in a javascript file to find the correct one. I have hundreds of javascript files with hundreds of functions each.
I am using Wild Web Developer tools as this is the way Eclipse is heading (and because each update automaticaly installs it). Also I have node.js installed even though I don't require node.js for anything other than the generic text editor.
I'd prefer to not have the overhead of uninstalling Wild Web Devleoper and installing JDT each time Eclipse updates. Ideally, I should be able to simply update when prompted and all works as previously.
This is the Eclipse version I am using
Version: 2020-12 (4.18.0)
Build id: 20201210-1552
Does anybody have any idea how I can simply sort my functions and variables alphabetically in the generic text editor please? (I can sort the outline in java files

Find a project or plug-in in Ecilpse workspace

So I have nearly 300 plug-ins and features in my workspace at any given time. And I want to quickly filter the Package Explorer view, to show only projects that have, say, xyz in their name. Is there a way to do this?
I can't seem to find a way to search for projects specifically in the search dialogs either. I feel this should be straightforward but can't seem to recall how to do it right now, if it was ever possible.
Using eclipse 4.4.2, on windows 7.
Try this custom package explorer plugin. Here you can filter resources.

List of Eclipse pictogram?

After some time of working with Eclipse - Java Enterprise, STS etc. I found enormous quantity of icons, pictures, pictogram etc. Does is possible to find list of all to use in work?
Thanks.
In short, it is not possible to do. The longer explanation is, that every plug-in of Eclipse can contribute additional icons, and they are keyed using freeform string identifiers.
However, if you want to reuse some icons (and the EPL licence of Eclipse permits it), a non-complete list of icons is available at http://eclipse-icons.i24.cc/

Time to develop an option in Eclipse to modify a Java file source

I'm evaluating the possibility of developing an Eclipse plugin to modify the source code of some Java files.
The Eclipse plugin should:
add one menu option or context menu option to launch the modification process.
add a key binding
only alter the UI in that way when an editor has been open on a Java file.
the modification process would not open a dialog, or maybe, a very simple one.
the modification process would traverse the AST of the Java file and would modify it.
Considering that we have no experience with Eclipse plugins and we need spend time in reading docs, how much time do you estimate in developing that plugin?
Thanks in advance.
It's really not that difficult at all... I had students in my design patterns class doing it for an assignment (adding/removing javabean getters and setters)
See http://help.eclipse.org/ganymede/topic/org.eclipse.jdt.doc.isv/guide/jdt_api_manip.htm
[EDIT: added the following article reference]
And a great article on it at http://www.eclipse.org/articles/article.php?file=Article-JavaCodeManipulation_AST/index.html (from 2006 -- there may be a few API changes since)
Yes, writing plugins takes a little getting used to, but so does any API.
And you can modify the AST -- see the page I reference above.
(I should note that the above link is from the eclipse help, which can also be accessed via Help->Help Contents inside Eclipse -- there's a lot of good info in there, but it's just a starting point)
You'll probably spend quite some time cursing the complexity of the eclipse plugin system. There are some example plugin development projects that can be very helpful if they cover the area you're working in.
I'd say you're looking at 2-4 days of work, spent mainly getting familiar with the platform - someone with a lot of experience writing eclipse plugins would probably take no more than an hour.
However, your step 5 could be tricky. I don't know how easy it is to access and change the Java AST; my experience is based on developing an editor plugin for an exotic file format rather than Java code.
Well, the four first points are easy to achieve, even by monkey coders that look at the eclipse PDE documentation shipped with Eclipse. These can be achieve in 1 day of work, maybe 2.
The hardest point is really the fifth one and the kind of modification you expect to do. Acting directly on the editor content is simple, accessing the editor internal AST and modifying it is really a bigger challenge and I doubt that it could be achieve in less than a week by unexperimented people (it can take longer, depending of what kind of modification you want to apply).

Grouping Files in Project Explorer in Eclipse

I am newbie to Eclipse, I am planning to use it for AVR development with WinAVR and gcc.
The feature I am looking for is the grouping of different files in the project, like all headers together, all source files together and all files excluded from the build together etc.
I tried AVR Studio from Atmel, it has this grouping feature but it lacks several other features which Eclipse supports. Any help to configure Eclipse Project explorer to display the project files in this way would be appreciated and helpful for me to decide the IDE to use.
Note: I know that I can manually add different folders for each of these groups and move the files, but that moves the physical files, and breaks the relative path in the code, and other comilers/IDE's. I am looking for logical grouping of files.
Unfortunately there is no general way for a user to configure the grouping in the Project Explorer, the grouping is setup based on the code that controls the content (i.e. CDT, JDT, etc). I think it would be interesting to have this feature, but it's not clear the UI that can be used to specify it. You are welcome to submit an enhancement request to add this to the Eclipse Platform UI project. And giving an example of how it's done in another product would be helpful.
Thanks Francis, looking at your profile I think I found the right person to solve my issue :)
I have opened it as a bug (as I could not find a feature request in bugzila) Bug 296514 - Logical Grouping Files in Project Explorer in Eclipse
I have attcahed screenshots of both AVR Studio and Eclipse project explorer. That should give you an idea of what kind of UI features I am requesting. I can difinetely provide more information if you want.
I think what you are looking for can be done with Working Sets.