| 
| Workbench operations - cut/copy/paste/undo/redo not working [message #162155] | Mon, 24 July 2006 02:51 |  | 
| Eclipse User  |  |  |  |  | Hi, I am trying to use the cut/copy/paste/undo/redo/history operations
 provided by
 the eclipse runtime by using the ActionFactory and i m registering them as
 well. The toolbars and menubars are appearing however they are not
 functioning
 as they do in eclipse workbench. I am tryin to use them with eclipse views
 (text boxes etc.). I have written separate action classes to achieve this
 however I just wanted to know if we can use the existing actions and please
 advice me how.
 
 My ApplicationActionBarAdvisor looks like the following (i have added just
 one
 action in the code snippet below)
 ...
 private IWorkbenchAction undoAction;
 ...
 protected void makeActions(IWorkbenchWindow window) {
 undoAction = ActionFactory.UNDO.create(window);
 undoAction.setEnabled(true);
 register(undoAction);
 }
 protected void fillMenuBar(IMenuManager menuBar) {
 MenuManager menu = new MenuManager("&Edit",
 IWorkbenchActionConstants.M_EDIT);
 menu.add(undoAction);
 }
 
 protected void fillCoolBar(ICoolBarManager coolBar) {
 IToolBarManager toolbar = new ToolBarManager(SWT.FLAT | SWT.RIGHT);
 coolBar.add(new ToolBarContributionItem(toolbar, null));
 toolbar.add(undoAction);
 }
 
 
 Kindly suggest me how to resolve this.
 Regards,
 Sushil
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.07784 seconds