Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskovalsky2013-03-20 00:04:31 +0000
committermgolubev2013-03-20 00:05:18 +0000
commit3983deed752a38bcc323f29da3bee45dc16a4a5d (patch)
tree27e00df17fad99aee219787700711b1b35ec7185
parent7abd073501d64517f5e2ddc2352f70a7fd0fa7ba (diff)
downloadorg.eclipse.gmf-tooling-3983deed752a38bcc323f29da3bee45dc16a4a5d.tar.gz
org.eclipse.gmf-tooling-3983deed752a38bcc323f29da3bee45dc16a4a5d.tar.xz
org.eclipse.gmf-tooling-3983deed752a38bcc323f29da3bee45dc16a4a5d.zip
[403846] - better fix for VisualIdRegistry#isSemanticLeaf, fixed test
failure
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/VisualIDRegistry.xpt12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/VisualIDRegistry.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/VisualIDRegistry.xpt
index 621bc46e5..44cb8360a 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/VisualIDRegistry.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/VisualIDRegistry.xpt
@@ -414,14 +414,12 @@ return -1;
«REM»We need to ensure at last one case, this is legitimate way«ENDREM»«-»
«EXPAND xpt::Common::caseVisualID FOR self»
return false;
- «FOREACH self.getAllNodes()->asSequence()->sortedBy(n | n.visualID) AS nextNode-»
- «IF getSemanticChildren(nextNode)->isEmpty()-»
- «IF not nextNode.oclIsKindOf(gmfgen::GenNode) or not nextNode.oclAsType(gmfgen::GenNode).compartments->select(c | not getSemanticChildren(c)->isEmpty())->isEmpty()-»
- «EXPAND xpt::Common::caseVisualID FOR nextNode»
- «ENDIF-»
- «ENDIF-»
- «ENDFOREACH-»
+ «LET self.getAllNodes()->asSequence()->select(n | getSemanticChildren(n)->isEmpty() and n.compartments->forAll(c | getSemanticChildren(c)->isEmpty())) AS leafs-»
+ «IF not leafs->isEmpty()-»
+ «EXPAND xpt::Common::caseVisualID FOREACH leafs->sortedBy(n | n.visualID)»
return true;
+ «ENDIF-»
+ «ENDLET-»
default:
break;
}

Back to the top