Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Undo Redo retagets never activate for my EditorPart
Undo Redo retagets never activate for my EditorPart [message #249096] Mon, 01 June 2009 16:37 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
I have built a basic EditorPart and I am using a GEF DefaultEditDomain and
CommandStack to execute commands, but the global undo/redo retaget actions
never get activated (this are visible but disabled). What is the trick to
getting the action bars to work.


Here is my actionBarContributor.

public class ConfigBarContributor

extends ActionBarContributor

{


protected void buildActions() {

addRetargetAction(new UndoRetargetAction());

addRetargetAction(new RedoRetargetAction());





}


protected void declareGlobalActionKeys() {

// TODO Auto-generated method stub


}


public void contributeToToolBar(IToolBarManager toolBarManager) {

super.contributeToToolBar(toolBarManager);

toolBarManager.add(ActionFactory.UNDO.create(PlatformUI.getW orkbench().getActiveWorkbenchWindow()));

toolBarManager.add(ActionFactory.REDO.create(PlatformUI.getW orkbench().getActiveWorkbenchWindow()));



}
Re: Undo Redo retagets never activate for my EditorPart [message #249101 is a reply to message #249096] Mon, 01 June 2009 18:21 Go to previous message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
I grafted in what I needed from GraphicalEditor that pertained to actions.

"drew" <drew@acm.org> wrote in message
news:h0103o$9cl$1@build.eclipse.org...
>I have built a basic EditorPart and I am using a GEF DefaultEditDomain and
>CommandStack to execute commands, but the global undo/redo retaget actions
>never get activated (this are visible but disabled). What is the trick to
>getting the action bars to work.
>
>
> Here is my actionBarContributor.
>
> public class ConfigBarContributor
>
> extends ActionBarContributor
>
> {
>
>
> protected void buildActions() {
>
> addRetargetAction(new UndoRetargetAction());
>
> addRetargetAction(new RedoRetargetAction());
>
>
>
>
>
> }
>
>
> protected void declareGlobalActionKeys() {
>
> // TODO Auto-generated method stub
>
>
> }
>
>
> public void contributeToToolBar(IToolBarManager toolBarManager) {
>
> super.contributeToToolBar(toolBarManager);
>
> toolBarManager.add(ActionFactory.UNDO.create(PlatformUI.getW orkbench().getActiveWorkbenchWindow()));
>
> toolBarManager.add(ActionFactory.REDO.create(PlatformUI.getW orkbench().getActiveWorkbenchWindow()));
>
>
>
> }
>
>
Previous Topic:[zest] Set Text For Ellipse
Next Topic:[Announce] GEF 3.5.0RC3 is available
Goto Forum:
  


Current Time: Tue Apr 23 16:07:44 GMT 2024

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

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

Back to the top