Community
Participate
Working Groups
public class A{ void f(){ /*[*/class AA extends A { }/*]*/ } } - source start is 36 which is ok, but source end is 65 which includes the /*]*/ comment.
In which case do you want to the trailing comment to be part of the declaration of a type? Never? Only when it is a javadoc comment? The management of comments in general is not implementing yet in the new AST world except for the javadoc comment in front of types, methods, initializers and fields.
I change this in the DOM/AST API. Now no method declarations, field declarations, initializers, type declarations, import declarations or package declarations include the trailing comment. Please confirm this is the behavior you expect. It is specified that way in the DON/AST API.
Fixed and released in HEAD.
Confirm that this is the expected behaviour