Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +1 −2 Original line number Diff line number Diff line Loading @@ -1048,8 +1048,7 @@ ReferencedValue: ref=[RefValue|IDENTIFIER] ext+=ExtendedFieldReference*; RefValue: SingleConstDef | ModuleParameter | SingleVarInstance | FieldReference | FormalTemplatePar | SingleTempVarInstance | FormalValuePar; SingleConstDef | ModuleParameter | SingleVarInstance | FieldReference | FormalTemplatePar | SingleTempVarInstance; // IDENTIFIER omitted PredefinedValue: Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +16 −4 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider import static org.eclipse.xtext.scoping.Scopes.* import static extension de.ugoe.cs.swe.common.TTCN3ScopeHelper.* import de.ugoe.cs.swe.tTCN3.FieldExpressionSpec class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { Loading Loading @@ -145,16 +146,27 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { def IScope scope_FieldSpec_ref(FieldSpec spec, EReference ref) { val template = spec.findDesiredParent(typeof(TemplateDef)) as TemplateDef val type = template.base.type val inner = newArrayList template.templateFieldScope(inner) scopeFor(inner) } def IScope scope_FieldExpressionSpec_fieldRef(FieldExpressionSpec field, EReference ref) { val template = field.findDesiredParent(typeof(TemplateDef)) as TemplateDef val inner = newArrayList template.templateFieldScope(inner) scopeFor(inner) } def private void templateFieldScope(TemplateDef template, ArrayList<EObject> list) { val type = template.base.type if (type != null && type.ref != null && typeof(RecordDefNamed).isAssignableFrom(type.ref.class)) { inner.addAll((type.ref as RecordDefNamed).body.defs) list.addAll((type.ref as RecordDefNamed).body.defs) } if (type != null && type.ref != null && typeof(SignatureDef).isAssignableFrom(type.ref.class)) { inner.addAll((type.ref as SignatureDef).paramList.params) list.addAll((type.ref as SignatureDef).paramList.params) } scopeFor(inner) } def IScope scope_TimerRefOrAny_ref(TimerRefOrAny variable, EReference ref) { Loading Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/TTCN3.xtext +1 −2 Original line number Diff line number Diff line Loading @@ -1048,8 +1048,7 @@ ReferencedValue: ref=[RefValue|IDENTIFIER] ext+=ExtendedFieldReference*; RefValue: SingleConstDef | ModuleParameter | SingleVarInstance | FieldReference | FormalTemplatePar | SingleTempVarInstance | FormalValuePar; SingleConstDef | ModuleParameter | SingleVarInstance | FieldReference | FormalTemplatePar | SingleTempVarInstance; // IDENTIFIER omitted PredefinedValue: Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +16 −4 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider import static org.eclipse.xtext.scoping.Scopes.* import static extension de.ugoe.cs.swe.common.TTCN3ScopeHelper.* import de.ugoe.cs.swe.tTCN3.FieldExpressionSpec class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { Loading Loading @@ -145,16 +146,27 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { def IScope scope_FieldSpec_ref(FieldSpec spec, EReference ref) { val template = spec.findDesiredParent(typeof(TemplateDef)) as TemplateDef val type = template.base.type val inner = newArrayList template.templateFieldScope(inner) scopeFor(inner) } def IScope scope_FieldExpressionSpec_fieldRef(FieldExpressionSpec field, EReference ref) { val template = field.findDesiredParent(typeof(TemplateDef)) as TemplateDef val inner = newArrayList template.templateFieldScope(inner) scopeFor(inner) } def private void templateFieldScope(TemplateDef template, ArrayList<EObject> list) { val type = template.base.type if (type != null && type.ref != null && typeof(RecordDefNamed).isAssignableFrom(type.ref.class)) { inner.addAll((type.ref as RecordDefNamed).body.defs) list.addAll((type.ref as RecordDefNamed).body.defs) } if (type != null && type.ref != null && typeof(SignatureDef).isAssignableFrom(type.ref.class)) { inner.addAll((type.ref as SignatureDef).paramList.params) list.addAll((type.ref as SignatureDef).paramList.params) } scopeFor(inner) } def IScope scope_TimerRefOrAny_ref(TimerRefOrAny variable, EReference ref) { Loading