Browse Source

Transform package members only (#1436)

Otherwise, also declarations within complex types will be transformed as import declarations and thereby get visible as top level elements in simulation view.
Thomas Kutz 8 years ago
parent
commit
d890986977

+ 1 - 1
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/transformation/StructureMapping.xtend

@@ -82,7 +82,7 @@ class StructureMapping {
 			if (pkgImport !== null && URIConverter.INSTANCE.exists(pkgImport.getUri(), null)) {
 				val packageForNamespace = scope.eResource.resourceSet.getResource(pkgImport.uri, true).contents.
 					head as Package
-				packageForNamespace.eAllContents.filter(Declaration).toList.forEach[createImportDeclaration(_scope)]
+				packageForNamespace.member.filter(Declaration).toList.forEach[createImportDeclaration(_scope)]
 			}
 		}
 		return _scope