GMF Palette Divison [message #1018891] |
Thu, 14 March 2013 16:19 |
serhat gezgin Messages: 243 Registered: January 2013 Location: Izmir |
Senior Member |
|
|
Hi all,
i want to palette division with .eol. But i dont know how can i do this. I search for
examples but can't find. So someone can help me for this ?
var toolGroupObjects = GmfTool!ToolGroup.all.selectOne(r|r.title = 'Objects');
toolGroupObjects.title='Nodes';
var newToolGroup = new GmfTool!ToolGroup;
newToolGroup.title='Fields';
toolGroupObjects.tools.add(newToolGroup);
i tried this code but not work And how can i add image to palette with .eol ?
Regards
[Updated on: Thu, 14 March 2013 17:25] Report message to a moderator
|
|
|
|
Re: GMF Palette Divison [message #1019038 is a reply to message #1019024] |
Thu, 14 March 2013 23:25 |
serhat gezgin Messages: 243 Registered: January 2013 Location: Izmir |
Senior Member |
|
|
Hi,
i get;
"The opposite features 'palette' of 'Tool Group Fields' and 'groups' of 'Palette contentmodel.diagram.part' do not refer to each other"
error.
and my code is;
var toolGroupObjects = GmfTool!ToolGroup.all.selectOne(r|r.title = 'Objects');
toolGroupObjects.title='Nodes';
var newToolGroup = new GmfTool!ToolGroup;
newToolGroup.title='Fields';
var booleanField = getGroupObject('Boolean');
newToolGroup.tools.add(booleanField);
toolGroupObjects.tools.add(newToolGroup);
operation getGroupObject(title : String) : GmfTool!AbstractTool {
return GmfTool!AbstractTool.all.selectOne(t|t.title=title);
}
[Updated on: Thu, 14 March 2013 23:26] Report message to a moderator
|
|
|
|
|
Re: GMF Palette Divison [message #1019469 is a reply to message #1019348] |
Fri, 15 March 2013 18:58 |
|
Sorry, but I can't see where in your code newToolGroup is bound to any palette:
var newToolGroup = new GmfTool!ToolGroup;
newToolGroup.title='Fields';
// ...
toolGroupObjects.tools.add(newToolGroup);
I would advise you to first modify the GMFTool model manually, and when you're sure of all the changes involved, automate them using EOL. It's usually better this way, since if you run into any issues with the manually changed model you will be able to get better help from the GMF experts at the GMF forum .
|
|
|
Powered by
FUDForum. Page generated in 0.05421 seconds