REDO/UNDO in the model properties [message #215932] |
Thu, 11 May 2006 14:27 |
Eclipse User |
|
|
|
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 #216052 is a reply to message #216036] |
Fri, 12 May 2006 14:31 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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?
|
|
|
Powered by
FUDForum. Page generated in 0.04559 seconds