Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Genmodel Label Feature
Genmodel Label Feature [message #893488] Wed, 04 July 2012 10:44 Go to next message
Matthias N is currently offline Matthias NFriend
Messages: 66
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".

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: Genmodel Label Feature [message #893502 is a reply to message #893488] Wed, 04 July 2012 11:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Matthias,

Comments below.

On 04/07/2012 12:44 PM, 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".
> Is there a way to do it for all elements using a script ?
No, you'd have to write it using Java. Perhaps a object action you can
install in the IDE and apply to the GenModel.
> I don't want to set it by hand because the genmodel has several
> hundred elements.
Do you have so many different features called shortName?
>
> Thanks


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Genmodel Label Feature [message #893503 is a reply to message #893502] Wed, 04 July 2012 11:25 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Matthias,

Maybe doing a global search and replace on the XML using the text editor
will make it easy to do quickly.

On 04/07/2012 1:23 PM, Ed Merks wrote:
> Matthias,
>
> Comments below.
>
> On 04/07/2012 12:44 PM, 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".
>> Is there a way to do it for all elements using a script ?
> No, you'd have to write it using Java. Perhaps a object action you
> can install in the IDE and apply to the GenModel.
>> I don't want to set it by hand because the genmodel has several
>> hundred elements.
> Do you have so many different features called shortName?
>>
>> Thanks
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Genmodel Label Feature [message #893505 is a reply to message #893503] Wed, 04 July 2012 11:30 Go to previous messageGo to next message
Matthias N is currently offline Matthias NFriend
Messages: 66
Registered: June 2012
Member
Yeah maybe I could use a search and replace pattern.
But is there no way using a M2M transformation ?!
Re: Genmodel Label Feature [message #893510 is a reply to message #893505] Wed, 04 July 2012 11:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Matthias,

No doubt you can do some type of M2M thing, but you this isn't the M2M
newsgroup and I don't know how to do that.


On 04/07/2012 1:30 PM, Matthias N wrote:
> Yeah maybe I could use a search and replace pattern.
> But is there no way using a M2M transformation ?!


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Genmodel Label Feature [message #893513 is a reply to message #893510] Wed, 04 July 2012 12:12 Go to previous message
Matthias N is currently offline Matthias NFriend
Messages: 66
Registered: June 2012
Member
okay thanks. I will ask the m2m newsgroup
Previous Topic:[CDO] Migration
Next Topic:Gen. Editor: Change Font Color
Goto Forum:
  


Current Time: Tue Apr 23 09:55:59 GMT 2024

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

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

Back to the top