This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Reference Proj tool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse Reference Proj tool" Watch "Eclipse Reference Proj tool" New topic
Author

Eclipse Reference Proj tool

Dan Rubel
author
Greenhorn

Joined: Sep 24, 2004
Posts: 13
Eclipse provides an excellent Java search facility for locating source, yet the scope of any search is limited to the projects loaded in the workspace; if a Java class is located in a plug-in?s JAR file, and the plug-in is not on the Java build path of an open project, then the class will not be found. When building Eclipse plug-ins, it is advantageous to include all Eclipse plug-ins in the search scope, even those not referenced by any projects under development.

One approach is to load all the plug-in projects from the Eclipse CVS server. Unfortunately, this chews up memory and clutters your workspace with hundreds of additional projects. Another approach is to create binary projects, one for each Eclipse plugin. Although binary projects take up less memory than source projects, this too will clutter your workspace with hundreds of additional projects.

Our approach, useful for searching all of Eclipse, using less memory, and not cluttering your workspace is to create one reference project containing all the Eclipse plugin jar files to be searched. This project contains no source of its own, but contains all the Eclipse plug-ins on its classpath so that a search can include the entire source for Eclipse. To simplify the creation of a reference project, we created a "Refence Project Wizard" that is available as part of the Quality Eclipse Tools...

Reference Project Wizard
http://www.qualityeclipse.com/?page=tools/reference/content.html


-Dan Rubel<br />Chief Technology Officer<br />Instantiations, Inc. <br /><a href="http://www.instantiations.com" target="_blank" rel="nofollow">http://www.instantiations.com</a> <br /><a href="http://www.swt-designer.com" target="_blank" rel="nofollow">http://www.swt-designer.com</a> <br /> <br />Co-Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0321228472/ref=jranch-20" target="_blank" rel="nofollow">"Eclipse: Building Commercial-Quality Plug-ins"</a>
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995

[...]all Eclipse plug-ins in the search scope


When you say that what you have in mind? All active Eclipse plugins or all core Eclipse plugins? In the later case you may find any class using the open type.

./pope


blog - InfoQ.com
Dan Rubel
author
Greenhorn

Joined: Sep 24, 2004
Posts: 13
Originally posted by Ali Pope:

When you say that what you have in mind? All active Eclipse plugins or all core Eclipse plugins?


All plugins in the Eclipse/plugins directory.

Originally posted by Ali Pope:

In the later case you may find any class using the open type.


Try the following:
1) close all your projects
2) select Navigate > Open Type...

And you'll get a dialog stating "No types available" (this is 3.1 M2... 3.0 is similar if not the same).

"Open Type" only searches your open projects. If a plugin's jar file is not referenced by an open project, then the classes in it are not found by the "Open Type" command. The purpose of a Reference Project is to search *all* Eclipse plugins that are installed in the Eclipse/plugins directory... not just the plugins referenced by your projects. Each of your projects, like my own, only reference a handful of plugins that they need to compile and execute. A Reference Project references *all* plugins.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Got it. Never tried the scenario you are talking, but now it seems you are right. I will give a try to the plugin. 10x Dan.

./pope
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
The Eclipse updater shows me 2 different versions of the plugin:
- 0.5.0
- 0.5.0.20040908

Which one is recommended for Eclipse 3.0.1?

./pope
 
 
subject: Eclipse Reference Proj tool
 
Similar Threads
Creating a Eclipse Configuration You Can Manage
Help with building workspaces please!
How to comfigure the struts in Eclipse v3.1.0
Plugin
Goal/Putpose of Eclipse: Building Commercial-Quality Plug-ins Book.