Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to set default values of model elements in GMF based Editor?(How to set default values of model elements in GMF based Editor?)
How to set default values of model elements in GMF based Editor? [message #511000] Fri, 29 January 2010 13:59 Go to next message
SC  is currently offline SC Friend
Messages: 15
Registered: November 2009
Junior Member
Hello,

I have created a Diagram Editor (with palette) using GMF. When I drag a element from palette I want some properties of this element to be set. These default property values will come from ToolEntry of the palette. Please can someone point me to the code where I should change to achieve this. Please let me know if the query is not clear.

Thanks
Re: How to set default values of model elements in GMF based Editor? [message #511016 is a reply to message #511000] Fri, 29 January 2010 14:47 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

I don't understand what you mean by property values coming from ToolEntry.

But you can use "feature seq initializer" to set some properties.

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: How to set default values of model elements in GMF based Editor? [message #511017 is a reply to message #511000] Fri, 29 January 2010 14:50 Go to previous message
Eclipse UserFriend
Originally posted by: murbieta.gpi.com.ar

Hi, it likely can solved using "Feature Seq Initializer". This tool
allows you to set default values to objects properties using OCL.
There is an example at GMF tutorial 2 under section mapping definition.
http://wiki.eclipse.org/GMF_Tutorial_Part_2
Regards



SC escribió:
> Hello,
> I have created a Diagram Editor (with palette) using GMF. When I drag a
> element from palette I want some properties of this element to be set.
> These default property values will come from ToolEntry of the palette.
> Please can someone point me to the code where I should change to achieve
> this. Please let me know if the query is not clear.
> Thanks
Previous Topic: AbstractTransactionalCommand: Undo/Redo does not work
Next Topic:Layout provider: a bottom-up layout?
Goto Forum:
  


Current Time: Thu Mar 28 15:08:16 GMT 2024

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

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

Back to the top