Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EOL Access emf.genmodel
EOL Access emf.genmodel [message #766817] Fri, 16 December 2011 08:41 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing name
Messages: 130
Registered: November 2011
Senior Member
Hello,

during customization of my Editor i tried to edit my emf.genmodel.
Is this possible ?

In which file ?

The Tutorial don't mention this anywhere.
I want to edit the 'PropertyType' of an attribute.

Maybe someone has an example ?
Re: EOL Access emf.genmodel [message #766880 is a reply to message #766817] Fri, 16 December 2011 10:39 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
Registered: January 2010
Senior Member
Hi Snakebyte,

You can use a polishing transformation for that as well. For polishing the ECore GenModel, you should add an EOL file named "Ecore2GenModel.eol" to the directory with your models.

Cheers,
Antonio
Re: EOL Access emf.genmodel [message #766917 is a reply to message #766880] Fri, 16 December 2011 11:42 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing name
Messages: 130
Registered: November 2011
Senior Member
Great thanks.

I can access my Feature like this :

var test = Ecore!EAttribute.all.selectOne(as|as.name="Strategy");
//System.out.println(test);
var getgen = GenModel!GenFeature.all.selectOne(as|as.ecoreFeature=test);
System.out.println(getgen.property);
getgen.property = GenPropertyKind.Readonly;


But the last line fails.
How can i access the Enumration and set the property accordingly ?
Re: EOL Access emf.genmodel [message #767268 is a reply to message #766917] Sat, 17 December 2011 08:54 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing name
Messages: 130
Registered: November 2011
Senior Member
no ideas?
i searched for a while, but i cant find the correct syntax.
Re: EOL Access emf.genmodel [message #767278 is a reply to message #767268] Sat, 17 December 2011 09:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 835
Registered: July 2009
Senior Member
Off the top of my head, I suspect it should be GenModel!GenPropertyKind#Readonly

Cheers,
Dimitris
Re: EOL Access emf.genmodel [message #767301 is a reply to message #767278] Sat, 17 December 2011 10:55 Go to previous message
Snakebyte Missing name is currently offline Snakebyte Missing name
Messages: 130
Registered: November 2011
Senior Member
It is. Thanks.
Previous Topic:EOL Change attribute 'external' of DiagramLabel
Next Topic:[Eugenia] Execute code when property of a node is changed
Goto Forum:
  


Current Time: Fri Aug 22 09:48:46 EDT 2014

Powered by FUDForum. Page generated in 0.02132 seconds