Community
Participate
Working Groups
in BodyDeclaration node, getStartPosition() will include the Javadoc position, if there has one. However, in PackageDeclaration, getStartPosition() didn't include Javadoc position.
Could you please specify the build ID?
Changing this would be an API breakage. * All types of body declarations carry modifiers (and annotations), although they differ in * which modifiers are allowed. Most types of body declarations can carry a * doc comment; Initializer is the only ones that does not. The source range * for body declarations always includes the doc comment if present. Jim, any comment?
It does include javadoc position only for package-info.java compilation unit. Package declaration javadoc comment is ignored for all other units. So, I would say this bug is INVALID
Added the following clarification to the class comment for PackageDeclaration: * Note that the standard AST parser only recognizes a Javadoc comment * immediately preceding the package declaration when it occurs in the * special <code>package-info.java</code> compilation unit (JLS3 7.4.1.1). * The Javadoc comment in that file contains the package description. Fixed in 3.2 builds > N20050723. Updated build notes.
Verified in 3.2M1 (I20050808-2000)