use of org.eclipse.n4js.xpect.config.VarDef in project n4js by eclipse.
the class VarSubstExpectationCollection method createItems.
protected List<ExpectationItem> createItems(String item, boolean negated, boolean quoted2, boolean escaped) {
Matcher m = pVar.matcher(item);
boolean foundMatch = m.find();
if (foundMatch) {
// get variablename
String name = m.group(1);
VarDef varDef = runData.getVar(name);
ArrayList<ExpectationItem> ret = new ArrayList<>();
for (ValueList mem : varDef.mlist) {
for (String s : mem.evaluate(runData.getResourceUnderTest())) {
ret.add(super.createItem(s, negated, quoted2, escaped));
}
}
return ret;
} else {
return Arrays.asList(super.createItem(item, negated, quoted2, escaped));
}
}