Model Refactoring using EMF Refactor [message #638718] |
Fri, 12 November 2010 05:33  |
Eclipse User |
|
|
|
Hi,
I am trying to refactor ECore model using EMF Refactor Project.
I have all the required plugins for refactor and I get the EMF Refactor in my context menu.
But I am unable to find the EMF Model Transformation wizard in my File->New menu.
I am trying to follow the steps shown in the sample video in the link below.
https://www.mathematik.uni-marburg.de/~swt/modref/
Do I need any other additional plugins apart from the ones given below for the refactoring to work?
org.eclipse.emf.refactor.henshin
org.eclipse.emf.refactor.generator
org.eclipse.emf.refactor.runtime
org.eclipse.emf.refactor.common.
Regards,
Manasa
|
|
|
|
Re: Model Refactoring using EMF Refactor [message #639051 is a reply to message #639027] |
Mon, 15 November 2010 01:41   |
Eclipse User |
|
|
|
Thanks for the reply.
I was not aware that this is the older version of EMF Refactor.Thanks for the updates.
Refactor menu items appear in the model, with 2 submenus,
1.Specify EMF Model Refactoring using Henshin
2.Specify EMF Refactoring
While using option 1, I am asked for a transformation file.
But I have no transformation file created in my workspace.
While using Option 2, I am asked to add a parameter, I assume this is the model attribute of the corresponding eObject I want to refactor.
Proceeding with the same, I see code generation happening, but empty classes are generated.
Could any comment if I missing any pre-requisites to perform refactoring.
Also is there any other documentation, which mentions how to use the new version of Refactoring.
Thanks in advance,
Regards,
Manasa
|
|
|
Re: Model Refactoring using EMF Refactor [message #639076 is a reply to message #639051] |
Mon, 15 November 2010 03:07  |
Eclipse User |
|
|
|
Originally posted by: arendt.mathematik.uni-marburg.de
Hi Manasa,
>
> While using Option 2, I am asked to add a parameter, I assume this is
> the model attribute of the corresponding eObject I want to refactor.
These are the parameters of the refactoring you want to create (for
example, 'newname' for refactoring 'RenameEClass').
> Proceeding with the same, I see code generation happening, but empty
> classes are generated.
That's right. Now, you have to specify your new refactoring!
You get the contextual element by, for example:
'EClass ecl = (EClass)
dataManagement.getInPortByName("selectedEObject").getValue();'
Other parameters you get by, for example:
'String newname = (String)
dataManagement.getInPortByName("newname").getValue();'
Then you can specify the refactoring (initial check, final check, and run).
For the example 'Rename EClass':
'ecl.setName(newname);'
>
> Could any comment if I missing any pre-requisites to perform refactoring.
If you want to perform a refactoring you have to deploy your plug-in.
Then, open the context menu on the model element, you want to refactor,
and select 'EMF model refactorings'. Here, you will see your created
refactoring.
> Also is there any other documentation, which mentions how to use the new
> version of Refactoring.
No, unfortunately not, as I wrote yesterday.
Regards,
Thorsten
|
|
|
Powered by
FUDForum. Page generated in 0.14765 seconds