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 12:19 Go to next message
serhat gezgin is currently offline serhat gezgin
Messages: 237
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 13:25]

Report message to a moderator

Re: GMF Palette Divison [message #1019024 is a reply to message #1018891] Thu, 14 March 2013 18:43 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
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 19:25 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezgin
Messages: 237
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 19:26]

Report message to a moderator

Re: GMF Palette Divison [message #1019255 is a reply to message #1019038] Fri, 15 March 2013 06:22 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
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 06:22]

Report message to a moderator

Re: GMF Palette Divison [message #1019348 is a reply to message #1019255] Fri, 15 March 2013 09:57 Go to previous messageGo to next message
serhat gezgin is currently offline serhat gezgin
Messages: 237
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 14:58 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-Dominguez
Messages: 304
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: Sun Aug 31 04:42:04 EDT 2014

Powered by FUDForum. Page generated in 0.02305 seconds