| Summary: | [refactoring] Refactoring doesn't work out of the box for JVM langauges | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Jan Koehnlein <jan> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Flags: | jan:
juno+
|
| Version: | 2.1.0 | ||
| Target Milestone: | M4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Jan Koehnlein
Three issues had to be fixed 1) The RefactorElementNameFragment has to be executed before the XbaseGeneratorFragment as the latter overrides some bindings 2) The RefactorElementNameFragment needed useJdtRefactoring=true to work 3) The generated IRenameStrategy overrode setInferredJvmElementName() without calling super. Fixes: 1) Changed the default workflow. 2) The RefactorElementNameFragment by default uses the JDT refactoring if the grammar extends Xbase. You can override this with the useJdtRefactoring property. 3) We no longer generate an IRenameStrategy but bind a DefaultJvmModelRenameStrategy which should work fine in most cases. Migration hints: 1) Old workflows will fail as I introduced a final binding in the XbaseGeneratorFragment. I hope this is enough to lead users to move their RefactorElementNameFragment before the XbaseGeneratorFragment. 2) Should work OOTB. 3) The super class AbstractJvmModelRenameStrategy has been deprecated, yielding a warning in the generated RenameStrategy. Deprecation warning tells the user his class is no longer being used. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |