Skip to main content


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 13:41 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
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 15:39 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
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 16:42 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
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 13:54 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
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 14:26 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2162
Registered: July 2009
Location: York, UK
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 15:55 Go to previous message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
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: Tue Apr 16 05:41:02 GMT 2024

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

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

Back to the top