I have a large number of Java projects in Eclipse, all containing source code with common package hierarchy. Only the last subpackages differ.
It is a real pain to navigate through the projects to look for a file or another when you want to have a clear view of the package architecture. Thus, is there a way to display all c开发者_StackOverflowlasses of a group of projects in a common package hierarchy?
I am not aware of a way to accomplish that in Eclipse currently as this is a very rare scenario. However, you can abbreviate the package names by going to Window -> Preferences -> Java -> Appearance, and checking the Abbreviate package names option. This will allow you to define rules like this:
com.example.application.foo.bar=(foobar)
and a com.example.application.foo.bar.package.subpackage will appear as (foobar).subpackage. This will reduce the clutter in your worspace a little bit.
Hope this helps.
You could define a working set of projects your interested in. In the package explorer, you can select those working sets as top level elements. Also, when doing a shift-ctrl-t, you can restrict your search to a working set.
精彩评论