Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt')
-rw-r--r--plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt75
1 files changed, 0 insertions, 75 deletions
diff --git a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt b/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt
deleted file mode 100644
index ef919ab131e..00000000000
--- a/plugins/toolsmiths/gmf-tooling/org.eclipse.papyrus.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt
+++ /dev/null
@@ -1,75 +0,0 @@
-/******************************************************************************
- * Copyright (c) 2006, 2020 Borland Software Corporation, CEA LIST, Artal
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Dmitry Stadnik (Borland) - initial API and implementation
- * Aurelien Didier (ARTAL) - aurelien.didier51@gmail.com - Bug 569174
- *****************************************************************************/
-
-«IMPORT 'http://www.eclipse.org/papyrus/gmf/2020/GenModel'»
-
-«DEFINE GraphicalNodeEditPolicy FOR gmfgen::GenNode-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPoliciesPackageName»;
-
-«EXPAND xpt::Common::generatedClassComment»
-public class «graphicalNodeEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy {
-
- «EXPAND xpt::Common::generatedClassComment»
- protected org.eclipse.gef.commands.Command getConnectionCompleteCommand(
- org.eclipse.gef.requests.CreateConnectionRequest request) {
- org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = getElementType(request);
- «FOREACH reorientedIncomingLinks->sortedBy(l | l.visualID) AS link-»
- if («EXPAND xpt::providers::ElementTypes::accessElementType FOR link» == elementType) {
- «IF link.outgoingCreationAllowed-»
- if (request.getSourceEditPart() != getHost()) {
- «ENDIF-»
- return getConnectionWithReorientedViewCompleteCommand(request);
- «IF link.outgoingCreationAllowed-»
- }
- «ENDIF-»
- }
- «ENDFOREACH-»
- return super.getConnectionCompleteCommand(request);
- }
-
- «EXPAND xpt::Common::generatedClassComment»
- protected org.eclipse.gmf.runtime.emf.type.core.IElementType getElementType(
- org.eclipse.gef.requests.CreateConnectionRequest request) {
- if (request instanceof org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest) {
- org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter requestAdapter =
- ((org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest) request)
- .getConnectionViewAndElementDescriptor().getCreateElementRequestAdapter();
- return (org.eclipse.gmf.runtime.emf.type.core.IElementType) requestAdapter.getAdapter(
- org.eclipse.gmf.runtime.emf.type.core.IElementType.class);
- }
- return null;
- }
-
- «EXPAND xpt::Common::generatedClassComment»
- protected org.eclipse.gef.commands.Command getConnectionWithReorientedViewCompleteCommand(
- org.eclipse.gef.requests.CreateConnectionRequest request) {
- org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy c =
- (org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy) super.getConnectionCompleteCommand(request);
- org.eclipse.gmf.runtime.common.core.command.CompositeCommand cc =
- (org.eclipse.gmf.runtime.common.core.command.CompositeCommand) c.getICommand();
- org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain =
- ((org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) getHost()).getEditingDomain();
- «getDiagram().getReorientConnectionViewCommandQualifiedClassName()» rcvCommand =
- new «getDiagram().getReorientConnectionViewCommandQualifiedClassName()»(editingDomain, null);
- rcvCommand.setEdgeAdaptor(getViewAdapter());
- cc.compose(rcvCommand);
- return c;
- }
- «EXPAND additions-»
-}
-«ENDDEFINE»
-
-«DEFINE additions FOR gmfgen::GenNode»«ENDDEFINE»

Back to the top