GoVarDeclarations lastVar = globalVariables[globalVariables.length - 1];
template = createAppendGlobalVariableTemplate(editor, lastVar, startElement);
}
if (template != null) {
TemplateManager.getInstance(project).startTemplate(editor, template, new TemplateEditingAdapter() {
@Override
public void templateFinished(Template template, boolean brokenOff) {
editor.getCaretModel().moveToOffset(rangeMarker.getEndOffset());
}
});