private static MultiTextEdit variablesToPositions(TemplatePosition[] variables) {
MultiTextEdit positions = new MultiTextEdit();
for (int i = 0; i != variables.length; i++) {
int[] offsets = variables[i].getOffsets();
for (int j = 0; j != offsets.length; j++)
positions.add(new NopTextEdit(offsets[j], 0));
}
return positions;
}