Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Best way to automatically change look of editpart
Best way to automatically change look of editpart [message #677408] Wed, 08 June 2011 12:37 Go to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi all,

what is the best way to automatically change the look of an editoart. I have a node which I want to change the look according to properties in the semantic model. Do I need to change the figure of the editpart or shall/can I change the notational model. Is there a third solution that I don't know yet? If I use the notational model is there any documentation available?

Thanks!!!

Ralph
Re: Best way to automatically change look of editpart [message #677410 is a reply to message #677408] Wed, 08 June 2011 12:44 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,

see here: http://wiki.eclipse.org/Graphical_Modeling_Framework/Tips#Making_figures_sensitive_to_attributes_of_semantic_elements

regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: Best way to automatically change look of editpart [message #677415 is a reply to message #677410] Wed, 08 June 2011 13:05 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi Aurelien,

this is what I currently do. It uses the shapes figure. I am quite sucessful by removing and adding elements to the figure. My Problem is that the resizing fails after creating the elment. Neither Setboundscommand nor figure.setSize() work. Do you have any idea what could cause that?

Ralph

[Updated on: Wed, 08 June 2011 13:05]

Report message to a moderator

Re: Best way to automatically change look of editpart [message #677463 is a reply to message #677408] Wed, 08 June 2011 15:17 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Hi,

If your figure is simple and does not have some texts in it that interacts with the model, I think you should have a figure that changes dynamically rather than trying to change anything on the model.

My 2c.
--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/BPM_download.php
Eclipse Community Award 2011: Best Modeling Tool
Re: Best way to automatically change look of editpart [message #677686 is a reply to message #677463] Thu, 09 June 2011 07:01 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

there is no text that interacts with the model. Only the sizing causes trouble. If I want to have it less than 20 pixels on very first element creation (addNotify) it is not resized that small. I can only size it bigger. After the element was created (also the following addNotify calls) the resizing to a smaller size than approx. 20 px. works.

Do you know what is wrong with that?

Ralph
Previous Topic:Cannot create link model for arbitrary nodes
Next Topic:Class diagram meta-model
Goto Forum:
  


Current Time: Thu Apr 25 10:06:02 GMT 2024

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

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

Back to the top