Commit b2f5636c authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+fix NPE when referenced component in a gate reference does not exist


(scope resolution)

related to #BUG 25

Change-Id: Ic09cd52af2fe9385bc6ed29dfa13e29d7e08bb6f
Signed-off-by: default avatarmakedonski <makedonski@informatik.uni-goettingen.de>
parent 793b723e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -44,9 +44,11 @@ public class TPLan2ScopeProvider extends AbstractDeclarativeScopeProvider {
		if (reference.getEType().getInstanceClass() == GateInstance.class) {
			if (context instanceof GateReference) {
				GateReference gate = (GateReference) context;
				if (gate.getComponent().getType()!=null) {
					IScope scope = Scopes.scopeFor(gate.getComponent().getType().getGateInstance());
					return scope;
				}
			}
		} else if (Parameter.class.isAssignableFrom(reference.getEType().getInstanceClass())) {
			if (context instanceof MemberAssignment) {
				if (context.eContainer() instanceof StructuredDataInstance) {