Summary: | [dom] Need API to control extended source range computation | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> | ||||
Component: | Core | Assignee: | Martin Aeschlimann <martinae> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | enhancement | ||||||
Priority: | P3 | CC: | jeem, martinae | ||||
Version: | 3.1 | ||||||
Target Milestone: | 3.1 M5 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Bug Depends on: | |||||||
Bug Blocks: | 40243 | ||||||
Attachments: |
|
Description
Dirk Baeumer
2004-12-13 12:47:10 EST
Created attachment 16946 [details]
JDT Core patch
Attaching a concrete proposal for how this could be done.
Martin and Dirk, please review.
looks fine to me! +1 Released API additions: ASTRewrite public final void setTargetSourceRangeCompute(TargetSourceRangeComputer computer); public class TargetSourceRangeComputer { public static final class SourceRange { public SourceRange(int startPosition, int length); public int getStartPosition(); public int getLength(); } public TargetSourceRangeComputer(); public SourceRange computeSourceRange(ASTNode node); } Martin, Please add "descriptive" rewrite tests for the new API. Added a first test case ASTRewritingInsertBoundTest.testTargetSourceRangeComputer. Mark bug as fixed Verified in I20050214-0927 |