[SOLVED] Problem to show a XML hierarchy of objects using GEF [message #531580] |
Wed, 05 May 2010 13:23 |
Alexandre Messages: 4 Registered: May 2010 |
Junior Member |
|
|
Hello
I'm new to GEF and I'm trying to show a hierarchy of objects whose are loaded from a XML file (I put an example of my XML file in the end of the post).
In this hierarchy I have only two kinds of objects (KIND_ONE and KIND_TWO).
I've created a org.eclipse.draw2d.Figure and an org.eclipse.draw2d.EditPart for KIND_ONE and a ...Figure and ...EditPart for KIND_TWO.
The XML is loading ok and the EditParts and Figures are also being created ok.
The KIND_ONE figure is using a BorderLayout as it contains sub-elements.
THE PROBLEM: While "rendering" this hierarchical structure only the elements 10,11,12,13 and 14 (the last ones of the hierarchy) are rendered. But if I use the FlowLayout or the ToolbarLayout all the elements are rendered but not as I would like to show them.
I've spent three days trying many things and reading tutorials and I didn't find any solution.
Any help is apreciated.
Thanks,
Alexandre.
I'm using:
Eclipse 3.4.2
GEF 3.5.1
Classes:
ScrollingGraphicalViewer
ScalableRootEditPart
AbstractGraphicalEditPart
Figure
My XML file:
<XML>
<KIND_ONE ID="1">
<KIND_ONE ID="2">
<KIND_ONE ID="3">
</KIND_ONE>
<KIND_TWO ID="4"/>
<KIND_ONE ID="5">
</KIND_ONE>
<KIND_TWO ID="6"/>
<KIND_ONE ID="7">
</KIND_ONE>
<KIND_TWO ID="8"/>
</KIND_ONE>
</KIND_TWO ID="9">
<KIND_ONE ID="10">
<KIND_ONE ID="11">
</KIND_ONE>
<KIND_TWO ID="12"/>
</KIND_ONE>
<KIND_TWO ID="13"/>
</KIND_ONE>
<KIND_TWO ID="14"/>
</XML>
[Updated on: Fri, 07 May 2010 10:02] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02500 seconds