Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » REDO/UNDO in the model properties
REDO/UNDO in the model properties [message #215932] Thu, 11 May 2006 14:27 Go to next message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Hi, Anyone know why the my REDO/UNDO of the properties don't have effect?

initial Temperature: 30

I change the Temperature property to 20. When I click with the right
button the "UNDO Set Temperature Property" its there, but i click
nothing happens.
Re: REDO/UNDO in the model properties [message #216036 is a reply to message #215932] Fri, 12 May 2006 13:44 Go to previous messageGo to next message
Pablo Carbajal is currently offline Pablo CarbajalFriend
Messages: 2
Registered: July 2009
Junior Member
Are you using commands to change the property? if so, are u implementing the
#undo() and #redo() methods?

-Pablo


"Vinicius Ferraz Campos" <vinicius.ferraz@gmail.com> wrote in message
news:e3vhkh$skl$1@utils.eclipse.org...
> Hi, Anyone know why the my REDO/UNDO of the properties don't have effect?
>
> initial Temperature: 30
>
> I change the Temperature property to 20. When I click with the right
> button the "UNDO Set Temperature Property" its there, but i click nothing
> happens.
Re: REDO/UNDO in the model properties [message #216052 is a reply to message #216036] Fri, 12 May 2006 14:31 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Pablo Carbajal wrote:
> Are you using commands to change the property? if so, are u implementing the
> #undo() and #redo() methods?
>
> -Pablo
>
>
> "Vinicius Ferraz Campos" <vinicius.ferraz@gmail.com> wrote in message
> news:e3vhkh$skl$1@utils.eclipse.org...
>> Hi, Anyone know why the my REDO/UNDO of the properties don't have effect?
>>
>> initial Temperature: 30
>>
>> I change the Temperature property to 20. When I click with the right
>> button the "UNDO Set Temperature Property" its there, but i click nothing
>> happens.
>
>

The GEF don't give a "automatic" support for this action? If not, Where
do I create the action to change the model's properties? If you are
correct, I need to do a EditPolicy to understand the properties change
request and create the actions, And exists a GEF Key to put in
"installEditPolicy(Object key, EditPolicy editPolicy)" or I need to
create it? ty
Re: REDO/UNDO in the model properties [message #216060 is a reply to message #216052] Fri, 12 May 2006 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Vinicius Ferraz Campos wrote:
> Pablo Carbajal wrote:
>> Are you using commands to change the property? if so, are u
>> implementing the #undo() and #redo() methods?
>>
>> -Pablo
>>
>>
>> "Vinicius Ferraz Campos" <vinicius.ferraz@gmail.com> wrote in message
>> news:e3vhkh$skl$1@utils.eclipse.org...
>>> Hi, Anyone know why the my REDO/UNDO of the properties don't have
>>> effect?
>>>
>>> initial Temperature: 30
>>>
>>> I change the Temperature property to 20. When I click with the right
>>> button the "UNDO Set Temperature Property" its there, but i click
>>> nothing happens.
>>
>>
>
> The GEF don't give a "automatic" support for this action? If not, Where
> do I create the action to change the model's properties? If you are
> correct, I need to do a EditPolicy to understand the properties change
> request and create the actions, And exists a GEF Key to put in
> "installEditPolicy(Object key, EditPolicy editPolicy)" or I need to
> create it? ty

In other words: When the org.eclipse.gef.ui.properties.SetValueCommand
execute the UNDO it set the property to the newValue again, and not to
the old.

Ex: initial temperature = 10.

I change the temperature to 20.

When I click to execute the UNDO, the UNDO method set the temperatura do
20 again.
Re: REDO/UNDO in the model properties [message #216068 is a reply to message #216060] Fri, 12 May 2006 20:58 Go to previous message
Eclipse UserFriend
Originally posted by: vinicius.ferraz.gmail.com

Vinicius Ferraz Campos wrote:
> Vinicius Ferraz Campos wrote:
>> Pablo Carbajal wrote:
>>> Are you using commands to change the property? if so, are u
>>> implementing the #undo() and #redo() methods?
>>>
>>> -Pablo
>>>
>>>
>>> "Vinicius Ferraz Campos" <vinicius.ferraz@gmail.com> wrote in message
>>> news:e3vhkh$skl$1@utils.eclipse.org...
>>>> Hi, Anyone know why the my REDO/UNDO of the properties don't have
>>>> effect?
>>>>
>>>> initial Temperature: 30
>>>>
>>>> I change the Temperature property to 20. When I click with the right
>>>> button the "UNDO Set Temperature Property" its there, but i click
>>>> nothing happens.
>>>
>>>
>>
>> The GEF don't give a "automatic" support for this action? If not,
>> Where do I create the action to change the model's properties? If you
>> are correct, I need to do a EditPolicy to understand the properties
>> change request and create the actions, And exists a GEF Key to put in
>> "installEditPolicy(Object key, EditPolicy editPolicy)" or I need to
>> create it? ty
>
> In other words: When the org.eclipse.gef.ui.properties.SetValueCommand
> execute the UNDO it set the property to the newValue again, and not to
> the old.
>
> Ex: initial temperature = 10.
>
> I change the temperature to 20.
>
> When I click to execute the UNDO, the UNDO method set the temperatura do
> 20 again.

Hi, I discovered. It's because in the Validador the Value was seting in
the Object. Now the UNDO works to some properties. In others the GEF
call 2 times the setPropertyValue(1 when I press Enter, and other when
the property windows lose the focus), and I need to call 2 times the
UNDO to undo the setproperty, Anyone knows why?
Previous Topic:How to achieve bend points in the connection between 2 figures
Next Topic:RoundedRectangle rendering problem
Goto Forum:
  


Current Time: Fri Apr 26 00:20:45 GMT 2024

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

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

Back to the top