Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; fr; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 Build Identifier: M20080911-1700 Hi all In org.eclipse.jdt.core.dom, I found a mistake in the API documentation CatchClause, MethodDeclaration and EnhancedForStatement doc headings are refeering in their headings to FormalParameter ASTNode which did not exist. In place the accessors say that it is SingleVariableDeclaration Another detail is that: the doc heading of TypeDeclaration refers to Classdeclaration and InterfaceDeclaration which contains some *BodyDeclarations. But there is nothing to get/set the Interface/Class BodyDeclaration, the getters are getFields/getMethods. Hoping it helps, regards Reproducible: Always
> In org.eclipse.jdt.core.dom, I found a mistake in the API documentation > CatchClause, MethodDeclaration and EnhancedForStatement doc headings are > refeering in their headings to FormalParameter ASTNode which did not exist. > In place the accessors say that it is SingleVariableDeclaration These sections of AST node Javadocs refer to the grammar in the Java Language Specification (JLS2 and JLS3). Some node classes have been named after the nonterminals in the grammar, but there's no 1:1 mapping between the grammar and the AST node types. > Another detail is that: the doc heading of TypeDeclaration refers to > Classdeclaration and InterfaceDeclaration which contains some > *BodyDeclarations. > But there is nothing to get/set the Interface/Class BodyDeclaration, the > getters are getFields/getMethods. See AbstractTypeDeclaration#bodyDeclarations() in the super class.
(In reply to comment #1) > These sections of AST node Javadocs refer to the grammar in the Java Language > Specification (JLS2 and JLS3). Some node classes have been named after the > nonterminals in the grammar, but there's no 1:1 mapping between the grammar and > the AST node types. In this we should refrain from referencing directly grammar rules, but rather reference the correspoding ASTNode. At least it should be clear when the reference concerns a node class name or a grammar rule name.
Created attachment 161128 [details] Proposed fix
Released for 3.6M6.
Verified for 3.6M6 by code inspection (Javadoc)