Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse javadoc?

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to figure out how Eclipse determines the project type - web project/ejb project/java project, etc. (Really RSA, but I figure it is similar in Eclipse.) It used to be obvious from reading the .project file. Now there is a settings directory with the information. Rather than writing logic, I'm wondering if there is an API I can use.

I did try searching online. I couldn't find the Eclipse JavaDoc or anything like it - although I'm sure this must exist. I did find many articles on how to generate JavaDoc.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18164
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, but I'm not sure how the project type relates to JavaDoc. Other than the project maybe containing info on what directories to run JavaDoc against, where to put the output and what options to apply.

"project type" is a little hard to quantify, since any plugin can define its own project types, including inventing whole new ones (SNOBOL project anyone?). Presumably there's some way to enumerate them, since the File/New Project menu has to be able to do so, but I don't know of any standard for marking a project type, and I'm not entirely sure that projects can't end up being an amalgam of types.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim,
Project type doesn't relate to JavaDoc. I was hoping to find the source code and the JavaDoc would tell me where to look. There's got to be something as the IDE knows which icons to use - little brown bean for EJB, green for web, J for Java. I wonder if that comes from the plugin that added the type. Of if they register it somehow.

Or maybe it would be easier to write the code I need myself!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18164
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, you were looking for Javadocs of Eclipse itself.

The file decorators are added by the plugins and the plugins determine whether and which decorators they will contribute to the display. For a classic example, the little white asterisk in a red box that Eclipse and Subversion use to mark updated files. I've seen docs on how to make your own plugins do that, though I don't have any to hand at the moment.

The Javadocs at least used to be in the Reference Section of the plug-in-developer's guide, though a bit hidden. I can't seem to find them at all in my current setup.
 
Moojid Hamid
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at : IProjectNature

You might also want to google org.eclipse.core.resources.IProject and org.eclipse.core.resources.IProjectDescription


EDIT: I am using version 3.3.0.v20070612 it does have the settings directory but the .project file still contains the information you are after. Are you sure that the newer project files do not have this information?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim: In other words, I'm barking up the wrong tree with this.

Moojid: Below is the .project file for an EJB project I created. The settings directory is much more useful though. And it looks simple enough to write code - I am no longer looking for an API. The file org.eclipse.wst.common.project.facet.core.xml contains things like:
<installed facet="jst.web" version="xxx"/>
<installed facet="jst.ejb" version="xxx"/>

This is just as easy to parse as the .profile. So I think my algorithm is:


Thanks for all the helpful nudges in the right direction

.project file in case anyone still curious:
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34410
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More than I ever wanted to know about the topic is on the eclipse tutorial on facets. It was a matter of figuring out what to look for!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic