Generating Javadoc for TrackbotCommonV2 in Eclipse

18 views
Skip to first unread message

grudolph

unread,
Jul 25, 2008, 11:07:19 AM7/25/08
to Systronix TrackBot
I have Eclipse set up to use the subclipse plugin to pull sourcecode
out of the trackbot repository at Java.net.
have newer used the plugin before. It seem to work fine except that
Eclipse does not seem to recognize the source tree as a real
project. I say this because which I attempt to use the "generate
Javadoc" option 'neither the trunk project, nor TrackbotCommonV2
project (1 have attempted to pull down both the entire trunk and
just CommonV2) are listed under projects I can select for generation.

What have I done wrong?

Taking a step back, what I really want to do is generate the Javadoc
for TrackbotCommonV2 so I can read it.
I think that will help answer some questions I have about the demo
code.

grudolph

unread,
Jul 25, 2008, 12:40:27 PM7/25/08
to Systronix TrackBot
I added a javodoc target to my local copy of the build.xml file
under TrackbotCommonV2 and used ant to generate javadoc.
There area ton of warnings about class files, and one error, in the
generation, but the docs did generate.

Bruce Boyes

unread,
Jul 25, 2008, 3:33:13 PM7/25/08
to trac...@googlegroups.com
Quoting grudolph <george....@gmail.com>:

>
> I have Eclipse set up to use the subclipse plugin to pull sourcecode
> out of the trackbot repository at Java.net.

I also use the subclipse plugin.

> have newer used the plugin before. It seem to work fine except that
> Eclipse does not seem to recognize the source tree as a real
> project. I say this because which I attempt to use the "generate

Eclipse needs to have a ".project" file in order to recognize a group
of files as a "project", and to tell it what kind of project (Java,
C/C++, etc) it is.

The TrackBotCode project at java.net has several projects under it.
This may not be the most common way to use the SVN "trunk" but at
Java.net I think it's logical to group related "projects" together
instead of making them all completely independent, apparently
unrelated "projects" in the Java.net sense of "project". So I never
make an eclipse project which is the "trunk" of TrackBotCode, I use
eclipse to checkout the subprojects such as TrackBotCommonV2 which
then has the SVN repository:
https://trackbotcode.dev.java.net/svn/trackbotcode/trunk/TrackBotCommonV2
Then I can commit and update each subproject separately, which seems
like the obvious way to do it.

and likewise for other subprojects such as TrackBotSensorEval:
https://trackbotcode.dev.java.net/svn/trackbotcode/trunk/TrackBotSensorEval
and so forth.

If you browse the java.net subversion space for TrackBotCode you will
see a separate "www" folder which is where all the html files, images,
docs, etc are stored. So I make another Eclipse "project" for that,
called "TrackBotCode WWW" which uses the SVN URL:
https://trackbotcode.dev.java.net/svn/trackbotcode/trunk/www

Then I use subclipse to commit and update the html pages there. I
actually edit them in DreamWeaver. But java.net doesn't allow FTP for
html uploading or downloading, so I only edit in DreamWeaver and use
Eclipse/subclipse to commit and update.

In Eclipse I can open a "SVN Repository" perspective and create a new
repository entry for the TrackBotCode trunk, with this URL:
https://trackbotcode.dev.java.net/svn/trackbotcode/trunk
Then below that I can browse all current and future subprojects such
as TrackBotCommonV2, the www folder described above, etc.
Right-click on any such folder and then follow these instructions to
checkout that project:
http://www.practicalembeddedjava.com/tools/javatools.html#eclipse
well I don't see the instructions I meant... there is some eclipse
help there and as usual it could have more added. There's also an
Eclipse help project at java.net, though I don't recall its name.

> Javadoc" option 'neither the trunk project, nor TrackbotCommonV2
> project (1 have attempted to pull down both the entire trunk and
> just CommonV2) are listed under projects I can select for generation.

You obviously don't want to generate javadocs for the entire trunk as
if it was a single project.

If you have an eclipse "project", the root folder will have a
superscript uppercase "J" if it is recognized as a Java project. If
not, you can edit this part of the .project file - the buildCommand
and natures properties:
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>

Save the edited .project file and refresh the project. Now it should
be recognized as a Java project by Eclipse.

> Taking a step back, what I really want to do is generate the Javadoc
> for TrackbotCommonV2 so I can read it.

Some of Shawn's build.xml don't have a "javadoc" task, but there is a
separate JAR and javadoc Ant file. This is just Shawn's style
preference. In the case of TrackBotCommonV2 it is a "build-jars.xml"
file which does have a "javadocs" target. Please run that to generate
javadocs.

In the case of TrackBotSensorEval I have made a "doc" target in the
build.xml file, which is my preference.

Shawn also uses a build.properties file to handle PC vs Mac
differences. Such is the case in TrackbotCommonV2.

I hope that helps!

I'll try to find some more Eclipse project creation tips -- which I
remember creating...

best regards

Bruce

grudolph

unread,
Jul 28, 2008, 11:25:22 AM7/28/08
to Systronix TrackBot
I think you are correct
in the decomposition of projects within the SVN trunk.
Once I used the correct SVN repository URL for TrackbotCommonV2 with
Subclipse, checking out the project seems to work fine within Eclipse.

grudolph

unread,
Aug 1, 2008, 5:18:18 PM8/1/08
to Systronix TrackBot
I was in error when I said everything was working correctly in
Eclipse.

I am using the Ganymede version of Eclipse.
When I import TrackbotCommonV2, or any other Eclipse project,
I get one of two results:
1) A non-java resource project with a nice folder structure, but with
"java nature" features turned off.
I can't do nice stuff with the tool.
If I attempt something like "Open Declaration", the editor says
"This resource is not on the build path of a Java Project".
OR
2) A Java project with screwed up project references, because folders
like src are turned into packages.
The ant script won't build or deploy this version.

Here's how I get there:
1. File->Import->Checkout from SVN->choose "Use Existing repsitory
location"->(choose the trunk URL)->(select the TrackbotCommonV2
folder)->next

2. Here I have two options:
1. "Check out as a project using the new project wizard"
2. "Check out as a project in the workspace"

If I choose option 2, I get result #1, a non-Java resource project.
If I choose option 1, I get result #2, a Java project with screwed up
packages.

The .project file that Eclipse loads has empty builder command and
nature fields.
If I hand-edit the .project file to include the proper builder and
Java Nature, then option 1 converts to option 2.

What am I doing incorrectly?
Reply all
Reply to author
Forward
0 new messages