RSyntaxTextArea
RSyntaxTextArea copied to clipboard
CodeTemplates should allow for parameterized templates
Right now, org.fife.ui.rsyntaxtextarea.templates.CodeTemplate is not terribly useful, because it only lets you insert static text and place the caret. CodeTemplates would be much, much more useful if they behaved like the AutoComplete library's TemplateCompletion class. That class lets you have multiple insertion points in a completion that you can tab to cycle through; further, each insertion point has a name, and multiple insertion points can refer to the same "variable"; that is, one can be defined like so:
for (int ${i} = 0; ${i} < ${array}.length; ${i}++) {
${cursor}
}
Perhaps this should be implemented in the AutoComplete library, as an AutoCompletion implementation that allows for templates (based on language?).