Skip to main content



      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 10: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 16:21 Go to previous messageGo to next message
Eclipse UserFriend
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 16:43 Go to previous messageGo to next message
Eclipse UserFriend
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] Sat, 25 November 2006 21: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] Sat, 25 November 2006 22: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:DND - Checking the type of Drag requested
Next Topic:ComboBoxPropertyDescriptor
Goto Forum:
  


Current Time: Thu May 22 03:37:03 EDT 2025

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

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

Back to the top