Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » EOL Change attribute 'external' of DiagramLabel
EOL Change attribute 'external' of DiagramLabel [message #766305] Thu, 15 December 2011 14:27 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing name
Messages: 130
Registered: November 2011
Senior Member
Hello,

i created a Model and an Editor in Eugenia.
Now i want to customize this Editor in EOL.

And it works really great for now.
Im using the EPackageRegistry View for getting the right attributes etc.

Now i want to add a new DiagramLabel to Canvas. And i do it like that in my ECore2GMF.eol file :

var masterModule = GmfGraph!Canvas.all.selectOne(as|as.name="Model");
var label = new GmfGraph!DiagramLabel;
label.name = "StrategyLabelContext";
label.elementIcon = false;
label.figure = GmfGraph!FigureDescriptor.all.selectOne(as|as.name="StrategyFigure");
//label.external = false;
masterModule.labels.add(label);


This works great. The Label is added and all the attributes set correctly, except for one. The external attribute.
I tried it like above. But the generation always told me that 'external' is an unsetable feature. And in the EPackageRegistry View it is written in italic.
Does that mean that it is unchangable ?
Do i have to do set it during the construction of my DiagramLabel 'label'?
Can somnebody give me some code examples, on how to set it to true in EOL ?

[Updated on: Thu, 15 December 2011 14:28]

Report message to a moderator

Re: EOL Change attribute 'external' of DiagramLabel [message #766308 is a reply to message #766305] Thu, 15 December 2011 14:37 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 867
Registered: July 2009
Senior Member
Hi,

You guessed right: external is a computed/derived property. This may help:

http://grepcode.com/file/repository.grepcode.com/java/eclipse.org/3.5/org.eclipse.gmf/graphdef/2.0.100/org/eclipse/gmf/gmfgraph/impl/DiagramLabelImpl.java#DiagramLabelImpl.isExternal%28%29

Cheers,
Dimitris
Re: EOL Change attribute 'external' of DiagramLabel [message #766323 is a reply to message #766308] Thu, 15 December 2011 14:57 Go to previous message
Snakebyte Missing name is currently offline Snakebyte Missing name
Messages: 130
Registered: November 2011
Senior Member
Big thanks !
Previous Topic:EOL get workspace directory
Next Topic:EOL Access emf.genmodel
Goto Forum:
  


Current Time: Fri Sep 19 20:07:43 GMT 2014

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

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