Commit 7469f8b6 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

Merge branch 'ttf-034'

parents de832d54 cb65ef96
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -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;
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -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="  &#xA;            if (not self.container().oclIsUndefined()) then&#xA;                if (self.container().oclIsKindOf(TestDescription)) then&#xA;                    self.container().oclAsType(TestDescription)&#xA;                else&#xA;                    self.container().getParentTestDescription()&#xA;                endif&#xA;            else &#xA;                null&#xA;            endif"/>
        <details key="body" value="  &#xA;            if (self.oclContainer().oclIsUndefined()) then&#xA;                null&#xA;            else &#xA;                if (self.container().oclIsKindOf(TestDescription)) then&#xA;                    self.container().oclAsType(TestDescription)&#xA;                else&#xA;                    self.container().getParentTestDescription()&#xA;                endif&#xA;            endif"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="comment" upperBound="-1"