[240218] merge from HEAD: unique client context and parameters in the request only if there are chances for EditHelper to clean them eventually.
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 0437513..c5d1fd7 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
@@ -157,11 +157,11 @@
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 a72fb3b..9db8afb 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-»