Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CNF: Eclipse copy/cut/paste override
CNF: Eclipse copy/cut/paste override [message #336321] Mon, 08 June 2009 12:57
sowmya Mising name is currently offline sowmya Mising nameFriend
Messages: 51
Registered: July 2009
Hi ,
I wanted to override the copy action when right click on a file in
project explorer view. I am trying to override by using the extension
point =org.eclipse.ui.navigator.navigatorContent in my plugin.xml file.And
provide my own 'CopyActionProvider' this extends CommonActionProvider.

My requirement is that whenever I right click on files with for example:
'.txt' extension and select copy then then my copy action should be
executed. This should be from Package Explorer view.

In my plugin file the navigator content extension code is as below. I am
not able to get the control in to my own copy action class . Using
overrides="org.eclipse.ui.navigator.resources.actions.EditActions " also
did not help. Should I override PackageExplorerActionGroup if so how
should that be done as it did not work when used just like EditActionGroup.

In the fillActionBar method of the CopyActionProvider class , copy action
has been set and - myCopyAction is object of my class that extends
'Action' class.

public void fillActionBars(IActionBars actionBars) {


actionBars.setGlobalActionHandler(ActionFactory.COPY.getId() ,


I have pasted the piece of code from my plugin.xml file, where i am
extending navigator content. can anybody tell me wat s wrong here . below
is the code

-- code --

<extension point="org.eclipse.ui.navigator.navigatorContent">
name="%myCopyActionName" priority="normal"
<instanceof value="org.eclipse.core.resources.IFile"/>
<test property="org.eclipse.core.resources.extension"
<instanceof value="myExample.MyAbstractNavigatorItem"/>
<instanceof value="MyExample.MyAbstractNavigatorItem"/>
<instanceof value="MyExample.MyAbstractNavigatorItem"/>
</actionProvider> </navigatorContent>
Previous Topic:Dynamic visibility toolbar button
Next Topic:Java/Eclipse case against VB/
Goto Forum:

Current Time: Sat Apr 21 15:35:48 GMT 2018

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

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