private void insertCodeToEditor(String text) {
this.activeEditor.requestFocus();
CodeTemplateManager tempManager = CodeTemplateManager.get(this.activeEditor.getDocument());
text = libraryParser.parseVariables(text, this.activeEditor);
text = libraryParser.getReplacement(text, "${set_cursor}", "\\$\\{cursor\\}");
CodeTemplate ct = tempManager.createTemporary(text);
ct.insert(this.activeEditor);
}