Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Node location problem in "Diagram Partitioning" in switching from an editor to the other
Node location problem in "Diagram Partitioning" in switching from an editor to the other [message #163396] Fri, 30 November 2007 08:28 Go to next message
Eclipse UserFriend
Originally posted by: frogneux.lippmann.lu

Hi everybody,

We are implmenting a diagram partitioning feature in our editor.
Everything is ok but we have a problem with the location of elements.

Explaination: We have a "supereditor" and a "subeditor". Our supereditor
is a global view of all elements in the model. Our subeditor is openned
by double-clicking on a node, and allows us to see only this part of our
full model. Our problem relates on locations of different elements which
we can add.

Imagine, we add a node in the sub editor and move it to a certain
location on the canvas. We save the subeditor diagram, and then open the
supereditor. The added node is graphically there but its location is
ALWAYS at coordinates [0,0] , so the original position is not remained.
Please note that the real location of the node is written in the xmi
file giving the graphical properties. We'd like to get the same position
for elements in the two editors while switching from one to the other.

Any hint ? Any help ?
Thanks

Etienne
Re: Node location problem in "Diagram Partitioning" in switching from an editor to the oth [message #163432 is a reply to message #163396] Fri, 30 November 2007 13:09 Go to previous messageGo to next message
Boris Blajer is currently offline Boris BlajerFriend
Messages: 217
Registered: July 2009
Senior Member
Hi Etienne,

A possible solution could be to use "arrange all" right after opening
the super-diagram if there are elements with uninitialized bounds. This
will not guarantee the synchronized positions, but at least nodes will
not overlap.

If you need to always have synchronized locations, you could use a
shared editing domain and register a ResourceSetListener that would
update coordinates in the super-editor in response to the corresponding
modifications in the sub-editor (and probably vice versa?). Note
however, that this could make them overlap with nodes that are not shown
in the sub-diagram.

Best regards,
Boris

Etienne Frogneux wrote:
> Hi everybody,
>
> We are implmenting a diagram partitioning feature in our editor.
> Everything is ok but we have a problem with the location of elements.
>
> Explaination: We have a "supereditor" and a "subeditor". Our supereditor
> is a global view of all elements in the model. Our subeditor is openned
> by double-clicking on a node, and allows us to see only this part of our
> full model. Our problem relates on locations of different elements which
> we can add.
>
> Imagine, we add a node in the sub editor and move it to a certain
> location on the canvas. We save the subeditor diagram, and then open the
> supereditor. The added node is graphically there but its location is
> ALWAYS at coordinates [0,0] , so the original position is not remained.
> Please note that the real location of the node is written in the xmi
> file giving the graphical properties. We'd like to get the same position
> for elements in the two editors while switching from one to the other.
>
> Any hint ? Any help ?
> Thanks
>
> Etienne
Re: Node location problem in "Diagram Partitioning" in switching from an editor to the oth [message #163881 is a reply to message #163432] Mon, 03 December 2007 16:40 Go to previous message
Eclipse UserFriend
Originally posted by: frogneux.lippmann.lu

Hi Boris,

Thanks a lot for your answer.
How do you realize your first proposition("arrange all" utilisation)?
I think you call a method(arrangeAll?), but where? I don't have any ideas!

Regards,
Etienne

Boris Blajer a écrit :
> Hi Etienne,
>
> A possible solution could be to use "arrange all" right after opening
> the super-diagram if there are elements with uninitialized bounds. This
> will not guarantee the synchronized positions, but at least nodes will
> not overlap.
>
> If you need to always have synchronized locations, you could use a
> shared editing domain and register a ResourceSetListener that would
> update coordinates in the super-editor in response to the corresponding
> modifications in the sub-editor (and probably vice versa?). Note
> however, that this could make them overlap with nodes that are not shown
> in the sub-diagram.
>
> Best regards,
> Boris
>
> Etienne Frogneux wrote:
>> Hi everybody,
>>
>> We are implmenting a diagram partitioning feature in our editor.
>> Everything is ok but we have a problem with the location of elements.
>>
>> Explaination: We have a "supereditor" and a "subeditor". Our
>> supereditor is a global view of all elements in the model. Our
>> subeditor is openned by double-clicking on a node, and allows us to
>> see only this part of our full model. Our problem relates on locations
>> of different elements which we can add.
>>
>> Imagine, we add a node in the sub editor and move it to a certain
>> location on the canvas. We save the subeditor diagram, and then open
>> the supereditor. The added node is graphically there but its location
>> is ALWAYS at coordinates [0,0] , so the original position is not
>> remained. Please note that the real location of the node is written in
>> the xmi file giving the graphical properties. We'd like to get the
>> same position for elements in the two editors while switching from one
>> to the other.
>>
>> Any hint ? Any help ?
>> Thanks
>>
>> Etienne
Previous Topic:Border with Nested Rectangles
Next Topic:advanced wysiwyg appeal
Goto Forum:
  


Current Time: Tue Apr 23 13:44:29 GMT 2024

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

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

Back to the top