Skip to content

Commit 6508684

Browse files
committed
Issue #52 - Corrected pin type for expansion region.
1 parent a5863fb commit 6508684

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

org.modeldriven.alf/src/org/modeldriven/alf/fuml/mapping/expressions/AssignmentExpressionMapping.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2011-2017 Data Access Technologies, Inc. (Model Driven Solutions)
2+
* Copyright 2011-2018 Data Access Technologies, Inc. (Model Driven Solutions)
33
* All rights reserved worldwide. This program and the accompanying materials
44
* are made available for use under the terms of the GNU General Public License
55
* (GPL) version 3 that accompanies this distribution and is available at
@@ -31,10 +31,10 @@
3131
import org.modeldriven.alf.uml.Operation;
3232
import org.modeldriven.alf.uml.ValueSpecificationAction;
3333
import org.modeldriven.alf.uml.LoopNode;
34-
import org.modeldriven.alf.uml.StructuredActivityNode;
34+
import org.modeldriven.alf.uml.StructuredActivityNode;
35+
import org.modeldriven.alf.uml.Type;
3536
import org.modeldriven.alf.uml.ExpansionRegion;
3637
import org.modeldriven.alf.uml.ActivityNode;
37-
import org.modeldriven.alf.uml.Classifier;
3838
import org.modeldriven.alf.uml.DataType;
3939
import org.modeldriven.alf.uml.Property;
4040
import org.modeldriven.alf.uml.Behavior;
@@ -489,9 +489,9 @@ public static ActivityNode mapPropertyAssignment(
489489
} else {
490490
// Otherwise, create a node to iteratively add possibly
491491
// multiple values to the property.
492-
Classifier featuringClassifier = property.getFeaturingClassifier().get(0);
492+
Type objectType = ActivityGraph.getObjectType(property);
493493
writeAction.setIsReplaceAll(false);
494-
if (!(featuringClassifier instanceof DataType)) {
494+
if (!(objectType instanceof DataType)) {
495495
// If the property is a feature of a class, use an iterative
496496
// expansion region.
497497
ExpansionRegion region = graph.addExpansionRegion(
@@ -503,7 +503,7 @@ public static ActivityNode mapPropertyAssignment(
503503

504504
InputPin objectInputPin = graph.createInputPin(
505505
region.getName() + ".input(" + objectSource.getName() + ")",
506-
featuringClassifier, 1, 1);
506+
objectType, 1, 1);
507507
region.addStructuredNodeInput(objectInputPin);
508508
region.addEdge(graph.createObjectFlow(
509509
objectInputPin, writeAction.getObject()));
@@ -515,7 +515,7 @@ public static ActivityNode mapPropertyAssignment(
515515
// a loop node to iteratively update the data value, rather than
516516
// an expansion region.
517517
InputPin objectInputPin = graph.createInputPin(
518-
objectSource.getName(), featuringClassifier, 1, 1);
518+
objectSource.getName(), objectType, 1, 1);
519519
InputPin valueInputPin = graph.createInputPin(
520520
"value", property.getType(), 0, -1);
521521
LoopNode loopNode = graph.addLoopNode(

org.modeldriven.alf/src/org/modeldriven/alf/fuml/mapping/expressions/LeftHandSideMapping.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
21
/*******************************************************************************
3-
* Copyright 2011-2017 Data Access Technologies, Inc. (Model Driven Solutions)
2+
* Copyright 2011-2018 Data Access Technologies, Inc. (Model Driven Solutions)
43
* All rights reserved worldwide. This program and the accompanying materials
54
* are made available for use under the terms of the GNU General Public License
65
* (GPL) version 3 that accompanies this distribution and is available at

0 commit comments

Comments
 (0)