Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Polyline / Polygon not being shown in the Diagram
Polyline / Polygon not being shown in the Diagram [message #223076] Sat, 28 March 2009 10:29 Go to next message
Eclipse UserFriend
Originally posted by: nottake.gmail.com

Hello.

I'm dealing with the following problem. I have a rectangle with a
BorderLayout. Inside this rectangle I place two children Rectangles: One at
CENTER and another one at the BOTTOM. The first one contains a label and
works correctly. The second one has a GridLayout, to include another
Rectangle aligned at the center. All this is working well and I can see all
of them, outline=true so I could check the were being drawn, but
fill=false. This new Rectangle has a StackLayout an includes a Polyline that
doesn't show up when I open the Diagram. I debugged the code and the
Polyline is created, but I can't see it. I tried to place a Polygon and the
I got the same problem. But if I place an ellipse or another rectangle
instead, then I can see them.

Using the same Polyline in another simple figure that just contains a
Rectangle with a StackLayout and then the Polyline, it is working. So i've
been trying to see if this is something related to the BorderLayout or
GridLayout, but no success.

Has anyone already dealt with a similar problem or knows what's going wrong?

Below I paste the definition in the .gmfgraph:

....
descriptors

name="NamedRoundedRectangle">

<actualFigure

xsi:type="gmfgraph:RoundedRectangle"

name="NamedRoundedRectangle"

lineWidth="2">

<layout

xsi:type="gmfgraph:BorderLayout"/>

<minimumSize

dx="80"

dy="40"/>

<preferredSize

dx="80"

dy="40"/>

<children

xsi:type="gmfgraph:Rectangle"

name="NameArea"

outline="false"

fill="false">

<layoutData

xsi:type="gmfgraph:BorderLayoutData"

vertical="true"/>

<layout

xsi:type="gmfgraph:StackLayout"/>

<children

xsi:type="gmfgraph:Label"

name="Name">

</children>

</children>

<children

xsi:type="gmfgraph:Rectangle"

name="RectanguloInferior"

outline="false"

fill="false">

<layoutData

xsi:type="gmfgraph:BorderLayoutData"

alignment="END"

vertical="true"/>

<layout

xsi:type="gmfgraph:GridLayout"/>

<children

xsi:type="gmfgraph:Rectangle"

name="Contenedor"

outline="false"

fill="false">

<layoutData

xsi:type="gmfgraph:GridLayoutData"

grabExcessHorizontalSpace="true"/>

<layout

xsi:type="gmfgraph:StackLayout"/>

<minimumSize

dx="14"

dy="14"/>

<preferredSize

dx="14"

dy="14"/>

<children

xsi:type="gmfgraph:Polyline"

name="Line">

<template/>

<template

x="10"

y="5"/>

</children>



</children>

</children>

</actualFigure>

<accessors

figure=" //@figures.0/@descriptors.0/@actualFigure/@children.0/@child ren.0 "/>

</descriptors>
Re: Polyline / Polygon not being shown in the Diagram [message #223108 is a reply to message #223076] Sat, 28 March 2009 12:04 Go to previous message
Arij is currently offline ArijFriend
Messages: 40
Registered: July 2009
Member
Hello Thomas
I had the same problem with Polygon Figure,and i resolve this problem in
the following way:

After generated code ,in the generated
*.diagram.edit.parts.ResourceEditPart$ResourceFigure class(the name of
your figure descreptor), set the attribute private boolean
myUseLocalCoordinates = true; You might want to set the comment above it
to @generated NOT in order to preserve this change. With that, set the
fill(true) method on the polygon in the generated figure code, as it seems
otherwise to not be filled.
Previous Topic:EMF GMF integration - Opening the Diagram editors from a doubleclik on the Selection Tree
Next Topic:EMF GMF - opening an editor : IEdtorInput
Goto Forum:
  


Current Time: Sat Nov 02 20:03:40 GMT 2024

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

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

Back to the top