Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Custom handler req'd for standard commands?(Adding Delete to CNF's pop-up menu, how to make use of standard handler?)
Custom handler req'd for standard commands? [message #549486] Mon, 26 July 2010 19:56
Joey Mink is currently offline Joey MinkFriend
Messages: 87
Registered: July 2009
Location: Centreville, VA, USA


I have a Common Navigator Framework (CNF) implementation to which I'm trying to add some standard pop-up menu commands.

I've added the commands Delete and Rename (org.eclipse.ui.edit.delete and org.eclipse.ui.edit.rename) using org.eclipse.ui.menus and the menuContribution tag.

However, actually executing the command seems confusing. I assume there are default handlers that can take care of this for me, but I can't find any. All I can find are tutorials that imply I have to write the handler for this from scratch.

Is this true? Is it required to add the org.eclipse.ui.handlers extension and implement AbstractHandler or IHandler - basically writing your own handler to delete/rename the selected item in the Navigator?

If the answer to that is yes, might someone know of an example of a delete or rename handler implemention? It's hard to understand what parameters or context one has access to in the AbstractHandler.execute(ExecutionEvent event) method. I'm not sure how to access what is selected in the CNF.

Sorry for the rambling, thanks in advance for any replies!
Previous Topic:Drop down on toolbar with different text sizes
Next Topic:Can`t see the plugin dependency list
Goto Forum:

Current Time: Wed Oct 05 06:53:31 GMT 2022

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

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

Back to the top