Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +4 −3 Original line number Diff line number Diff line Loading @@ -601,8 +601,9 @@ CallBodyGuard: CallBodyOps: reply=GetReplyStatement | catch=CatchStatement; // changed port=ArrayIdentifierRef -> port=[PortElement|IDENTIFIER] arryRefs+=ArrayOrBitRef* SendStatement: array=ArrayIdentifierRef DOT port=PortSendOp; port=[PortElement|IDENTIFIER] arryRefs+=ArrayOrBitRef* DOT send=PortSendOp; PortSendOp: SENDOPKEYWORD LPAREN template=InLineTemplate RPAREN to=ToClause?; Loading Loading @@ -1191,7 +1192,7 @@ SelectCase: statement=StatementBlock; FunctionDef: FUNCTIONKEYWORD name=IDENTIFIER LPAREN parameterList=FunctionFormalParList? RPAREN runs=RunsOnSpec? FUNCTIONKEYWORD name=IDENTIFIER LPAREN parameterList=FunctionFormalParList? RPAREN runsOn=RunsOnSpec? returnType=ReturnType? statement=StatementBlock; FunctionFormalParList: Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import static org.eclipse.xtext.scoping.Scopes.* import static extension de.ugoe.cs.swe.common.TTCN3ScopeHelper.* import de.ugoe.cs.swe.tTCN3.FieldExpressionSpec import de.ugoe.cs.swe.tTCN3.SendStatement class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { Loading @@ -69,6 +70,9 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { parent.init.scopeInitial(list) } else if (parent instanceof FunctionDef) { if(parent.parameterList != null) parent.parameterList.scopeFunctionParameterValue(list) if (parent.runsOn != null) { parent.runsOn.component.componentScopeValueRefs(list, false, true) } } else if (parent instanceof ModuleControlPart) { parent.scopeModuleControlPart(list) } else if (parent instanceof ComponentDef) { Loading Loading @@ -227,4 +231,15 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { componentScopePorts(e, list) } } def IScope scope_SendStatement_port(SendStatement stm, EReference ref) { val list = newArrayList // ports from parent function val function = stm.findDesiredParent(typeof(FunctionDef)) as FunctionDef if (function.runsOn != null) { function.runsOn.component.componentScopePorts(list) } scopeFor(list) } } Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +4 −3 Original line number Diff line number Diff line Loading @@ -601,8 +601,9 @@ CallBodyGuard: CallBodyOps: reply=GetReplyStatement | catch=CatchStatement; // changed port=ArrayIdentifierRef -> port=[PortElement|IDENTIFIER] arryRefs+=ArrayOrBitRef* SendStatement: array=ArrayIdentifierRef DOT port=PortSendOp; port=[PortElement|IDENTIFIER] arryRefs+=ArrayOrBitRef* DOT send=PortSendOp; PortSendOp: SENDOPKEYWORD LPAREN template=InLineTemplate RPAREN to=ToClause?; Loading Loading @@ -1191,7 +1192,7 @@ SelectCase: statement=StatementBlock; FunctionDef: FUNCTIONKEYWORD name=IDENTIFIER LPAREN parameterList=FunctionFormalParList? RPAREN runs=RunsOnSpec? FUNCTIONKEYWORD name=IDENTIFIER LPAREN parameterList=FunctionFormalParList? RPAREN runsOn=RunsOnSpec? returnType=ReturnType? statement=StatementBlock; FunctionFormalParList: Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +15 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import static org.eclipse.xtext.scoping.Scopes.* import static extension de.ugoe.cs.swe.common.TTCN3ScopeHelper.* import de.ugoe.cs.swe.tTCN3.FieldExpressionSpec import de.ugoe.cs.swe.tTCN3.SendStatement class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { Loading @@ -69,6 +70,9 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { parent.init.scopeInitial(list) } else if (parent instanceof FunctionDef) { if(parent.parameterList != null) parent.parameterList.scopeFunctionParameterValue(list) if (parent.runsOn != null) { parent.runsOn.component.componentScopeValueRefs(list, false, true) } } else if (parent instanceof ModuleControlPart) { parent.scopeModuleControlPart(list) } else if (parent instanceof ComponentDef) { Loading Loading @@ -227,4 +231,15 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { componentScopePorts(e, list) } } def IScope scope_SendStatement_port(SendStatement stm, EReference ref) { val list = newArrayList // ports from parent function val function = stm.findDesiredParent(typeof(FunctionDef)) as FunctionDef if (function.runsOn != null) { function.runsOn.component.componentScopePorts(list) } scopeFor(list) } }