Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskovalsky2013-03-19 20:04:31 -0400
committermgolubev2013-03-19 20:04:31 -0400
commitd7b1fad1d600bb86239d2fe695808e79c5e39aa6 (patch)
tree7083131df034c4d02dadfa1a5ac063575bfda93b
parent1bc8c966fb9597ef5cf7dad11e1fc80c5bc558e5 (diff)
downloadorg.eclipse.gmf-tooling-d7b1fad1d600bb86239d2fe695808e79c5e39aa6.tar.gz
org.eclipse.gmf-tooling-d7b1fad1d600bb86239d2fe695808e79c5e39aa6.tar.xz
org.eclipse.gmf-tooling-d7b1fad1d600bb86239d2fe695808e79c5e39aa6.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