Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » matching org.eclipse.ui.ide actions in activity
matching org.eclipse.ui.ide actions in activity [message #327029] Mon, 07 April 2008 09:23 Go to next message
Eclipse UserFriend
Originally posted by: jacek.pospychala.pl.ibm.com

Hi,

I'm trying to match org.eclipse.ui.ide/revert action (visible under
File->Revert) in activityPatternBinding to remove this action from File
menu, but without success.

Does anybody have idea how to do this?
This action is created in WorkbenchActionBuilder as WorkbenchCommandAction.

I have the following in plugin.xml:

<extension
point="org.eclipse.ui.activities">
<activityPatternBinding
activityId="plugin.activity1"
isEqualityPattern="true"
pattern="org.eclipse.ui.ide/revert">
</activityPatternBinding>
<activity
id="plugin.activity1"
name="Example activity">
</activity>
<defaultEnablement
id="plugin.defaultEnablement1">
</defaultEnablement>
<category
id="plugin.category2"
name="Example category">
</category>
<categoryActivityBinding
activityId="plugin.activity1"
categoryId="plugin.category2">
</categoryActivityBinding>
</extension>
Re: matching org.eclipse.ui.ide actions in activity [message #327042 is a reply to message #327029] Mon, 07 April 2008 14:50 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Jacek Pospychala wrote:
> Hi,
>
> I'm trying to match org.eclipse.ui.ide/revert action (visible under
> File->Revert) in activityPatternBinding to remove this action from File
> menu, but without success.
>
> Does anybody have idea how to do this?
> This action is created in WorkbenchActionBuilder as WorkbenchCommandAction.

I think that it is keyed normal actions are keyed simply by their
commandId and not by the scoping plugin. WorkbenchCommandAction is
simply a kind of IAction, so it generates a standard ActionContributionItem.

If you are in an RCP app, anything that now returns a
WorkbenchCommandAction can simply be added via
org.eclipse.ui.menus/menuContribution (there's no need for the
register(*) call).

If not, you want the revert command id = org.eclipse.ui.file.revert


Later,
PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm


Previous Topic:some commands "newbie" questions
Next Topic:How and Where to Discuss and Potentially Report a bug for TextActionHandler
Goto Forum:
  


Current Time: Thu Jul 18 03:33:49 GMT 2024

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

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

Back to the top