Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/NodeConstraintUtils.qvto')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/NodeConstraintUtils.qvto53
1 files changed, 0 insertions, 53 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/NodeConstraintUtils.qvto b/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/NodeConstraintUtils.qvto
deleted file mode 100644
index bfae168b26d..00000000000
--- a/plugins/developer/org.eclipse.papyrus.def/dynamic-templates3.5/codegen/xpt/diagram/commands/NodeConstraintUtils.qvto
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2010 CEA LIST
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Yann Tanguy (CEA LIST) - initial API and implementation
- *
- */
-
-modeltype gmfgen uses "http://www.eclipse.org/gmf/2009/GenModel";
-modeltype papyrusgmfgenextension uses "http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension";
-
-library NodeConstraintUtils;
-
-helper gmfgen::GenNode::hasNodeCreationConstraint() : Boolean {
- return papyrusgmfgenextension::GenNodeConstraint.allInstances()
- ->select(v : papyrusgmfgenextension::GenNodeConstraint
- | v.genNode->includes(self) and v.genConstraint <> null)
- ->size()<>0
-}
-
-helper gmfgen::GenNode::getNodeCreationConstraint() : papyrusgmfgenextension::GenNodeConstraint {
-
- if(self.hasNodeCreationConstraint()) then {
- return papyrusgmfgenextension::GenNodeConstraint.allInstances()
- ->select(v : papyrusgmfgenextension::GenNodeConstraint
- | v.genNode->includes(self) and v.genConstraint <> null)
- ->asSequence()->first()
- } endif;
-
- return null;
-}
-
-helper gmfgen::TypeModelFacet::getOwningGenNode() : gmfgen::GenNode {
- return gmfgen::GenNode.allInstances()
- ->select(v : gmfgen::GenNode | v.modelFacet = self)
- ->asSequence()->first()
-}
-
-helper gmfgen::GenNode::getNodeCreationConstraintBody() : String {
- let nodeConstraint = self.getNodeCreationConstraint() in
- if (self.hasNodeCreationConstraint() <> null) then {
- if ((nodeConstraint.genConstraint <> null) and (nodeConstraint.genConstraint._body <> null)) then {
- return nodeConstraint.genConstraint._body;
- } endif;
- } endif;
-
- return "No GenNodeConstraint found.";
-} \ No newline at end of file

Back to the top