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

+ minor scope fix

parent 4cdc3cf8
......@@ -54,6 +54,7 @@ import org.etsi.mts.tdl.ValueAssignment;
import org.etsi.mts.tdl.Variable;
import org.etsi.mts.tdl.VariableUse;
import org.etsi.mts.tdl.tdlPackage;
import org.etsi.mts.tdl.structuredobjectives.StructuredTestObjective;
import com.google.common.base.Function;
import com.google.inject.Inject;
......@@ -125,14 +126,18 @@ public class TDLan2ScopeProvider extends AbstractDeclarativeScopeProvider {
.replaceAll("(?s)with\\s*\\{.+", "")
.trim();
String[] split = targetGateName.split("\\.");
String gate = split[1];
String component = split[0];
if (component.equals(c.getEndPoint().get(0).getComponent().getName()) &&
gate.equals(c.getEndPoint().get(0).getGate().getName())) {
elements.add(c.getEndPoint().get(1));
} else if (component.equals(c.getEndPoint().get(1).getComponent().getName()) &&
gate.equals(c.getEndPoint().get(1).getGate().getName())) {
elements.add(c.getEndPoint().get(0));
if (split.length == 2) {
String gate = split[1];
String component = split[0];
if (component.equals(c.getEndPoint().get(0).getComponent().getName()) &&
gate.equals(c.getEndPoint().get(0).getGate().getName())) {
elements.add(c.getEndPoint().get(1));
} else if (component.equals(c.getEndPoint().get(1).getComponent().getName()) &&
gate.equals(c.getEndPoint().get(1).getGate().getName())) {
elements.add(c.getEndPoint().get(0));
}
} else {
//TODO: handle?
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment