Bug 8145 - TypeDeclaration sourceEnd contains trailing comment
Summary: TypeDeclaration sourceEnd contains trailing comment
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-23 10:40 EST by Dirk Baeumer CLA
Modified: 2002-02-11 06:39 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Baeumer CLA 2002-01-23 10:40:12 EST
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.
Comment 1 Olivier Thomann CLA 2002-01-31 12:00:45 EST
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.
Comment 2 Olivier Thomann CLA 2002-01-31 13:57:37 EST
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. 
Comment 3 Olivier Thomann CLA 2002-01-31 17:19:11 EST
Fixed and released in HEAD.
Comment 4 Dirk Baeumer CLA 2002-02-01 10:52:41 EST
Confirm that this is the expected behaviour