Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Problems with visibility of attributes
Problems with visibility of attributes [message #493475] Mon, 26 October 2009 13:05 Go to next message
Eclipse UserFriend
Originally posted by: Andreas.Svendsen.sintef.no

Hi,

I am creating a graphical editor using GMF. In this editor I have nodes with
attributes and links. The attributes are of different types (model
elements), represented by Diagram Labels with a shared Figure Descriptor.
The nodes contains a compartment to store the attributes.

Everything works fine when the diagram is created. However, the problem
arises when eclipse is closed and opened again. When the diagram is then
opened, the attributes are not visible. Furthermore, if I add a new
attribute to the node, the previous attributes in that node pops up. If I
then re-open the diagram (even without saving), all attributes are visible.
All attributes are then visible until I close/open eclipse again. This
behaviour is also cross-diagrams; making attributes visible in one diagram
will also affect the other diagrams of the same kind.

I have tried to add refresh algorithms to the nodes when the diagram is
opened, but without any luck. I might be looking at the working place
though.

If anybody has experienced this kind of behaviour, or have any kind of
suggestions, I would appreciate it.

Thank you.


Best Regards,

Andreas
Re: Problems with visibility of attributes [message #495126 is a reply to message #493475] Tue, 03 November 2009 21:01 Go to previous messageGo to next message
Alex Shatalin is currently offline Alex ShatalinFriend
Messages: 141
Registered: July 2009
Senior Member
Hello Andreas,

This is known problem. To correct it you have to modify plugin.xml for the
generated diagram editor plugin and remove (comment out) context constraints
generated for view provider like:

<context viewClass="org.eclipse.gmf.runtime.notation.Node" containerViews="referencing-diagrams"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="Ecore"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints=" 2001,2002,2003,2004,2005,3001,3002,3003,3004,3005,3006,3007, 3008,3009 "/>
<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="4001,4002,4003,4004"/>

-----------------
Alex Shatalin
Re: Problems with visibility of attributes [message #495265 is a reply to message #495126] Wed, 04 November 2009 12:38 Go to previous message
Eclipse UserFriend
Originally posted by: Andreas.Svendsen.sintef.no

Thanks Alex.

I commented out the context constraints, as you mentioned, and it worked
perfectly.

Cheers,

Andreas
Previous Topic:Problem with Custom Decorations in newer versions of GMF
Next Topic:Editpart Selection and Focus on pressing Ctrl+Click
Goto Forum:
  


Current Time: Fri Sep 20 12:19:19 GMT 2024

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

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

Back to the top