Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Is it possible to use TabbedPropertySheetPage with UndoablePropertySheetEntry
Is it possible to use TabbedPropertySheetPage with UndoablePropertySheetEntry [message #226770] Wed, 22 November 2006 15:13 Go to next message
Eclipse UserFriend
Originally posted by: caomin2005.gmail.com

Hi,

I hope to implement undo/redo functions in a TabbedPropertySheetPage
page. can UndoablePropertySheetEntry be used here ?, I am total lost
here, Could someone help on this ?

Thanks,
Michael
Re: Is it possible to use TabbedPropertySheetPage with UndoablePropertySheetEntry [message #226882 is a reply to message #226770] Fri, 24 November 2006 21:21 Go to previous messageGo to next message
Anthony Hunter is currently offline Anthony HunterFriend
Messages: 446
Registered: July 2009
Senior Member
Hi Michael

The best way to get undo and redo to work in the properties view is to
retarget the global actions to that of your editor. This way undo/redo for
the view(s) match that of your editor.

In fact, TabbedPropertySheetPage.setActionBars() is supposed to do that for
you, you will need to debug here to see what is going on.

Cheers...
Anthony

"michael cao" <caomin2005@gmail.com> wrote in message
news:ek1pfq$6uj$1@utils.eclipse.org...
> Hi,
>
> I hope to implement undo/redo functions in a TabbedPropertySheetPage
> page. can UndoablePropertySheetEntry be used here ?, I am total lost
> here, Could someone help on this ?
>
> Thanks,
> Michael
>
Re: Is it possible to use TabbedPropertySheetPage with UndoablePropertySheetEntry [message #226888 is a reply to message #226770] Fri, 24 November 2006 21:43 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi Michael,

UndoablePropertySheetEntry is exactly what has to be used, they do support
undo/redo functionality.
However, you should be able to get that functionality almost for free if
you subclass GEF's GraphicalEditor class by your editor (Your model
elements should implement IPropertySource). Otherwise, use GraphicalEditor
as a reference, properties view for the editor is set up in
getAdapter(Class) method.

Cheers,
Alex
Re: Is it possible to use TabbedPropertySheetPage with UndoablePropertySheetEntry [message #226915 is a reply to message #226888] Sun, 26 November 2006 02:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: caomin2005.gmail.com

Alex,

I got CommandStack through getPart().getAdapter(Class) in my PropertySection
class, and let CommandStack to execute local command for any changes, so my
editor can undo/redo for changes from PropertyView.

I will try UndoablePropertySheetEntry later.

Thanks
Michael

"Alex Boyko" <aboyko@ca.ibm.com> wrote in message
news:a3650e1ad1c3ca085b8335cd67f69dca$1@www.eclipse.org...
> Hi Michael,
>
> UndoablePropertySheetEntry is exactly what has to be used, they do support
> undo/redo functionality.
> However, you should be able to get that functionality almost for free if
> you subclass GEF's GraphicalEditor class by your editor (Your model
> elements should implement IPropertySource). Otherwise, use GraphicalEditor
> as a reference, properties view for the editor is set up in
> getAdapter(Class) method.
>
> Cheers,
> Alex
>
Re: Is it possible to use TabbedPropertySheetPage with UndoablePropertySheetEntry [message #226922 is a reply to message #226882] Sun, 26 November 2006 03:20 Go to previous message
Eclipse UserFriend
Originally posted by: caomin2005.gmail.com

Anthony,

In my propertySections for TabbedPropertySheetPage, I construct a command
for any changes, and then get CommandStack through
getPart().getAdapater(Class0,
and let CommandStack to execute my command. this way, any changes made in
property view can be undoable.

Thanks,
Michael

"Anthony Hunter" <anthonyh@ca.ibm.com> wrote in message
news:ek7nq5$avr$1@utils.eclipse.org...
> Hi Michael
>
> The best way to get undo and redo to work in the properties view is to
> retarget the global actions to that of your editor. This way undo/redo for
> the view(s) match that of your editor.
>
> In fact, TabbedPropertySheetPage.setActionBars() is supposed to do that
> for you, you will need to debug here to see what is going on.
>
> Cheers...
> Anthony
>
> "michael cao" <caomin2005@gmail.com> wrote in message
> news:ek1pfq$6uj$1@utils.eclipse.org...
>> Hi,
>>
>> I hope to implement undo/redo functions in a TabbedPropertySheetPage
>> page. can UndoablePropertySheetEntry be used here ?, I am total lost
>> here, Could someone help on this ?
>>
>> Thanks,
>> Michael
>>
>
>
Previous Topic:Custom GEF Layout - a million $ question
Next Topic:cannot capture mouse double click event
Goto Forum:
  


Current Time: Thu Oct 28 02:21:28 GMT 2021

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

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

Back to the top