Commit d88ad7e5 authored by Martti Käärik's avatar Martti Käärik
Browse files

MemberReference for Function use is based on return type.

parent 2b78cb65
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -564,8 +564,11 @@ public class TDLScopeProvider extends AbstractDeclarativeScopeProvider {
					NamedElement dataElement = ((DataElementUse) context.eContainer()).getDataElement();
					//TODO: duplicated from above ->extract
					if (dataElement instanceof org.etsi.mts.tdl.Function) {
						IScope scope = Scopes.scopeFor(((org.etsi.mts.tdl.Function)dataElement).getFormalParameter());
						DataType returnType = ((org.etsi.mts.tdl.Function)dataElement).getReturnType();
						if (returnType instanceof StructuredDataType) {
							IScope scope = Scopes.scopeFor(((StructuredDataType)returnType).allMembers());
							return scope;
						}
					} else if (dataElement instanceof FormalParameter) {
						IScope scope = Scopes.scopeFor(((StructuredDataType)((FormalParameter) dataElement).getDataType()).allMembers());
						return scope;