This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 30669 - Javadoc comments added thru srcmodel do not follow Java style guidelines
Summary: Javadoc comments added thru srcmodel do not follow Java style guidelines
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords:
: 34760 (view as bug list)
Depends on:
Blocks: 22728
  Show dependency tree
 
Reported: 2003-02-04 21:10 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-02-04 21:10:57 UTC
[dev feb 03] I noticed that generated Javadoc
comments (where NB is responsible for the
formatting) do not quite follow the Java standard
format. Either the JavadocTag impl should generate
exactly the Java recommendations, or it should
follow indentation engine settings, if the
indentation engine in fact lets you configure this
sort of thing.

Specifically: make a new class with an uncommented
constructor. Select the constructor in the
Explorer. Click on the Javadoc property and open
the custom editor. In the "Text" field, enter some
text with a line break (or, add a tag of any
sort). You will see e.g.:

    /** La la...
     * ahoj!
     */    
    public Foo() {
    }

but expected e.g.:

   /**
    * La la...
    * ahoj!
    */    
    public Foo() {
    }

Compare 2nd & 3rd notes under

http://java.sun.com/j2se/javadoc/writingdoccomments/index.html#format
Comment 1 Marian Petras 2003-02-17 18:16:04 UTC
I think that the correct form is

   /**
    * Something...
    */
   public void theMethod() { ... }

and not

  /** 
   * Something...
   */
   public void theMethod() { ... }

(Although the later form is used in the first example in the above
document, all other examples are formatted using the former one.)
Comment 2 Jesse Glick 2003-02-17 19:33:22 UTC
Yes, you are right - indent my recommendations 1 space. (Necessary for
formatting of class Javadoc to be possible anyway.)
Comment 3 Tomas Hurka 2003-08-18 14:47:43 UTC
Wow! This issue has 8 votes - I will look at it.
Comment 4 Tomas Hurka 2003-08-19 09:49:15 UTC
*** Issue 34760 has been marked as a duplicate of this issue. ***
Comment 5 Tomas Hurka 2003-08-21 12:43:14 UTC
Fixed in trunk.
Checking in Element.java;
/cvs/java/srcmodel/src/org/openide/src/Element.java,v  <--  Element.java
new revision: 1.4; previous revision: 1.3
done
Comment 6 Jan Becicka 2003-08-28 14:32:34 UTC
Verified. Test golden files updated.
Comment 7 Jan Becicka 2003-09-04 14:00:31 UTC
It is fixed in trunk. I'm reopening it, because it should be fixed in
JAVA_MDR branch as well.
Comment 8 Jesse Glick 2003-09-04 18:01:08 UTC
Well, reported version is still 3.5, that should not change.
Comment 9 Antonin Nebuzelsky 2003-11-04 14:59:41 UTC
Fixed in Nevada Patch 1 and in Arrow.
Comment 10 vbrabant 2003-11-04 16:16:08 UTC
I am sorry but I have no idea what's the meaning of Nevada Patch 1 nor
Arrow.
Could you give us more information about that sun's internal names ?
Thanks a lot.

Vincent
Comment 11 Jesse Glick 2004-05-25 17:58:05 UTC
Note original Version field: 3.5.
Comment 12 Tomas Hurka 2004-06-22 08:41:27 UTC
Moved to new subcomponent java/javacore.
Comment 13 Jesse Glick 2004-06-22 15:41:50 UTC
Reported in 3.5.
Comment 14 Martin Matula 2004-07-18 22:04:27 UTC
Reassigning to pflaska. Pavle please check whether this is still a
problem.
Comment 15 Pavel Flaska 2004-07-19 10:10:35 UTC
Fixed. Changed from 

/** javadoc
 * comment
 */

to 

/**
 * javadoc
 * comment
 */

/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/FeatureImpl.java,v
 <--  FeatureImpl.java
new revision: 1.15; previous revision: 1.14
done
Processing log script arguments...
More commits to come...
Checking in src/org/netbeans/modules/javacore/parser/JavaDocParser.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/JavaDocParser.java,v
 <--  JavaDocParser.java
new revision: 1.7; previous revision: 1.6
done
Processing log script arguments...
More commits to come...
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/FormatterTest/FormattedClass.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/FormatterTest/FormattedClass.pass,v
 <--  FormattedClass.pass
new revision: 1.4; previous revision: 1.3
done
Processing log script arguments...
More commits to come...
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testAddJavaDocText2_JavaDocTest.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testAddJavaDocText2_JavaDocTest.pass,v
 <--  testAddJavaDocText2_JavaDocTest.pass
new revision: 1.3; previous revision: 1.2
done
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testAddJavaDocText_JavaDocTest.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testAddJavaDocText_JavaDocTest.pass,v
 <--  testAddJavaDocText_JavaDocTest.pass
new revision: 1.3; previous revision: 1.2
done
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testChangeJavaDocText_JavaDocTest.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testChangeJavaDocText_JavaDocTest.pass,v
 <--  testChangeJavaDocText_JavaDocTest.pass
new revision: 1.3; previous revision: 1.2
done
Checking in
test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testRemoveJavaDocText_JavaDocTest.pass;
/cvs/java/javacore/test/unit/data/goldenfiles/org/netbeans/jmi/javamodel/codegen/JavaDocTest/testRemoveJavaDocText_JavaDocTest.pass,v
 <--  testRemoveJavaDocText_JavaDocTest.pass
new revision: 1.3; previous revision: 1.2
done
Comment 16 Quality Engineering 2007-09-20 09:58:42 UTC
Reorganization of java component