|
Re: Model Refactoring using EMF Refactor [message #639027 is a reply to message #638718] |
Sun, 14 November 2010 21:07 |
Eclipse User |
|
|
|
Originally posted by: arendt.mathematik.uni-marburg.de
Hi Manasa,
The refactoring generation process is triggered from whithin the context
menu of a model element in the tree-based EMF instance editor. For
example: If you want to create a refactoring for an EClass (e.g.
RenameEClass) then open the context menu of an EClass in an arbitrary
model. There you find the EMFRefactor entries. Please select: "Specify
EMF Model Refactoring". Please note that your workspace must have an
eclipse plugin project in-place to generate the refactoring code into.
The video on the website is concerned with the prototype implementation
by Lars Schneider. It does not document the current EMF Refactor version
since EMF Refactor has been developed completely new! By the way: This
is not the official EMF Refactor web site. I think I will remove this
old stuff from the site immediately.
Unfortunately there is no similar documentation of EMF Refactor
available yet. I will do my best on this topic in the rest of 2010...
Regards,
Thorsten
On 12.11.2010 11:33, manasa wrote:
> 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 06:41 |
manasa Messages: 32 Registered: October 2010 |
Member |
|
|
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 08: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.03183 seconds