| Summary: | [refactoring] CompilationUnitRewrite silently fails with multiple createChange calls | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Tobias Widmer <tobias_widmer> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.1 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
|
Description
Tobias Widmer
Markus, something we should look at in 3.2 I don't know whether removing text edits from the groups is a good idea, since this could invalidate existing changes in a subtle way. Tobias, could you please outline why you need to call createChange() twice, such that your context is not lost when we get to this bug again in 3.2. I am not saying that multiple calls to createChange() should make sense. All I am saying is that we either should disallow multiple calls by throwing an exception (preferred) or make sure either the text edit groups are emptied or cloned on subsequent calls to createChange(). Cloning text edit groups will not work, since clients pass them to the ASTRewrite, and the edits generated by ASTRewrite.rewriteAST(..) will not be linked properly then. So, the way to go is javadocing (and maybe preventing) multiple calls to createChange(). This is probably also a problem when ASTRewrite#rewriteAST(..) is called multiple times and the edits are executed in between. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |