Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Added GA is not displayed
Added GA is not displayed [message #755546] Tue, 08 November 2011 18:48 Go to next message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
I'm struggling with a strange issue. I have a pi:FixPointAnchor with a horizontal Rectangle, inside that rectangle I have an horizontal line in the middle.
Dynamically (inside a feature, which can be trigger manually) I toggle (add/remove) a small circle inside the Anchor rectangle, above the line.

Everything works ok inside the Diagram hierarchy, the circle is added and saved. But it's not shown. The strange thing is that if I save and reopen the diagram the circle shows ok (I'm working with a model-only format, the diagram is regenerated using the same features that run when I created them).
I even compared (doing a resource save to console in runtime) both Diagrams in memory, the one that has the problem and the reloaded that works ok, and they are identical.
It doesn't seem a refresh problem, ( refreshAll() does not help, nor moving the shape, nothing; it's just as the Draw2d figure doesn't exits or is hidden). Further, the inverse toggle, the deleting of the circle, always works ok (with the circle visible or not).

I tried removing the horizontal line: no changes.
I tried placing the circle in other place (outside the anchor) and it worked.

Any clues? Is there some way to print/debug the draw2d figure tree?

<anchors xsi:type="pi:FixPointAnchor" visible="true" active="true" useAnchorLocationAsConnectionEndpoint="true">
   <graphicsAlgorithm xsi:type="al:Rectangle" background="//@colors.1" lineWidth="1" lineVisible="false" transparency="0.0" width="11" height="9" y="-4">
     <graphicsAlgorithmChildren xsi:type="al:Polyline" foreground="//@colors.3" lineWidth="1" filled="false" transparency="0.0">
       <points x="-1" y="4"/>
       <points x="11" y="4"/>
     </graphicsAlgorithmChildren>

     <graphicsAlgorithmChildren xsi:type="al:Ellipse" background="//@colors.1" lineWidth="1" transparency="0.0" width="6" height="6" x="1" y="1"/>

   </graphicsAlgorithm>
   <link>
     <businessObjects href="platform:/resource/Test3/xxx.fbd#//@body.0/@nodes.0/@connsIn.0"/>
   </link>
   <location y="12"/>
 </anchors>


Update: I've found that, PictogramElementDelegate.createFigureForGraphicsAlgorithm() is not invoked as it should... still debugging...

[Updated on: Tue, 08 November 2011 19:20]

Report message to a moderator

Re: Added GA is not displayed [message #755555 is a reply to message #755546] Tue, 08 November 2011 19:32 Go to previous messageGo to next message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
Update: Ignore what follows in this post Fortunately, I was wrong, it's possible to add GA dinamically. But there seems indeed to be a bug with nested GA inside Anchors. I'll update later.

-------------------------------------------------------------------------------------

Mmmm it seems that

PictogramElementDelegate.createFigureForGraphicsAlgorithm


is only called recursively from the parent GA, which is called by

PictogramElementDelegate.createFigureForPictogramElement


which is called by one of the PE editparts (AnchorEditPart / ConnectionEditPart / ShapeEditPart ) only at the creation of a PE

Hence, if I understood it right, Graphiti only allows to create Pictograms (Shapes/Anchors/Connections) on runtime, not to create GA inside them. Am I right?

If so, I need to rethink some of my design...

I wonder

- If this (to add GAs to an existing already displayed Shape) is prohibited, shouldn't Graphiti strive to detect this (say, marking the "already displayed shapes" as "sealed" or something like that).

- Is it prohibited to add GAs but it's allowed to remove them ? (or it just works by accident).

- What about other changes to GAs?



[Updated on: Wed, 09 November 2011 13:20]

Report message to a moderator

Re: Added GA is not displayed [message #755598 is a reply to message #755555] Tue, 08 November 2011 21:52 Go to previous message
Hernan Gonzalez is currently offline Hernan GonzalezFriend
Messages: 188
Registered: October 2010
Location: Buenos Aires, Argentina
Senior Member
I created an issue: https://bugs.eclipse.org/bugs/show_bug.cgi?id=363229
Previous Topic:GFPropertySection: Control TableViewer height
Next Topic:Eclipse Freezes at "Loading Workbench"
Goto Forum:
  


Current Time: Thu Apr 25 12:23:09 GMT 2024

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

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

Back to the top