Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » M2M for genmodel
M2M for genmodel [message #893514] Wed, 04 July 2012 12:14 Go to next message
Matthias N is currently offline Matthias N
Messages: 65
Registered: June 2012
Member
Hi,

I have generated my genmodel out of the Ecore.

The attribute "Label Feature" is set to "name:EString" by default.
But I want it to be another attribute, e.g. "shortName:EString". This would simply imply: change from "name:EString" to "shortName:EString"

Is there a way to do it for all elements using a script ? I don't want to set it by hand because the genmodel has several hundred elements.

Thanks
Re: M2M for genmodel [message #893519 is a reply to message #893514] Wed, 04 July 2012 12:31 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi

A genmodel is a model so of course an M2M is possible.

The change is very regular, so I suspect that a simple text editor
search and replace might work.

But, the genmodel derives the label feature automatically. You might be
able to adjust your Ecore model so that genmodel is correct in the first
place.

Regards

Ed Willink

On 04/07/2012 13:14, Matthias N wrote:
> Hi,
>
> I have generated my genmodel out of the Ecore.
>
> The attribute "Label Feature" is set to "name:EString" by default.
> But I want it to be another attribute, e.g. "shortName:EString". This
> would simply imply: change from "name:EString" to "shortName:EString"
>
> Is there a way to do it for all elements using a script ? I don't want
> to set it by hand because the genmodel has several hundred elements.
>
> Thanks
Re: M2M for genmodel [message #894485 is a reply to message #893519] Mon, 09 July 2012 11:59 Go to previous messageGo to next message
Matthias N is currently offline Matthias N
Messages: 65
Registered: June 2012
Member
Ed Willink wrote on Wed, 04 July 2012 08:31
Hi

A genmodel is a model so of course an M2M is possible.

The change is very regular, so I suspect that a simple text editor
search and replace might work.

But, the genmodel derives the label feature automatically. You might be
able to adjust your Ecore model so that genmodel is correct in the first
place.

Regards

Ed Willink

On 04/07/2012 13:14, Matthias N wrote:
> Hi,
>
> I have generated my genmodel out of the Ecore.
>
> The attribute "Label Feature" is set to "name:EString" by default.
> But I want it to be another attribute, e.g. "shortName:EString". This
> would simply imply: change from "name:EString" to "shortName:EString"
>
> Is there a way to do it for all elements using a script ? I don't want
> to set it by hand because the genmodel has several hundred elements.
>
> Thanks


I really need to change the genmodel. Text search & replace won't work either.
Which technology would you recommend for the M2M transformation ?
Re: M2M for genmodel [message #894489 is a reply to message #894485] Mon, 09 July 2012 12:22 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4097
Registered: July 2009
Senior Member
Hi

The MMT home page
http://www.eclipse.org/projects/project.php?id=modeling.mmt lists
available Eclipse M2M tools.

Since your change is very small you want something that facilitates a
copy by default; I think ATL may have this.

Regards

Ed Willink


On 09/07/2012 12:59, Matthias N wrote:
> Ed Willink wrote on Wed, 04 July 2012 08:31
>> Hi
>>
>> A genmodel is a model so of course an M2M is possible.
>>
>> The change is very regular, so I suspect that a simple text editor
>> search and replace might work.
>>
>> But, the genmodel derives the label feature automatically. You might
>> be able to adjust your Ecore model so that genmodel is correct in the
>> first place.
>>
>> Regards
>>
>> Ed Willink
>>
>> On 04/07/2012 13:14, Matthias N wrote:
>> > Hi,
>> >
>> > I have generated my genmodel out of the Ecore.
>> >
>> > The attribute "Label Feature" is set to "name:EString" by default.
>> > But I want it to be another attribute, e.g. "shortName:EString".
>> This > would simply imply: change from "name:EString" to
>> "shortName:EString"
>> >
>> > Is there a way to do it for all elements using a script ? I don't
>> want > to set it by hand because the genmodel has several hundred
>> elements.
>> >
>> > Thanks
>
>
> I really need to change the genmodel. Text search & replace won't work
> either.
> Which technology would you recommend for the M2M transformation ?
Previous Topic:Apply a profile to UML model
Next Topic:[ATL] Unresolved cross-reference... Again
Goto Forum:
  


Current Time: Sat Oct 25 07:22:37 GMT 2014

Powered by FUDForum. Page generated in 0.01661 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software