Loading plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java +13 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import org.etsi.mts.tdl.Action; import org.etsi.mts.tdl.ActionReference; import org.etsi.mts.tdl.Behaviour; import org.etsi.mts.tdl.Block; import org.etsi.mts.tdl.CastDataUse; import org.etsi.mts.tdl.CollectionDataType; import org.etsi.mts.tdl.ComponentInstance; import org.etsi.mts.tdl.ComponentInstanceBinding; Loading Loading @@ -590,6 +591,18 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { IScope scope = Scopes.scopeFor(((StructuredDataType)resolvedDataType).allMembers()); return scope; } } else if (context.eContainer() instanceof CastDataUse) { DataType resolvedDataType = ((CastDataUse)context.eContainer()).resolveDataType(); if (resolvedDataType instanceof StructuredDataType) { IScope scope = Scopes.scopeFor(((StructuredDataType)resolvedDataType).allMembers()); return scope; } } else if (context.eContainer() instanceof PredefinedFunctionCall) { // DataType resolvedDataType = ((PredefinedFunctionCall)context.eContainer()).resolveDataType(); // if (resolvedDataType instanceof StructuredDataType) { // IScope scope = Scopes.scopeFor(((StructuredDataType)resolvedDataType).allMembers()); // return scope; // } } else { } } else if (context instanceof ValueAssignment) { Loading plugins/org.etsi.mts.tdl.model/model/tdl.ecore +11 −0 Original line number Diff line number Diff line Loading @@ -823,4 +823,15 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CastDataUse" eSuperTypes="#//StaticDataUse"> <eOperations name="resolveDataType" eType="#//DataType"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> <details key="body" value="self.dataType"/> </eAnnotations> </eOperations> <eStructuralFeatures xsi:type="ecore:EReference" name="dataUse" lowerBound="1" eType="#//DataUse" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="dataType" lowerBound="1" eType="#//DataType"/> </eClassifiers> </ecore:EPackage> plugins/org.etsi.mts.tdl.model/model/tdl.genmodel +5 −0 Original line number Diff line number Diff line Loading @@ -422,5 +422,10 @@ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//DataElementUse/item"/> <genOperations ecoreOperation="tdl.ecore#//DataElementUse/resolveDataType"/> </genClasses> <genClasses ecoreClass="tdl.ecore#//CastDataUse"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//CastDataUse/dataUse"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//CastDataUse/dataType"/> <genOperations ecoreOperation="tdl.ecore#//CastDataUse/resolveDataType"/> </genClasses> </genPackages> </genmodel:GenModel> plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext +14 −0 Original line number Diff line number Diff line Loading @@ -365,6 +365,7 @@ StaticDataUse returns tdl::StaticDataUse: DataInstanceUse | SpecialValueUse | LiteralValueUse | CastDataUse ; DataInstanceUse returns tdl::DataInstanceUse: Loading Loading @@ -422,6 +423,16 @@ LiteralValueUse returns tdl::LiteralValueUse: )? ; CastDataUse returns tdl::CastDataUse: LParen dataUse=DataUse 'as' dataType=[tdl::DataType|Identifier] RParen ReductionFragment ; DynamicDataUse returns tdl::DynamicDataUse: FunctionCall | FormalParameterUse Loading @@ -430,12 +441,14 @@ DynamicDataUse returns tdl::DynamicDataUse: | TimeLabelUse ; //TODO: deprecated? FunctionCall returns tdl::FunctionCall: 'instance' 'returned' 'from' function=[tdl::Function|Identifier] ParameterBindingFragment ReductionFragment ; //TODO: deprecated? FormalParameterUse returns tdl::FormalParameterUse: 'parameter' parameter=[tdl::FormalParameter|Identifier] (ParameterBindingFragment | ReductionFragment) Loading Loading @@ -498,6 +511,7 @@ DataElementUse returns tdl::DataElementUse: ( //DONE: do we really need different ways? -> not for now! //name=('new' | 'a' | 'an' | 'the') //TODO: is this still used? 'new' dataElement=[tdl::DataType|Identifier] )? UnassignedFragmentNamedElement? Loading Loading
plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java +13 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import org.etsi.mts.tdl.Action; import org.etsi.mts.tdl.ActionReference; import org.etsi.mts.tdl.Behaviour; import org.etsi.mts.tdl.Block; import org.etsi.mts.tdl.CastDataUse; import org.etsi.mts.tdl.CollectionDataType; import org.etsi.mts.tdl.ComponentInstance; import org.etsi.mts.tdl.ComponentInstanceBinding; Loading Loading @@ -590,6 +591,18 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { IScope scope = Scopes.scopeFor(((StructuredDataType)resolvedDataType).allMembers()); return scope; } } else if (context.eContainer() instanceof CastDataUse) { DataType resolvedDataType = ((CastDataUse)context.eContainer()).resolveDataType(); if (resolvedDataType instanceof StructuredDataType) { IScope scope = Scopes.scopeFor(((StructuredDataType)resolvedDataType).allMembers()); return scope; } } else if (context.eContainer() instanceof PredefinedFunctionCall) { // DataType resolvedDataType = ((PredefinedFunctionCall)context.eContainer()).resolveDataType(); // if (resolvedDataType instanceof StructuredDataType) { // IScope scope = Scopes.scopeFor(((StructuredDataType)resolvedDataType).allMembers()); // return scope; // } } else { } } else if (context instanceof ValueAssignment) { Loading
plugins/org.etsi.mts.tdl.model/model/tdl.ecore +11 −0 Original line number Diff line number Diff line Loading @@ -823,4 +823,15 @@ </eAnnotations> </eStructuralFeatures> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="CastDataUse" eSuperTypes="#//StaticDataUse"> <eOperations name="resolveDataType" eType="#//DataType"> <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"> <details key="body" value="self.dataType"/> </eAnnotations> </eOperations> <eStructuralFeatures xsi:type="ecore:EReference" name="dataUse" lowerBound="1" eType="#//DataUse" containment="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="dataType" lowerBound="1" eType="#//DataType"/> </eClassifiers> </ecore:EPackage>
plugins/org.etsi.mts.tdl.model/model/tdl.genmodel +5 −0 Original line number Diff line number Diff line Loading @@ -422,5 +422,10 @@ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//DataElementUse/item"/> <genOperations ecoreOperation="tdl.ecore#//DataElementUse/resolveDataType"/> </genClasses> <genClasses ecoreClass="tdl.ecore#//CastDataUse"> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference tdl.ecore#//CastDataUse/dataUse"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference tdl.ecore#//CastDataUse/dataType"/> <genOperations ecoreOperation="tdl.ecore#//CastDataUse/resolveDataType"/> </genClasses> </genPackages> </genmodel:GenModel>
plugins/org.etsi.mts.tdl.tx/src/org/etsi/mts/tdl/TDLtx.xtext +14 −0 Original line number Diff line number Diff line Loading @@ -365,6 +365,7 @@ StaticDataUse returns tdl::StaticDataUse: DataInstanceUse | SpecialValueUse | LiteralValueUse | CastDataUse ; DataInstanceUse returns tdl::DataInstanceUse: Loading Loading @@ -422,6 +423,16 @@ LiteralValueUse returns tdl::LiteralValueUse: )? ; CastDataUse returns tdl::CastDataUse: LParen dataUse=DataUse 'as' dataType=[tdl::DataType|Identifier] RParen ReductionFragment ; DynamicDataUse returns tdl::DynamicDataUse: FunctionCall | FormalParameterUse Loading @@ -430,12 +441,14 @@ DynamicDataUse returns tdl::DynamicDataUse: | TimeLabelUse ; //TODO: deprecated? FunctionCall returns tdl::FunctionCall: 'instance' 'returned' 'from' function=[tdl::Function|Identifier] ParameterBindingFragment ReductionFragment ; //TODO: deprecated? FormalParameterUse returns tdl::FormalParameterUse: 'parameter' parameter=[tdl::FormalParameter|Identifier] (ParameterBindingFragment | ReductionFragment) Loading Loading @@ -498,6 +511,7 @@ DataElementUse returns tdl::DataElementUse: ( //DONE: do we really need different ways? -> not for now! //name=('new' | 'a' | 'an' | 'the') //TODO: is this still used? 'new' dataElement=[tdl::DataType|Identifier] )? UnassignedFragmentNamedElement? Loading