Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +7 −6 Original line number Diff line number Diff line Loading @@ -47,6 +47,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.BaseTemplate class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { Loading @@ -55,7 +56,7 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { * * To compare the assigned with the defined value, something like this: * "def IScope scope_RefValue(RefValue variable, EReference ref)" * must be implemented. First versions did not work. * must be implemented. First attempts did not work. */ def IScope scope_ReferencedValue_ref(ReferencedValue value, EReference ref) { val list = newArrayList(); Loading Loading @@ -254,16 +255,16 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { val value = ext.findDesiredParent(typeof(ReferencedValue)) as ReferencedValue val list = newArrayList val idx = value.fieldRefs.indexOf(ext) val type = value.ref val template = value.ref if (idx == 0) { if (type instanceof SingleTempVarInstance) { val variable = type.findDesiredParent(typeof(VarInstance)) as VarInstance if (template instanceof SingleTempVarInstance) { val variable = template.findDesiredParent(typeof(VarInstance)) as VarInstance if (variable != null && variable.type.ref != null) { variable.type.ref.scopeReferencedFields(list) } } else if (type instanceof BaseTemplate) { } else if (template instanceof BaseTemplate) { template.type.ref.scopeReferencedFields(list) } } else { val parent = value.fieldRefs.get(idx - 1) Loading Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/scoping/TTCN3ScopeProvider.xtend +7 −6 Original line number Diff line number Diff line Loading @@ -47,6 +47,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.BaseTemplate class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { Loading @@ -55,7 +56,7 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { * * To compare the assigned with the defined value, something like this: * "def IScope scope_RefValue(RefValue variable, EReference ref)" * must be implemented. First versions did not work. * must be implemented. First attempts did not work. */ def IScope scope_ReferencedValue_ref(ReferencedValue value, EReference ref) { val list = newArrayList(); Loading Loading @@ -254,16 +255,16 @@ class TTCN3ScopeProvider extends AbstractDeclarativeScopeProvider { val value = ext.findDesiredParent(typeof(ReferencedValue)) as ReferencedValue val list = newArrayList val idx = value.fieldRefs.indexOf(ext) val type = value.ref val template = value.ref if (idx == 0) { if (type instanceof SingleTempVarInstance) { val variable = type.findDesiredParent(typeof(VarInstance)) as VarInstance if (template instanceof SingleTempVarInstance) { val variable = template.findDesiredParent(typeof(VarInstance)) as VarInstance if (variable != null && variable.type.ref != null) { variable.type.ref.scopeReferencedFields(list) } } else if (type instanceof BaseTemplate) { } else if (template instanceof BaseTemplate) { template.type.ref.scopeReferencedFields(list) } } else { val parent = value.fieldRefs.get(idx - 1) Loading