Summary: | DOM/AST: ClassInstanceCreation contains trailing comment | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.0 | ||
Target Milestone: | 2.0 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Dirk Baeumer
2002-03-06 11:27:44 EST
Are you talking about the trailing or the leading comment? I am confused between the title of the message and your notes above. Right now we didn't define yet how to handle trailing and leading comment. It might be a good idea to do it now. Sorry my fault. I am talking about the trailing comment So what is the general behavior that we want for the trailing comment? Never included? This PR won't be fixed until I exactly know what to do about trailing comments. In general, both leading and trailing comments should always be omitted. The source range for a node should extend from the first character of the first non-comment, non-whitespace token through the last character of the last non-comment, non-whitespace token corresponding to that construct. This range would allow the client to do consistent highlighting and character range replacements. The only exceptions should be: - Javadoc comments for class, interface, field, method, and constructor declarations. These should be included in the source range for the major declaration; the source range for the declaration should begin with the first character of the opening "/**". - (debatable) one or more comments immediately preceding a statement This can be expensive. Removing trailing and leading comment in an expression means that for all expression I have scan again its source in order to set the proper positions. I found the problem only for message sends and allocation expression. Fixed and released in HEAD. |