programmatically move an element in a diagram [message #54472] |
Sat, 23 September 2006 22:11 |
Eclipse User |
|
|
|
Originally posted by: Jerry.silverglobe.com
Hey all,
I'm trying to programmatically move an element from one location to
another in my diagram.
My first approach was to create a GEF command from a
ChangeBoundsRequest. This did, in fact, move the element (visually) but
the move isn't recognized in the file if I immediately save the diagram.
Thanks,
Jerry
|
|
|
|
Re: programmatically move an element in a diagram [message #56713 is a reply to message #55893] |
Thu, 28 September 2006 02:47 |
Eclipse User |
|
|
|
Originally posted by: Jerry.silverglobe.com
Mohammed Mostafa wrote:
> Jerry Coston wrote:
> Check the DefaultProvider class, in the method createSubCommands it
> creates move commands that will be executed when you do arrange all
>
>
>> Hey all,
>>
>> I'm trying to programmatically move an element from one location to
>> another in my diagram.
>>
>> My first approach was to create a GEF command from a
>> ChangeBoundsRequest. This did, in fact, move the element (visually)
>> but the move isn't recognized in the file if I immediately save the
>> diagram.
>>
>>
>>
>> Thanks,
>>
>> Jerry
Thanks for replying Mohammed.
The problem with that method is that it simply creates commands from
ChangeBoundsRequests. When I do that, the change works on my diagram,
but when I save it, it goes away. When I reopen the diagram the element
displays in the top left corner of the diagram.
Any more ideas?
Jerry
|
|
|
Re: programmatically move an element in a diagram [message #57189 is a reply to message #56713] |
Thu, 28 September 2006 14:40 |
Eclipse User |
|
|
|
Originally posted by: Jerry.silverglobe.com
Jerry Coston wrote:
> Mohammed Mostafa wrote:
>
>> Jerry Coston wrote:
>> Check the DefaultProvider class, in the method createSubCommands it
>> creates move commands that will be executed when you do arrange all
>>
>>
>>> Hey all,
>>>
>>> I'm trying to programmatically move an element from one location to
>>> another in my diagram.
>>>
>>> My first approach was to create a GEF command from a
>>> ChangeBoundsRequest. This did, in fact, move the element (visually)
>>> but the move isn't recognized in the file if I immediately save the
>>> diagram.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Jerry
>
> Thanks for replying Mohammed.
> The problem with that method is that it simply creates commands from
> ChangeBoundsRequests. When I do that, the change works on my diagram,
> but when I save it, it goes away. When I reopen the diagram the element
> displays in the top left corner of the diagram.
>
> Any more ideas?
>
> Jerry
Hey all,
The whole problem was that my element wasn't persisted to begin with.
Thanks, Mohammed for your reply to my problem as well as your
explanation of view persistence on the "Problems persisting custom
border" thread.
|
|
|
Powered by
FUDForum. Page generated in 0.02706 seconds