浏览代码

Disabled retargeting when element is defined in an external package.

tomqc86@googlemail.com 11 年之前
父节点
当前提交
b5729a4729

+ 5 - 2
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/ModelSequencer.xtend

@@ -113,8 +113,11 @@ class ModelSequencer implements IModelSequencer {
 
 	def retarget(FeatureCall call, Collection<Declaration> declared) {
 		if (call.feature != null && ! declared.contains(call.feature) ) {
-			val r = call.feature.replaced 
-			if ( r != null ) call.feature = r as Feature	
+			// elements within externally declared packages should not be replaced but referenced
+			if (EcoreUtil2.getContainerOfType(call.feature, Package) == null) {
+				val r = call.feature.replaced 
+				if ( r != null ) call.feature = r as Feature
+			}
 		}
 	}