Loading plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java +11 −1 Changes for plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java: 11 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import org.etsi.mts.tdl.LocalExpression; import org.etsi.mts.tdl.MappableDataElement; import org.etsi.mts.tdl.MemberAssignment; import org.etsi.mts.tdl.MemberReference; import org.etsi.mts.tdl.MemberRefinement; import org.etsi.mts.tdl.Message; import org.etsi.mts.tdl.NamedElement; import org.etsi.mts.tdl.Package; Loading Loading @@ -297,6 +298,11 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { IScope scope = Scopes.scopeFor(((StructuredDataType)((StructuredDataInstance)context.eContainer()).getDataType()).allMembers()); return scope; } }else if (context instanceof MemberRefinement) { if (context.eContainer() instanceof StructuredDataType && ((StructuredDataType)context.eContainer()) instanceof StructuredDataType) { IScope scope = Scopes.scopeFor(((StructuredDataType)context.eContainer()).allMembers()); return scope; } } else if (context instanceof ParameterMapping) { if (context.eContainer() instanceof DataElementMapping) { if (((DataElementMapping)context.eContainer()).getMappableDataElement() instanceof StructuredDataType) { Loading Loading @@ -370,8 +376,12 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { IScope scope = Scopes.scopeFor(((StructuredDataType)((FormalParameterUse)context.eContainer()).getParameter().getDataType()).allMembers()); return scope; } else if (context.eContainer() instanceof VariableUse) { IScope scope = Scopes.scopeFor(((StructuredDataType)((VariableUse)context.eContainer()).getVariable().getDataType()).allMembers()); //TODO: guard against other anomalies? StructuredDataType dataType = (StructuredDataType)((VariableUse)context.eContainer()).getVariable().getDataType(); if (dataType != null) { IScope scope = Scopes.scopeFor(dataType.allMembers()); return scope; } } else if (context.eContainer() instanceof ProcedureCall) { // if (((FunctionCall)context.eContainer()).getFunction().get instanceof StructuredDataInstance) { if (((ProcedureCall)context.eContainer()).getSignature() != null) { Loading Loading
plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java +11 −1 Changes for plugins/org.etsi.mts.tdl.common/src/org/etsi/mts/tdl/scoping/TDLScopeProvider.java: 11 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import org.etsi.mts.tdl.LocalExpression; import org.etsi.mts.tdl.MappableDataElement; import org.etsi.mts.tdl.MemberAssignment; import org.etsi.mts.tdl.MemberReference; import org.etsi.mts.tdl.MemberRefinement; import org.etsi.mts.tdl.Message; import org.etsi.mts.tdl.NamedElement; import org.etsi.mts.tdl.Package; Loading Loading @@ -297,6 +298,11 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { IScope scope = Scopes.scopeFor(((StructuredDataType)((StructuredDataInstance)context.eContainer()).getDataType()).allMembers()); return scope; } }else if (context instanceof MemberRefinement) { if (context.eContainer() instanceof StructuredDataType && ((StructuredDataType)context.eContainer()) instanceof StructuredDataType) { IScope scope = Scopes.scopeFor(((StructuredDataType)context.eContainer()).allMembers()); return scope; } } else if (context instanceof ParameterMapping) { if (context.eContainer() instanceof DataElementMapping) { if (((DataElementMapping)context.eContainer()).getMappableDataElement() instanceof StructuredDataType) { Loading Loading @@ -370,8 +376,12 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider { IScope scope = Scopes.scopeFor(((StructuredDataType)((FormalParameterUse)context.eContainer()).getParameter().getDataType()).allMembers()); return scope; } else if (context.eContainer() instanceof VariableUse) { IScope scope = Scopes.scopeFor(((StructuredDataType)((VariableUse)context.eContainer()).getVariable().getDataType()).allMembers()); //TODO: guard against other anomalies? StructuredDataType dataType = (StructuredDataType)((VariableUse)context.eContainer()).getVariable().getDataType(); if (dataType != null) { IScope scope = Scopes.scopeFor(dataType.allMembers()); return scope; } } else if (context.eContainer() instanceof ProcedureCall) { // if (((FunctionCall)context.eContainer()).getFunction().get instanceof StructuredDataInstance) { if (((ProcedureCall)context.eContainer()).getSignature() != null) { Loading