Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/xtend/utils/NodeConstraintUtils_qvto.xtend')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/utils/NodeConstraintUtils_qvto.xtend84
1 files changed, 42 insertions, 42 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/utils/NodeConstraintUtils_qvto.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/utils/NodeConstraintUtils_qvto.xtend
index bf343360052..963cc1120c5 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/utils/NodeConstraintUtils_qvto.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/utils/NodeConstraintUtils_qvto.xtend
@@ -9,45 +9,45 @@
* Contributors:
* Yann Tanguy (CEA LIST) - initial API and implementation
*
- */
-package utils
-
-import com.google.inject.Singleton
-import org.eclipse.gmf.codegen.gmfgen.GenNode
-import org.eclipse.gmf.codegen.gmfgen.TypeModelFacet
-import org.eclipse.papyrus.papyrusgmfgenextension.GenNodeConstraint
-
-@Singleton class NodeConstraintUtils_qvto {
-
- def boolean hasNodeCreationConstraint(GenNode it) {
- return it.eResource.allContents.filter(typeof(GenNodeConstraint)).filter[v|
- v.genNode.contains(it) && v.genConstraint != null].size != 0
- }
-
- def GenNodeConstraint getNodeCreationConstraint(GenNode it) {
-
- if (hasNodeCreationConstraint(it)) {
- return it.eResource.allContents.filter(typeof(GenNodeConstraint)).filter[v|
- v.genNode.contains(it) && v.genConstraint != null].head
- } else {
- return null;
- }
- }
-
- def GenNode getOwningGenNode(TypeModelFacet it) {
-
- return it.eResource.allContents.filter(typeof(GenNode)).filter[v|v.modelFacet == it].head
- }
-
- def String getNodeCreationConstraintBody(GenNode it) {
- var nodeConstraint = getNodeCreationConstraint(it);
-
- if (hasNodeCreationConstraint(it)) {
- if ((nodeConstraint.genConstraint != null) && (nodeConstraint.genConstraint.body != null)) {
- return nodeConstraint.genConstraint.body;
- }
- }
- return "No GenNodeConstraint found.";
- }
-
-}
+ */
+package utils
+
+import com.google.inject.Singleton
+import org.eclipse.gmf.codegen.gmfgen.GenNode
+import org.eclipse.gmf.codegen.gmfgen.TypeModelFacet
+import org.eclipse.papyrus.papyrusgmfgenextension.GenNodeConstraint
+
+@Singleton class NodeConstraintUtils_qvto {
+
+ def boolean hasNodeCreationConstraint(GenNode it) {
+ return it.eResource.allContents.filter(typeof(GenNodeConstraint)).filter[v|
+ v.genNode.contains(it) && v.genConstraint != null].size != 0
+ }
+
+ def GenNodeConstraint getNodeCreationConstraint(GenNode it) {
+
+ if (hasNodeCreationConstraint(it)) {
+ return it.eResource.allContents.filter(typeof(GenNodeConstraint)).filter[v|
+ v.genNode.contains(it) && v.genConstraint != null].head
+ } else {
+ return null;
+ }
+ }
+
+ def GenNode getOwningGenNode(TypeModelFacet it) {
+
+ return it.eResource.allContents.filter(typeof(GenNode)).filter[v|v.modelFacet == it].head
+ }
+
+ def String getNodeCreationConstraintBody(GenNode it) {
+ var nodeConstraint = getNodeCreationConstraint(it);
+
+ if (hasNodeCreationConstraint(it)) {
+ if ((nodeConstraint.genConstraint != null) && (nodeConstraint.genConstraint.body != null)) {
+ return nodeConstraint.genConstraint.body;
+ }
+ }
+ return "No GenNodeConstraint found.";
+ }
+
+}

Back to the top