case 2:
if (endsWithWhitespace(expression)) {
return "to ";
} else {
TreeComponent tree = getSourceTree();
Completion completion = NodePathUtils.completePath(tree, expression, NAME + " ");
if (completion != null) {
if (isLeaf(completion)) {
return completion.value + " to ";
}
return completion.value;
}
}
break;
case 3:
if (endsWithWhitespace(expression)) {
return null;
} else {
String last = parts[2];
if (last.equals("to")) {
return " ";
} else if (last.equals("t")) {
return "o ";
}
return null;
}
case 4:
if (endsWithWhitespace(expression)) {
return null;
} else {
TreeComponent tree = getTargetTree();
String completedName = NAME + " " + parts[1] + " to ";
Completion completion = NodePathUtils.completePath(tree, expression, completedName);
if (completion != null) {
return completion.value;
}
}
default: