Spring Tool Suite - Project and External Dependencies - sort jars? - spring-tool-suite

Is there a way to sort the jars alphabetically? Currently, if i need to find a specific jar, i need to manually find the jar, by tapping its starting alphabet and keep tapping it to cycle through the list. It would be helpful if the jars were sorted.

There is an option to sort the library entries in the packages explorer alphabetically, if that is what you are looking for: Preferences -> Java -> Appearance.

Related

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.

How to show shortened project names in the Eclipse package explorer?

I work for a big company that has standards on Java project names. Long standards:
com.company.department.subdepartment.stream.project
Rather than let the package explorer take up a sizable portion of my screen, I'm looking for a way to shorten the project names. Mousing over project names shows the full name, but it's still very slow to determine which project I want to look at next with the incredibly long names. As has been answered before, package names can be shortened. I've got a rule set up, but it only works for packages:
com.company.department.subdepartment={department}
Is there a way to do an analogous thing for project names in Eclipse?
Package explorer uses the org.eclipse.jdt.internal.ui.packageview.PackageExplorerLabelProvider class to provide the view labels. Going through the source of this I don't see any support for shortening the project names.
The following ideas depend on how your eclipse workspaces are setup. If you're lucky and you just import project from your VCS, these could work for you.
If you're using maven, Eclipse project names are usually derived from your GAV. The Import as Maven project wizard has options for what pattern to use for the project name based on your maven GAV.
Otherwise, you can sometimes just right click the project -> rename. YMMV if you have any scripts or such that have the project name hardcoded. If you have these constraints, find those scripts and use variables rather than hardcoding.

Eclipse: maintain multiple product_configuration and their dependencies

I have an Eclipse-RCP project with multiple product_configuration.product files.
They are sort of siblings; product-B has all product-A's dependencies but have different launching/configuration.
The problem comes when I add a new plug-in to product-A (which I launch the most often), and then forgot to add the plug-in to product B,C,D etc.
It stays hidden until I actually launch/export the other configuration; only then I see it's missing and it's a bit painful.
Is there any way to solve this without manually adding plug-in dependencies into each product?
You could use a Feature based configuration rather than just plugins. Then you can have one or more common features used by all of the products and other features containing the plugins unique to each product.
Some more on features here

Quickly push-in refactor large number of Spring Roo generated methods in .aj files

Is there a faster way to push in multiple methods from Roo-generated aspects to Java classes than doing them one at a time in an IDE that supports the operation?
I want to push in all methods from the aspects generated because of a specific Roo annotation as painlessly as possible.
In STS or Eclipse, you can probably do this with the "Outline" view.
Open up the .aj file that Spring Roo generated.
Find the "Outline" view.
Select all of the methods that you want to push-in.
Right-click them, "Refactor, Push In"
If you're having trouble getting the Roo created .aj files to show up in Package Explorer, look for the little down-arrow, go into "Filters..." and turn off the "Hide generated Spring Roo ITDs" box.
Have you tried removing the AspectJ nature from your project?
Or you can also remove the SpringROO nature directly. That will remove all your .aj files and all the methods will be transfered to the actual class files.
In STS you can choose this option from right click menu of your project.
If your IDE is slow then you can do this from ROO shell from command prompt.
Hope this helps you. Cheers.

Indexed full text search in 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.