Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2008-11-11 07:17:05 -0500
committeratikhomirov2008-11-11 07:17:05 -0500
commit14811cdbbeb609922e12a6c16e98d4570954561b (patch)
treee0b4365263eeb8108c95ce4c166c3767b0233de1
parent3b99d3b4ef6a6403964833b76ccac18cc6e21a55 (diff)
downloadorg.eclipse.gmf-tooling-14811cdbbeb609922e12a6c16e98d4570954561b.tar.gz
org.eclipse.gmf-tooling-14811cdbbeb609922e12a6c16e98d4570954561b.tar.xz
org.eclipse.gmf-tooling-14811cdbbeb609922e12a6c16e98d4570954561b.zip
[174961] Menu actions - fix for the issue described in comment#5: test for bundle state is superfluous when there's activeEditor check, and structured selection never matches EditPart class.
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt
index eb91a1707..d179fefec 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt
@@ -89,10 +89,7 @@
commandId="«EXPAND commandIdentifier»"
class="«qualifiedClassName»">
<enabledWhen>
- <and>
- <test property="org.eclipse.core.runtime.bundleState" args="«owner.editorGen.plugin.iD»" value="ACTIVE"/>
- <with variable="activePartId"><equals value="«owner.editorGen.editor.iD»"/></with>
- </and>
+ <with variable="activePartId"><equals value="«owner.editorGen.editor.iD»"/></with>
</enabledWhen>
</handler>
«ENDDEFINE»
@@ -139,14 +136,13 @@
«DEFINE menuCondition FOR gmfgen::GenContextMenu-»
<and>
- <test property="org.eclipse.core.runtime.bundleState" args="«editorGen.plugin.iD»" value="ACTIVE"/>
<with variable="activePartId"><equals value="«editorGen.editor.iD»"/></with>
- <with variable="selection">«IF context.size() > 1»<or>«ENDIF»
+ <with variable="selection"><iterate«IF context.size() > 1» operator="or"«ENDIF» ifEmpty="false">
«REM»XXX, perhaps, <adapt type="EditPart">?«ENDREM-»
«FOREACH context AS de-»
<instanceof value="«de.getEditPartQualifiedClassName()»"/>
«ENDFOREACH-»
- «IF context.size() > 1»</or>«ENDIF»</with>
+ </iterate></with>
</and>
«ENDDEFINE»

Back to the top