| Summary: | ASTRewrite.remove deletes too much. | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ajay Patil <apatil> |
| Component: | Core | Assignee: | Martin Aeschlimann <martinae> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | ||
| Version: | 3.1.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Ajay Patil
The AST rewriter uses a heuristic to map comments to nodes. All comments directly preceeding a node (without an empty line) are mapped to the node. As an ASTrewiter client you have the possibility to override the mapping using a TargetSourceRangeComputer. Thank you for the quick reply. I could resolve the problem by overwriding the TargetSourceRangeComputer in ASTRewrite. In fact, this is very well documented in the Javadoc for ASTRewrite. So, I am sorry to have reported this as a bug. Regards, Ajay |