Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Reading diagram informations using GMF API
Reading diagram informations using GMF API [message #469958] Thu, 19 April 2007 08:33 Go to next message
Philippe is currently offline PhilippeFriend
Messages: 100
Registered: July 2009
Senior Member
Hi,

I'm reading a saved file example.umlclass_diagram in Java/Eclipse3.3M6.
I'm using the interfaces from org.eclipse.gmf.runtime.notation and it
goes pretty well.
But when reading LayoutConstraints on a node that is a UML Class the
getHeight() and getWidth() methods return always -1 and not the value
from the XMI file.
<layoutConstraint xmi:type="notation:Bounds"
xmi:id="_oVeGZe5KEdu4M7x4CSjD-A" x="72" y="108" width="169" height="181"/>

On the other hand, getX and getY methods are OK.
I don't know if the problem come from gmf or uml2tools or from me ;).

Any idea ?

Philippe
Re: Reading diagram informations using GMF API [message #469963 is a reply to message #469958] Mon, 23 April 2007 11:50 Go to previous messageGo to next message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hello Philippe,

Well, it is strange enough. While the diagram is being reopened, it uses
the both coordinates and size of constraint to place the figure.
As you may check, the editpart's that were explicitly set to be very big
remain very big after reopening of the diagram :).
So, the problem is most probably somewhere in your script.

Could you provide some representative details of it?

Regards,
Michael


> Hi,
>
> I'm reading a saved file example.umlclass_diagram in
> Java/Eclipse3.3M6.
> I'm using the interfaces from org.eclipse.gmf.runtime.notation and it
> goes pretty well.
> But when reading LayoutConstraints on a node that is a UML Class the
> getHeight() and getWidth() methods return always -1 and not the value
> from the XMI file.
> <layoutConstraint xmi:type="notation:Bounds"
> xmi:id="_oVeGZe5KEdu4M7x4CSjD-A" x="72" y="108" width="169"
> height="181"/>
> On the other hand, getX and getY methods are OK.
> I don't know if the problem come from gmf or uml2tools or from me ;).
> Any idea ?
>
> Philippe
>
Re: Reading diagram informations using GMF API [message #469965 is a reply to message #469963] Mon, 23 April 2007 12:11 Go to previous message
Philippe is currently offline PhilippeFriend
Messages: 100
Registered: July 2009
Senior Member
Hi Michael,

I relaunched my program and now it works ???
It seems I was too tired last week to correctly read my output.
Sorry to have bothered you.
The -1 came only for the node with default size,
so I have a true question this time,
how to find the height and width of a Node with default sizing ?

Regards,
Philippe

Michael Golubev wrote:
> Hello Philippe,
>
> Well, it is strange enough. While the diagram is being reopened, it uses
> the both coordinates and size of constraint to place the figure. As you
> may check, the editpart's that were explicitly set to be very big remain
> very big after reopening of the diagram :). So, the problem is most
> probably somewhere in your script.
> Could you provide some representative details of it?
> Regards,
> Michael
>
>
>> Hi,
>>
>> I'm reading a saved file example.umlclass_diagram in
>> Java/Eclipse3.3M6.
>> I'm using the interfaces from org.eclipse.gmf.runtime.notation and it
>> goes pretty well.
>> But when reading LayoutConstraints on a node that is a UML Class the
>> getHeight() and getWidth() methods return always -1 and not the value
>> from the XMI file.
>> <layoutConstraint xmi:type="notation:Bounds"
>> xmi:id="_oVeGZe5KEdu4M7x4CSjD-A" x="72" y="108" width="169"
>> height="181"/>
>> On the other hand, getX and getY methods are OK.
>> I don't know if the problem come from gmf or uml2tools or from me ;).
>> Any idea ?
>>
>> Philippe
>>
>
>
Re: Reading diagram informations using GMF API [message #587446 is a reply to message #469958] Mon, 23 April 2007 11:50 Go to previous message
Michael Golubev is currently offline Michael GolubevFriend
Messages: 383
Registered: July 2009
Senior Member
Hello Philippe,

Well, it is strange enough. While the diagram is being reopened, it uses
the both coordinates and size of constraint to place the figure.
As you may check, the editpart's that were explicitly set to be very big
remain very big after reopening of the diagram :).
So, the problem is most probably somewhere in your script.

Could you provide some representative details of it?

Regards,
Michael


> Hi,
>
> I'm reading a saved file example.umlclass_diagram in
> Java/Eclipse3.3M6.
> I'm using the interfaces from org.eclipse.gmf.runtime.notation and it
> goes pretty well.
> But when reading LayoutConstraints on a node that is a UML Class the
> getHeight() and getWidth() methods return always -1 and not the value
> from the XMI file.
> <layoutConstraint xmi:type="notation:Bounds"
> xmi:id="_oVeGZe5KEdu4M7x4CSjD-A" x="72" y="108" width="169"
> height="181"/>
> On the other hand, getX and getY methods are OK.
> I don't know if the problem come from gmf or uml2tools or from me ;).
> Any idea ?
>
> Philippe
>
Re: Reading diagram informations using GMF API [message #587459 is a reply to message #469963] Mon, 23 April 2007 12:11 Go to previous message
Philippe is currently offline PhilippeFriend
Messages: 100
Registered: July 2009
Senior Member
Hi Michael,

I relaunched my program and now it works ???
It seems I was too tired last week to correctly read my output.
Sorry to have bothered you.
The -1 came only for the node with default size,
so I have a true question this time,
how to find the height and width of a Node with default sizing ?

Regards,
Philippe

Michael Golubev wrote:
> Hello Philippe,
>
> Well, it is strange enough. While the diagram is being reopened, it uses
> the both coordinates and size of constraint to place the figure. As you
> may check, the editpart's that were explicitly set to be very big remain
> very big after reopening of the diagram :). So, the problem is most
> probably somewhere in your script.
> Could you provide some representative details of it?
> Regards,
> Michael
>
>
>> Hi,
>>
>> I'm reading a saved file example.umlclass_diagram in
>> Java/Eclipse3.3M6.
>> I'm using the interfaces from org.eclipse.gmf.runtime.notation and it
>> goes pretty well.
>> But when reading LayoutConstraints on a node that is a UML Class the
>> getHeight() and getWidth() methods return always -1 and not the value
>> from the XMI file.
>> <layoutConstraint xmi:type="notation:Bounds"
>> xmi:id="_oVeGZe5KEdu4M7x4CSjD-A" x="72" y="108" width="169"
>> height="181"/>
>> On the other hand, getX and getY methods are OK.
>> I don't know if the problem come from gmf or uml2tools or from me ;).
>> Any idea ?
>>
>> Philippe
>>
>
>
Previous Topic:Some Questions About UML2 Tools
Next Topic:Transformation Ecore2XMI
Goto Forum:
  


Current Time: Sat Apr 27 03:32:18 GMT 2024

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

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

Back to the top