use of org.knime.base.node.jsnippet.ui.JSnippetTextArea in project knime-core by knime.
the class JavaSnippetNodeDialog method createSnippetPanel.
/**
* Create the panel with the snippet.
*/
private JComponent createSnippetPanel() {
m_snippetTextArea = new JSnippetTextArea(m_snippet);
// reset style which causes a recreation of the folds
// this code is also executed in "onOpen" but that is not called for the template viewer tab
m_snippetTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE);
m_snippetTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
collapseAllFolds();
final JScrollPane snippetScroller = new RTextScrollPane(m_snippetTextArea);
final JPanel snippet = new JPanel(new BorderLayout());
snippet.add(snippetScroller, BorderLayout.CENTER);
final ErrorStrip es = new ErrorStrip(m_snippetTextArea);
snippet.add(es, BorderLayout.LINE_END);
return snippet;
}
Aggregations