Loading plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java +6 −3 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.QualifiedName; Loading Loading @@ -556,10 +557,12 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { elements.addAll(getContainerParameters((Element) context)); //TODO: filter enums // if if (!((InternalEObject) context).eIsSet(tdlPackage.DATA_ELEMENT_USE__DATA_ELEMENT)) { DataType dataType = ((DataElementUse) context).resolveDataType(); if (dataType instanceof EnumDataType) { elements.removeIf(e->(e instanceof SimpleDataInstance) && ((SimpleDataInstance)e).getDataType() != dataType); } } // elements.addAll(getScopedElementsOfType(context, FormalParameter.class)); // elements.addAll(getScopedElementsOfType(context, StructuredDataType.class)); return Scopes.scopeFor(elements); Loading plugins/org.etsi.mts.tdl.model/model/tdl.ecore +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ </eOperations> <eOperations name="getParentTestDescription" eType="#//TestDescription"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> <details key="body" value=" 
 if (not self.container().oclIsUndefined()) then
 if (self.container().oclIsKindOf(TestDescription)) then
 self.container().oclAsType(TestDescription)
 else
 self.container().getParentTestDescription()
 endif
 else 
 null
 endif"/> <details key="body" value=" 
 if (self.oclContainer().oclIsUndefined()) then
 null
 else 
 if (self.container().oclIsKindOf(TestDescription)) then
 self.container().oclAsType(TestDescription)
 else
 self.container().getParentTestDescription()
 endif
 endif"/> </eAnnotations> </eOperations> <eStructuralFeatures xsi:type="ecore:EReference" name="comment" upperBound="-1" Loading Loading
plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java +6 −3 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.xtext.EcoreUtil2; import org.eclipse.xtext.naming.IQualifiedNameConverter; import org.eclipse.xtext.naming.QualifiedName; Loading Loading @@ -556,10 +557,12 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { elements.addAll(getContainerParameters((Element) context)); //TODO: filter enums // if if (!((InternalEObject) context).eIsSet(tdlPackage.DATA_ELEMENT_USE__DATA_ELEMENT)) { DataType dataType = ((DataElementUse) context).resolveDataType(); if (dataType instanceof EnumDataType) { elements.removeIf(e->(e instanceof SimpleDataInstance) && ((SimpleDataInstance)e).getDataType() != dataType); } } // elements.addAll(getScopedElementsOfType(context, FormalParameter.class)); // elements.addAll(getScopedElementsOfType(context, StructuredDataType.class)); return Scopes.scopeFor(elements); Loading
plugins/org.etsi.mts.tdl.model/model/tdl.ecore +1 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ </eOperations> <eOperations name="getParentTestDescription" eType="#//TestDescription"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> <details key="body" value=" 
 if (not self.container().oclIsUndefined()) then
 if (self.container().oclIsKindOf(TestDescription)) then
 self.container().oclAsType(TestDescription)
 else
 self.container().getParentTestDescription()
 endif
 else 
 null
 endif"/> <details key="body" value=" 
 if (self.oclContainer().oclIsUndefined()) then
 null
 else 
 if (self.container().oclIsKindOf(TestDescription)) then
 self.container().oclAsType(TestDescription)
 else
 self.container().getParentTestDescription()
 endif
 endif"/> </eAnnotations> </eOperations> <eStructuralFeatures xsi:type="ecore:EReference" name="comment" upperBound="-1" Loading