Problems with visibility of attributes [message #493475] |
Mon, 26 October 2009 13:05 |
Eclipse User |
|
|
|
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 |
Alex Shatalin 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03494 seconds