Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Hide menus thr' activities/perspectiveExtensions not working (Hide menus thr' activities/perspectiveExtensions not working )
Hide menus thr' activities/perspectiveExtensions not working [message #736683] Fri, 14 October 2011 08:18
Binuraj Mising name is currently offline Binuraj Mising nameFriend
Messages: 3
Registered: October 2011
Junior Member
Hi,

I am trying to hide a menu contribution by trying two approaches .

Approach 1- through "org.eclipse.ui.activities"
The menu is defined as given below

Snippet -1
<command commandId="com.teamcenter.rac.newPart"
id="com.teamcenter.rac.pse.mc.newPart"
mnemonic="%newPartAction.MNEMONIC">
<visibleWhen>
<and>
<reference
definitionId="com.teamcenter.rac.pse.inMainView"/>
<with variable="rac_command_suppression">
<not>
<iterate operator="or">
<equals value="com.teamcenter.rac.newPart"/>
</iterate>
</not>
</with>
</and>
</visibleWhen>
</command>

I have tried the following to hide this menu iseing activities

Snippet -2
<extension point="org.eclipse.ui.activities">
<activity id="com.teamcenter.rac.VMPartPse" name="HideCommonPartMenuPse" description="This activIty will hide the common Part menu when VM is installed" />
<activityPatternBinding activityId="com.teamcenter.rac.VMPartPse" isEqualityPattern="true"
pattern="com.teamcenter.rac.pse/com.teamcenter.rac.pse.mc.newPart">
</activityPatternBinding>
</extension>

Here "com.teamcenter.rac.pse" is the plugin id and "com.teamcenter.rac.pse.mc.newPart" is the command id in menu contribution as given in Snippet -1.

Any idea why this is not working?

Approach -2 though "org.eclipse.ui.perspectiveExtensions"
I have tried an alternative option using "org.eclipse.ui.perspectiveExtensions" as given below

Snippet-3
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="com.teamcenter.rac.pse.PSEPerspective">
<hiddenMenuItem id="com.teamcenter.rac.newPart" />
</perspectiveExtension>
</extension>

Any idea why these options are not working?

Thanks
Binu

Note: I have successfully hidden menus using the approach-1 for one use case.
But the same is now working for another usecase.


Can I achieve the same through any other mechanism, like context?

Here my constraint is I don't have permission to edit the already existing menu contribution which I am trying to hide from my custom plugin.

Thanks
Binu
Previous Topic:Eclipse pre-built packages
Next Topic:Security issues in PHP
Goto Forum:
  


Current Time: Thu Sep 19 08:31:56 GMT 2024

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

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

Back to the top