Skip to main content



      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 12:37 Go to next message
Eclipse UserFriend
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 14:21 Go to previous message
Eclipse UserFriend
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 Mar 25 19:11:56 EDT 2025

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

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

Back to the top