Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » GMF Palette Divison
GMF Palette Divison [message #1018891] Thu, 14 March 2013 16:19 Go to next message
serhat gezgin is currently offline serhat gezgin
Messages: 240
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 Sad 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 #1019024 is a reply to message #1018891] Thu, 14 March 2013 22:43 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 309
Registered: January 2010
Senior Member
Hi serhat,

Could you please elaborate on how it does not work? Does it produce an error, or does it not produce the results you expected?
Re: GMF Palette Divison [message #1019038 is a reply to message #1019024] Thu, 14 March 2013 23:25 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezgin
Messages: 240
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 #1019255 is a reply to message #1019038] Fri, 15 March 2013 10:22 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 309
Registered: January 2010
Senior Member
That's probably a validation error from GMF. It's basically saying that you forgot to assign your new tool group to the palette.

[Updated on: Fri, 15 March 2013 10:22]

Report message to a moderator

Re: GMF Palette Divison [message #1019348 is a reply to message #1019255] Fri, 15 March 2013 13:57 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezgin
Messages: 240
Registered: January 2013
Location: Izmir
Senior Member
Hi,

But 'toolGroupObjects' already binded to pallette and i want to create

sub tool group to 'toolGroupObjects'. Why i get this error dont understand Sad
Re: GMF Palette Divison [message #1019469 is a reply to message #1019348] Fri, 15 March 2013 18:58 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 309
Registered: January 2010
Senior Member
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 Smile.
Previous Topic:EWL UserPrompt
Next Topic:EVL integration with EWL
Goto Forum:
  


Current Time: Tue Oct 21 07:16:42 GMT 2014

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

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