Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363559 - [refactoring] Refactoring doesn't work out of the box for JVM langauges
Summary: [refactoring] Refactoring doesn't work out of the box for JVM langauges
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.1.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-11 03:34 EST by Jan Koehnlein CLA
Modified: 2017-09-19 18:08 EDT (History)
0 users

See Also:
jan: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Koehnlein CLA 2011-11-11 03:34:13 EST
If you create a JVM language as described in the tutorial refactoring does not really work. We should fix this to lower the barrier for newbies.
Comment 1 Jan Koehnlein CLA 2011-11-11 04:51:19 EST
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.
Comment 2 Karsten Thoms CLA 2017-09-19 17:57:58 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 18:08:46 EDT
Closing all bugs that were set to RESOLVED before Neon.0