Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Suppress PropertySheet Undo/Redo
Suppress PropertySheet Undo/Redo [message #225657] Wed, 01 November 2006 14:18 Go to next message
Christian Seitz is currently offline Christian SeitzFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

is there any way to suppress the undo/redo functionality the property sheet provides?

I have several properties of model elements in my GEF editor that can be edited through the property sheet. The setPropertyValue method of my PropertySources calls GEF commands, which change the properties in the model and provide the undo/redo functionality, so I don't need (and don't want, because the change of properties is too complex) the undo/redo funcionality the PropertySheet creates. Is there any way I could realize this?

Thanks for your help,

Christian
Re: Suppress PropertySheet Undo/Redo [message #225850 is a reply to message #225657] Thu, 02 November 2006 20:36 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi Christian,

How are you executing the GEF command? Through the command stack, i.e.
something like getDomain().getCommandStack().execute(myCommand)? If yes,
for not being able to undo/redo this command don't execute the command
through the command stack. From setPropertyValue method it should be safe
just to call myCommand.execute().

A workaround is to do all changes to the model inside setPropertyValue
without using GEF commands.

Cheers,
Alex
Re: Suppress PropertySheet Undo/Redo [message #226010 is a reply to message #225850] Sat, 04 November 2006 11:14 Go to previous messageGo to next message
Christian Seitz is currently offline Christian SeitzFriend
Messages: 2
Registered: July 2009
Junior Member
Hi,

I'm executing the command through the command stack, because that is what I actually want, that my own undo/redo from the GEF command is used. I don't want the undo/redo from the setPropertyValue method to be used(that's why I don't do the changes in the model directly in the setPropertyValue method), because the generated undo/redo is too dumb and does not what it should.

Christian
Re: Suppress PropertySheet Undo/Redo [message #226125 is a reply to message #225657] Mon, 06 November 2006 06:22 Go to previous message
Eclipse UserFriend
Originally posted by: none.unknown.com

Don't use UndoablePropertySheetEntry. Override
GraphicalEditor#getAdapter().

"Christian Seitz" <chr.seitz@gmx.de> wrote in message
news:22240347.1162390761635.JavaMail.root@cp1.javalobby.org...
> Hi,
>
> is there any way to suppress the undo/redo functionality the property
> sheet provides?
>
> I have several properties of model elements in my GEF editor that can be
> edited through the property sheet. The setPropertyValue method of my
> PropertySources calls GEF commands, which change the properties in the
> model and provide the undo/redo functionality, so I don't need (and
> don't want, because the change of properties is too complex) the undo/redo
> funcionality the PropertySheet creates. Is there any way I could realize
> this?
>
> Thanks for your help,
>
> Christian
Previous Topic:selecting multiple editParts in editor
Next Topic:connection figure antialiasing
Goto Forum:
  


Current Time: Thu Oct 28 18:01:59 GMT 2021

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

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

Back to the top