This discussion is archived
3 Replies Latest reply: Apr 14, 2009 2:36 AM by thomas.behr RSS

How to generate javadoc for just one subdirectory?

843810 Newbie
Currently Being Moderated
My problem is: how to use Eclipse's Javadoc plugin to compile Javadoc for the files in one subdirectory of a large workspace?

Here’s what happens now: I select File / Export and get a wizard which asks me what to export. “Javadoc” is already selected from the previous use, so I click Next.

The next page of the wizard invites me to select the files for which Javadoc will be generated. The “Select types…” pane contains a collapsed tree of in the workspace. The top-level directory containing the files that concern me is half-selected, indicating that some but not all of its contents are selected.

If I click Next or Finish at this point, I will get Javadoc for just one source file, the one in the active tab of the editor. On the other hand, if I check the “Select types…” pane’s half-selected entry, I will get Javadoc for hundreds or thousands of files in addition to the dozen or so that I want. Some of these extra files will generate huge numbers of errors, and fixing them is outside my authority.

To compile Javadoc for all of the files that concern me and no others, I must open two levels of subdirectories under the half-selected directory, scroll down a long way to find the half-selected entry at that level, and select it. This takes more time and more mouse clicks than the entire rest of the generation procedure. And I must do it every time I want to generate Javadoc.

Is there an easier way?

I think the answer might be to define a project that includes only the files that concern me, but so far all of the documentation I’ve found for Eclipse’s implementation of projects has been either too general or too detailed to be helpful. The Project / Open Project command is disabled, suggesting to me that a project is already open; but the Project / Close Project command is also disabled, suggesting the opposite, which bemuses me. Also, I’m working with source code that is checked out of a source control system, and I’m concerned that if I try to define my own project without understanding the project facility well, I’ll do something that interferes with the projects that my employer’s development team have already defined for their own use.