aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorghillairet2012-05-18 13:02:21 (EDT)
committermgolubev2012-05-18 13:02:21 (EDT)
commit345119a883a15eb0f19f6a9c2c6aff60af8b6d7d (patch)
tree05123e0cdae1d12fa205cf980ba86896744af0eb
parentb80da6f2f437a43c717c87dd988a32c60df9972d (diff)
downloadorg.eclipse.gmf-tooling-345119a883a15eb0f19f6a9c2c6aff60af8b6d7d.zip
org.eclipse.gmf-tooling-345119a883a15eb0f19f6a9c2c6aff60af8b6d7d.tar.gz
org.eclipse.gmf-tooling-345119a883a15eb0f19f6a9c2c6aff60af8b6d7d.tar.bz2
Renamed CustomBehaviours to Behaviours - now holds all Behaviour related mappings.
-rw-r--r--plugins/org.eclipse.gmf.bridge/transforms/Behaviours.qvto (renamed from plugins/org.eclipse.gmf.bridge/transforms/CustomBehaviours.qvto)62
1 files changed, 35 insertions, 27 deletions
diff --git a/plugins/org.eclipse.gmf.bridge/transforms/CustomBehaviours.qvto b/plugins/org.eclipse.gmf.bridge/transforms/Behaviours.qvto
index 1b3fcca..fd54859 100644
--- a/plugins/org.eclipse.gmf.bridge/transforms/CustomBehaviours.qvto
+++ b/plugins/org.eclipse.gmf.bridge/transforms/Behaviours.qvto
@@ -8,9 +8,7 @@
* Contributors:
* Guillaume Hillairet (Montages A.G.) : initial implementation
*/
-library CustomBehaviours;
-
-import Mappings;
+library Behaviours;
modeltype GMFMAP uses mappings('http://www.eclipse.org/gmf/2006/mappings');
modeltype GMFGEN uses gmfgen('http://www.eclipse.org/gmf/2009/GenModel');
@@ -21,42 +19,52 @@ modeltype ECORE uses ecore('http://www.eclipse.org/emf/2002/Ecore');
-- Custom Behaviour
--
-helper GMFMAP::Mapping::customBehaviours() {
- self.nodes->collect(customBehaviours());
- self.links->collect(customBehaviours());
+helper GMFMAP::CanvasMapping::handleRelatedDiagram(in mapElement : GMFMAP::MappingEntry) : GMFGEN::OpenDiagramBehaviour =
+ object GMFGEN::OpenDiagramBehaviour {
+ -- XXX alternative approach to tell whether related diagram is the same we are processing now,
+ -- originally self.eResource() != mapElement.eResource()
+ if self <> mapElement.container() then {
+ diagramKind := 'FIXME put GenEditorGenerator.modelID value here';
+ editorID := 'FIXME put GenEditorView.id value here';
+ } endif;
+ };
+
+--helper GMFMAP::Mapping::customBehaviours() {
+-- self.nodes->collect(customBehaviours());
+-- self.links->collect(customBehaviours());
-- self.getCompartments()->collect(e | e.c.customBehaviours(e.n, e.r));
- return;
-}
+-- return;
+--}
-helper GMFMAP::TopNodeReference::customBehaviours() {
- var genNode := self.resolveone(GenTopLevelNode);
- genNode.behaviour += self.child.visualEffects->map createVisualEffects(genNode);
- self.child.children->collect(customBehaviours());
- return;
-}
+--helper GMFMAP::TopNodeReference::customBehaviours() {
+-- var genNode := self.resolveone(GenTopLevelNode);
+-- genNode.behaviour += self.child.visualEffects->map createVisualEffects(genNode, self.child.diagramNode);
+-- self.child.children->collect(customBehaviours());
+-- return;
+--}
-helper GMFMAP::ChildReference::customBehaviours() {
- var node := self.findProcessableChildReference();
- if not node.oclIsUndefined() then
- node.map structure(node.child).behaviour +=
- node.child.visualEffects->map createVisualEffects(node.map structure(node.child))
- endif
-}
+--helper GMFMAP::ChildReference::customBehaviours() {
+-- var node := self.findProcessableChildReference();
+-- if not node.oclIsUndefined() then
+-- node.map structure(node.child).behaviour +=
+-- node.child.visualEffects->map createVisualEffects(node.map structure(node.child), node.child.diagramNode)
+-- endif
+--}
-helper GMFMAP::LinkMapping::customBehaviours() {
- self.map structure().behaviour += self.visualEffects->map createVisualEffects(self.map structure());
- return;
-}
+--helper GMFMAP::LinkMapping::customBehaviours() {
+-- self.map structure().behaviour += self.visualEffects->map createVisualEffects(self.map structure(), self.diagramLink);
+-- return;
+--}
--
-- VisualEffect
--
-mapping GMFMAP::VisualEffectMapping::createVisualEffects(parent: GMFGEN::GenCommonBase): GMFGEN::GenVisualEffect {
+mapping GMFMAP::VisualEffectMapping::createVisualEffects(parent: GMFGEN::GenCommonBase, diagramElement: GMFGRAPH::DiagramElement): GMFGEN::GenVisualEffect {
name := self.diagramPin.name;
pinKind := self.diagramPin.oclAsType(EObject).eClass().name;
- operationName := self.diagramPin.getOperationName();
+ operationName := diagramElement.getOperationName(self.diagramPin);
operationType := self.diagramPin.getOperationType();
oclExpression := self.oclExpression;