Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » CNF adding Undo and Redo actions
CNF adding Undo and Redo actions [message #899303] Tue, 31 July 2012 12:21
sajja Phani is currently offline sajja Phani
Messages: 26
Registered: August 2011
Junior Member
Hi,
I have extended the CommonNavigator and defined my own project structure. I have added the deleted command to delete the project through actionProvider of navigatorContent. In the run

DeleteResourceAction action = new DeleteResourceAction(
					shellProvider);
			IStructuredSelection elementSelected = null;

			if (projectElement instanceof CustomProjectParent) {
				elementSelected = new StructuredSelection(
						projectElement.getProject());
			}
			if (elementSelected != null) {
				action.selectionChanged(elementSelected);
				action.run();
			}


The project is getting deleted successfully even permanent delete option selected.

Now I want to add the Undo and redo functionality to my navigator.

I have defined the corresponding actions, but stuck with how to invoke undo and redo workbench actions. What implementations go under run methods of these undo and redo actions.

--
Thanks
Sajja
Previous Topic:Help with ITreePathContentProvider and ItreePathLabelProvider.
Next Topic:E4 Switch Views
Goto Forum:
  


Current Time: Mon Sep 22 22:26:21 GMT 2014

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

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