JDK-4359889 : stddoclet: Option to omit fully-qualified package name from ahead of class names
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.2.0,1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: generic,sparc
  • Submitted: 2000-08-05
  • Updated: 2014-05-05
  • Resolved: 2001-07-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
This is a request to allow the user to determine to show or hide the
package name as a prefix to class/interface names.  Here is one
request to show less, and another to show more:

.................
Is there a way to keep a class from showing up with a fully qualified name? 
For example, the method section of one particular javadoc page has 2 methods: 
(1) java.lang.String method1() 
(2) void method2(java.lang.String s) 

It would be much easier to read the documentation if it referred to
String           rather than java.lang.String, and
FileInputStream  rather than java.io.FileInputStream, 
etc.

Javadoc currently includes the fully qualified name if the
class is not in the package of the current class.
Details are at:

http://java.sun.com/j2se/1.3/docs/tooldocs/solaris/javadoc.html#shortened

(This feature may be more important for MIF doclet than the standard doclet,
because printed books are more space conscious than online books.)

....................
Another developer has asked for the opposite -- to display 

I'm trying to get javadoc to be package explicit about the "Implemented 
Interfaces", "Direct Known Subclasses", "Implements", and the "See Also" list.

Right now with 1.3 (for example) my javadoc html says a class implements 
"Destination".  I want it to say it implements javax.jms.Destination

It does what I want for things it cannot hyper-link to on the "All Implemented 
interfaces" list - eg. java.io.Serializable - I'd like it to do so even for 
things it can link to.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2 VERIFIED IN: merlin-beta3
14-06-2004

SUGGESTED FIX It seems we display the most information that people want. So far we have three suggested ways to resolve this problem, from the simplest to the most complex: 1) Omit the package name only for classes in java.lang, since this package is automatically imported. 2) List the fully qualified name ONCE, at the top of its class page, in the title and in the ancestry of the class. For every reference to another class or interface on the rest of the page, only use the class/interface name, not the package name. Add a command line option "-fullyqualifyclasses" which is a signal to fully qualify every reference to a class or interface. [NOTE: THIS SOLUTION IS EITHER ALL OR NONE, WHICH IS NOT SATISFYING -dkramer] If you wish to leave the default behavior alone (include the full package names) because that is what people are used to, at least include a command line option "-nofullyqualifyclasses" that will not qualify every reference to a class or interface. 3) Add an option such as "-noqualifier java.lang:java.applet" that indicates which class names would not be fully qualified in parameter types, @see and @link tags. The user can then supply "-noqualifier java.lang" to omit package names for java.lang. Also allow "-noqualifier all" for omitting the qualifier on all packages. I believe we do NOT need "-noqualifier none", as nobody has asked to fully qualify every class name. The syntax could be similar to that used for -group. That is, allowing wildcards is convenient so the list does not have to be very long: -noqualifier "java.*:javax.*"
11-06-2004

EVALUATION Also see related RFE 4145493, for external references only. Perhaps both should be combined into a single RFE. doug.kramer@Eng 2001-01-31 The option "-exclucequalifier" was added to the standard doclet. It works as described in #3 in the suggested fix. For example: -excludequalifier java.*:com.* Location of fix: MethodSubWriter.java HtmlStandardWriter.java FieldSubWriter.java standard.java Configuration.java jamie.ho@Eng 2001-06-18 option has been renamed to -noqualifier. jamie.ho@Eng 2001-06-18
18-06-2001

PUBLIC COMMENTS The option "-exclucequalifier" was added to the standard doclet. It works as described in #3 in the suggested fix. For example: -excludequalifier java.*:com.* jamie.ho@Eng 2001-06-18 option has been renamed to -noqualifier. jamie.ho@Eng 2001-06-18
18-06-2001