Project: JDT
Bug 80839 [dom] Need API to control extended source range computation
Reported: 2004-12-13 12:47:10 | Status: verified fixed

I20041208 I have started to get rid of the OldASTrewrite however the old version gave me some control over the extended source range used when replacing/deleting nodes. Some refactorings (extract method, surround with try catch) are selection based and the refactoring should honor the selection. For example if a user selects a bunch of method calls with comments and calls extract method all the methods including the comments should be move to the new method even if the extended source range for the call doesn't contain the comments. To achieve this I porpose the following: - the ASTRewrite allows me to set an IExtendedSourceRangeComputer - if present the computation is forwared to this instance - if null is returned the standard extended source range is used.

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ReplaceRewrite.java