Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Class Prefix Be Removal From Javadocs(Javadoc adds Java library prefixes, e.g. java.lang, java.util, etc., to the Modifier & Type and Method columns of each program unit Javadoc. This is unnecessary and makes it impossible to see all )
Class Prefix Be Removal From Javadocs [message #1798795] Sun, 25 November 2018 13:13 Go to next message
Top Kat is currently offline Top KatFriend
Messages: 37
Registered: March 2013
Member
By default, Javadoc adds Java library prefixes, e.g. java.lang, java.util, etc., to the Modifier & Type and Method columns of each program unit Javadoc. This is unnecessary and makes it impossible to see all the 3 columns of the Javadoc on the same screen, even at low magnification. I'd like to have most of the screen width for the Description column.
On the Javadocs for standard Java classes, no such prefixes are shown although there are references to the containing library.

I'm using Photon.
Is there any way to configure it so that these useless prefixes are omitted and horizontal space is opened up ?

[Updated on: Sun, 25 November 2018 13:15]

Report message to a moderator

Re: Class Prefix Be Removal From Javadocs [message #1798797 is a reply to message #1798795] Sun, 25 November 2018 15:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30882
Registered: July 2009
Senior Member
I assume you're using the Javadoc export wizard, right?

https://help.eclipse.org/photon/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-export-javadoc.htm

The last page allows you to specify additional options. So I think your question is mostly about how javadoc itself works, i.e., what options you can use to control this behavior...

I expect you need to provide -link arguments if you want links instead of just the qualified name. E.g., this will probably do the trick:

-link https://docs.oracle.com/javase/8/docs/api/
Re: Class Prefix Be Removal From Javadocs [message #1798798 is a reply to message #1798797] Sun, 25 November 2018 15:14 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1435
Registered: July 2009
Senior Member
You can control the inclusion of qualifying package names with the -noqualifier option to the JavaDoc generator.
-noqualifier all will suppress all qualifying package names and is likely what you want. You can also specify a list of package qualifiers to suppress.

You enter this in the Extra Javadoc options box on the last page of the Export Javadoc wizard.

Additional Javadoc info can be found here:
https://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/javadoc.html#options
Re: Class Prefix Be Removal From Javadocs [message #1798804 is a reply to message #1798797] Sun, 25 November 2018 21:12 Go to previous messageGo to next message
Top Kat is currently offline Top KatFriend
Messages: 37
Registered: March 2013
Member
@Ed Merks: I'm using :

Project > Generate Javadoc ...

I tried adding -link to the options on page 3 of this.
I was already using the options for HTML5 (-html5) and custom tags (-tag custom.date:a:"Date: "). To uncomplicate things, I removed the custom tag option.
But adding -link to the Javadoc options box just produces:
javadoc: error - No modules, packages or classes specified.
1 error

Adding -link to the VM options box:
javadoc: error - Illegal package name: "C:\Users\sandbar\Photon Workspace\GPostProcessor\doc"
1 error


Much the same with -noqualifier option.
Adding -noqualifier into the Javadoc options box I get this error:
javadoc: error - No modules, packages or classes specified.
1 error


Adding -noqualifier to the VM options space I get:
javadoc: error - Illegal package name: "C:\Users\sandbar\Photon Workspace\GPostProcessor\doc"
1 error


With some of the methods listed, it gives just the class name with no prefix as method parameters. But the output class is always given with the prefixes.

There little beyond the most basics on Javadoc in YouTube or SO.
It's strange that more people aren't using Javadoc beyond the basics.
Maybe I need to go to Oracle for the right guidance here.

[Updated on: Sun, 25 November 2018 21:32]

Report message to a moderator

Re: Class Prefix Be Removal From Javadocs [message #1798806 is a reply to message #1798804] Mon, 26 November 2018 01:14 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
Messages: 1435
Registered: July 2009
Senior Member
Did you use '-noqualifier' or '-noqualifier all'? The noqualifier requires a parameter. You have to enter 'all' or a list of packages that shouldn't be qualified.

The -link option is used to link class references to external libraries that are referenced from your code. This doesn't seem to be what you asked about in your original post.
Re: Class Prefix Be Removal From Javadocs [message #1798808 is a reply to message #1798806] Mon, 26 November 2018 03:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30882
Registered: July 2009
Senior Member
There are of course many options that could be used so I expect you're aware of their documentation:

https://docs.oracle.com/javase/9/javadoc/javadoc-command.htm

Of course one must specify options correctly.

The -link also requires a single argument and also has the effect of producing an href with a simple name, instead of a fully qualified name without an href (everywhere it seems to me from actually trying). But as David suggests, any other external references for which a -link URL is not specified will remain fully qualified.

And yes, your question is really about the javadoc tool itself so not really and Eclipse question at all. But I was curious who it worked because I'm never used this wizard before...

Re: Class Prefix Be Removal From Javadocs [message #1798830 is a reply to message #1798806] Mon, 26 November 2018 12:34 Go to previous message
Top Kat is currently offline Top KatFriend
Messages: 37
Registered: March 2013
Member
-noqualifier all does it radiantly. See screenshot below.

Yes, I see that I have to read through the Javadoc stuff in more detail to get full horsepower from this method of documentation.

It looks like various organizations coding extensively in Java may be using their own in-house documentation systems.

Thanks so much, men.

Previous Topic:can't exec gdb with eclipse PTP
Next Topic:To TCF or not to TCF?
Goto Forum:
  


Current Time: Tue Feb 18 02:05:12 GMT 2020

Powered by FUDForum. Page generated in 0.05707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top