Problem with disabling context menu items [message #999077] |
Fri, 11 January 2013 09:31 |
Mladen Mijatovic Messages: 7 Registered: August 2011 |
Junior Member |
|
|
I had tried to disable some context menu items through <extension point="org.eclipse.ui.activities"> extension point. I had tried following:
In org.eclipse.ui.navigator.resources plugin.xml added code:
<extension
point="org.eclipse.ui.activities">
<activity
id="org.eclipse.ui.navigator.resources.activity.disableForProjectTypeOne"
name="Disable For Project Type One">
<enabledWhen>
<with
variable="selection">
<or>
<iterate
ifEmpty="false">
<not>
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.core.resources.projectNature"
value="com.maxeler.maxcompiler.core.myProjectOneNature">
</test>
</adapt>
</not>
</iterate>
<count
value="0">
</count>
</or>
</with>
</enabledWhen>
</activity>
<activityPatternBinding
activityId="org.eclipse.ui.navigator.resources.activity.disableForProjectTypeOne"
pattern=".*/org.eclipse.ui.navigator.resources.ResourceMgmtActions">
</activityPatternBinding>
<activity
id="org.eclipse.ui.navigator.resources.activity.disableForProjectTypeTwo"
name="Disable For Project Type Two">
<enabledWhen>
<with
variable="selection">
<or>
<iterate
ifEmpty="false">
<not>
<or>
<adapt
type="org.eclipse.core.resources.IProject">
<test
property="org.eclipse.core.resources.projectNature"
value="com.maxeler.maxcompiler.core.myProjectTwoNature">
</test>
</adapt>
<adapt
type="org.eclipse.core.resources.IProfileFolder">
</adapt>
</or>
</not>
</iterate>
<count
value="0">
</count>
</or>
</with>
</enabledWhen>
</activity>
<activityPatternBinding
activityId="org.eclipse.ui.navigator.resources.activity.disableForProjectTypeTwo"
pattern=".*/org.eclipse.ui.navigator.resources.ResourceMgmtActions">
</activityPatternBinding>
<activityPatternBinding
activityId="org.eclipse.ui.navigator.resources.activity.disableForProjectTypeTwo"
pattern=".*/org.eclipse.ui.navigator.resources.PortingActions">
</activityPatternBinding>
Here the problem is that I have the same pattern (pattern=".*/org.eclipse.ui.navigator.resources.ResourceMgmtActions") in activity pattern bindings for both activities. It works when only one activity pattern binding is defined, but in this situation, when both of them are active it doesn't work for each of. Is this an Eclipse bug or I am missing something? Thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.03312 seconds