my dog learned polymorphism*
The moose likes IDEs, Version Control and other tools and the fly likes eclipse javadoc? 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 javadoc?" Watch "eclipse javadoc?" New topic
Author

eclipse javadoc?

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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

Joined: Jun 25, 2001
Posts: 15950
    
  19

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

Joined: Mar 07, 2009
Posts: 120
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

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!
 
 
subject: eclipse javadoc?
 
Similar Threads
The compilation unit is not on the build path..
how to import sources on local file system into an IDEA project?
Bean import/reference problem [1/2 solved]
Maven 2: Project Nesting and Eclipse
Eclipse/MyEclipse Existing War file