• Post Reply Bookmark Topic Watch Topic
  • New Topic

Single Javadoc HTML File  RSS feed

 
Louis Denning
Ranch Hand
Posts: 64
4
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, all I'm looking for is how to generate a Javadoc with all its pretty layout for just one single ".java" file instead of having a bunch linking to each other. Doesn't really have to be an HTML file, either, just something that is in the form of a single file. If you're asking about the class, it's just a bunch of static convenience functions.

Merci beaucoup~
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the javadocs, each class has its own HTML file. If you generate the javadocs in the usual way, you could just ignore (or delete) all the other files except for the one you're interested in. It's possible that the CSS is in an external file, though.
 
Louis Denning
Ranch Hand
Posts: 64
4
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, for some reason, it loses the pretty colours and formatting if I just take it out of its relative location.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sounds like it relies on an external CSS file. If you wanted to go to a whole lot of trouble you could write a plug-in for javadoc that formats it precisely the way you want, but that seems a lot of work for little gain.
 
Louis Denning
Ranch Hand
Posts: 64
4
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I remember seeing this thing that reads the documentation from the source and writes the Javadoc in PDF format or something. Qu'est-ce que vous recommandez?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No idea about PDF, but if you want to customize javadoc output, then doclets are the tool of choice. See http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html for more information. you should be able to find the source code of the standard doclet somewhere; starting from that, it should not be too hard to create a version that embeds all CSS in each HTML page. Or, if you want to take it a step further, creates just one HTML file for each class it encounters, and nothing else.
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved discussion as too difficult for “beginning”.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Louis Denning wrote:Well, all I'm looking for is how to generate a Javadoc with all its pretty layout for just one single ".java" file instead of having a bunch linking to each other. Doesn't really have to be an HTML file, either, just something that is in the form of a single file. If you're asking about the class, it's just a bunch of static convenience functions.

Seems like an odd thing to want. even utility methods are likely to return other objects, so the linking may well have some use.

Or is this in order to conform to some in-house standard for documentation? If so (and believe me, I've been there myself ), I would try your hardest to talk your managers out of it. It's an incredible waste of time that does absolutely nothing to improve the documentation - in fact, likely the exact opposite.

It's also possible that you can get plugins that will allow you to do this via File→Save As; but I've never tried it.

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!