Skip to main content



      Home
Home » Eclipse Projects » GEF » Enabling undo feature
Enabling undo feature [message #11111] Sun, 23 June 2002 09:14 Go to next message
Eclipse UserFriend
Originally posted by: pier.nbnet.nb.ca

I have implemented commands for creating and moving/resizing edit parts.
This seems to work fine. Do I need to do anything to enable the undo/redo
menu items in Eclipse when I add something to the command stack? I am
using XYLayoutEditPolicy like the logic example. I can see that my
commands get added to a stack in DefaultCommandStack::Execute(), but I can
not figure out how to enable the undo so I can get the framework to call
the undo and redo of my commands.

Can someone point me to some documentation on how the command processor
works in eclipse and how plug-ins like gef fit into this?

Thank you,
Re: Enabling undo feature [message #11121 is a reply to message #11111] Sun, 23 June 2002 12:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.planet-wagenknecht.de

Hi!

"Pierre Boudreau" <pier@nbnet.nb.ca> schrieb im Newsbeitrag
news:af4hj6$b0o$1@rogue.oti.com...

> Can someone point me to some documentation on how the command processor
> works in eclipse and how plug-ins like gef fit into this?

Well, if you sommands support Undo and Redo you just need to
activate/register the default Actions. Look at the Logic example. I'm not at
work and so have not the right source in front of me. Maybe you must supply
and ActionContributor class with your editor.

Cu, Gunnar
Re: Enabling undo feature [message #11126 is a reply to message #11121] Sun, 23 June 2002 18:28 Go to previous messageGo to next message
Eclipse UserFriend
You do need to specify a "contributorClass" in your plugin.xml file. You
can use GEF's ActionBarContributor to get undo, redo, save, and delete
support. Or you could subclass it to add your own actions (see
LogicActionBarContributor).

Eric



"Gunnar Wagenknecht" <g.wagenknecht@planet-wagenknecht.de> wrote in message
news:af4q6a$dce$1@rogue.oti.com...
> Hi!
>
> "Pierre Boudreau" <pier@nbnet.nb.ca> schrieb im Newsbeitrag
> news:af4hj6$b0o$1@rogue.oti.com...
>
> > Can someone point me to some documentation on how the command processor
> > works in eclipse and how plug-ins like gef fit into this?
>
> Well, if you sommands support Undo and Redo you just need to
> activate/register the default Actions. Look at the Logic example. I'm not
at
> work and so have not the right source in front of me. Maybe you must
supply
> and ActionContributor class with your editor.
>
> Cu, Gunnar
>
>
Re: Enabling undo feature [message #11250 is a reply to message #11126] Thu, 27 June 2002 16:27 Go to previous message
Eclipse UserFriend
Originally posted by: pier.nbnet.nb.ca

Works like a charm. I was using a basic text editor contributor class
that I must have copied from the readme example.

Merci beaucoups!

Eric Bordeau wrote:

> You do need to specify a "contributorClass" in your plugin.xml file. You
> can use GEF's ActionBarContributor to get undo, redo, save, and delete
> support. Or you could subclass it to add your own actions (see
> LogicActionBarContributor).

> Eric



> "Gunnar Wagenknecht" <g.wagenknecht@planet-wagenknecht.de> wrote in message
> news:af4q6a$dce$1@rogue.oti.com...
> > Hi!
> >
> > "Pierre Boudreau" <pier@nbnet.nb.ca> schrieb im Newsbeitrag
> > news:af4hj6$b0o$1@rogue.oti.com...
> >
> > > Can someone point me to some documentation on how the command processor
> > > works in eclipse and how plug-ins like gef fit into this?
> >
> > Well, if you sommands support Undo and Redo you just need to
> > activate/register the default Actions. Look at the Logic example. I'm not
> at
> > work and so have not the right source in front of me. Maybe you must
> supply
> > and ActionContributor class with your editor.
> >
> > Cu, Gunnar
> >
> >
Previous Topic:[gef-dev] draw2d : preferred size ??
Next Topic:Disposing
Goto Forum:
  


Current Time: Sat May 10 23:03:27 EDT 2025

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

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

Back to the top