Reputation: 11
I have a usecase, I have a plugin and I want to remove the 'MOVE' context menu coming from Eclipse in the project explorer. The ID
for the action which I'm getting from plugin spy is ="org.eclipse.jdt.ui.actions.Move"
. I tried a hack , but it did not work.
<extension point="org.eclipse.ui.navigator.navigatorContent">
<actionProvider
class="com.dwb.repository.refactoring.ui.refactor.MoveActionProvider"
id="com.dwb.repository.refactoring.ui.MoveActionExtension"
overrides="org.eclipse.ui.edit.move"
priority="highest">
<enablement>
<!-- A hack to allways be enabled -->
<not>
<systemTest
property="org.eclipse.core.resources.projectNature"
value="com.myProjectNature">
</systemTest>
</not>
</enablement>
</actionProvider>
</extension>
Is there a better way? Would appreciate any help, thanks.
Upvotes: 0
Views: 874
Reputation: 111216
You can use the org.eclipse.ui.activities
extension point to define a disabled activity and match this with the menu id you want to suppress.
Note: The activities are shown in Preferences > General > Capabilities
so the user can enable them again.
Upvotes: 1