Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2008-07-09 19:18:20 +0000
committeratikhomirov2008-07-09 19:18:20 +0000
commit1f5415356ca4e379f9b1275ccbbbadf579737fac (patch)
tree8e81caa340a28f9c133f29ac16d0fe25c17634da /plugins
parent62592b5ce6ca15f357544912ba22639a077bac66 (diff)
downloadorg.eclipse.gmf-tooling-1f5415356ca4e379f9b1275ccbbbadf579737fac.tar.gz
org.eclipse.gmf-tooling-1f5415356ca4e379f9b1275ccbbbadf579737fac.tar.xz
org.eclipse.gmf-tooling-1f5415356ca4e379f9b1275ccbbbadf579737fac.zip
[240218] unique client context and parameters in the request only if there are chances for EditHelper to clean them eventually.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/extensions.xpt6
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
index bbe9ff374..ff0e2e39f 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
@@ -158,11 +158,11 @@ protected org.eclipse.gef.commands.Command getSemanticCommand(org.eclipse.gmf.ru
elementType = null;
}
org.eclipse.gef.commands.Command semanticCommand = getSemanticCommandSwitch(completedRequest);
- if (semanticCommand != null) {
- org.eclipse.gmf.runtime.common.core.command.ICommand command = semanticCommand instanceof org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy ? ((org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy) semanticCommand).getICommand() : new org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy(semanticCommand);
- completedRequest.setParameter(«getBaseEditHelperQualifiedClassName()».EDIT_POLICY_COMMAND, command);
- }
if (elementType != null) {
+ if (semanticCommand != null) {
+ org.eclipse.gmf.runtime.common.core.command.ICommand command = semanticCommand instanceof org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy ? ((org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy) semanticCommand).getICommand() : new org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy(semanticCommand);
+ completedRequest.setParameter(«getBaseEditHelperQualifiedClassName()».EDIT_POLICY_COMMAND, command);
+ }
org.eclipse.gmf.runtime.common.core.command.ICommand command = elementType.getEditCommand(completedRequest);
if (command != null) {
if (!(command instanceof org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand)) {
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/extensions.xpt
index a72fb3b72..9db8afb4b 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/extensions.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/extensions.xpt
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007 Borland Software Corporation
+ * Copyright (c) 2007, 2008 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -73,14 +73,14 @@
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
«EXPAND xpt::Common::xmlGeneratedTag»
- <clientContext id="«editorGen.modelID»ClientContext">
+ <clientContext id="«editorGen.plugin.iD».TypeContext">
<enablement>
<test
property="org.eclipse.gmf.runtime.emf.core.editingDomain"
value="«editingDomainID»"/>
</enablement>
</clientContext>
- <binding context="«editorGen.modelID»ClientContext">
+ <binding context="«editorGen.plugin.iD».TypeContext">
«FOREACH getElements() AS e-»
<elementType ref="«e.elementType.uniqueIdentifier»"/>
«ENDFOREACH-»

Back to the top