Search in sources :

Example 1 with ErrorStrip

use of org.fife.ui.rsyntaxtextarea.ErrorStrip 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;
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) JSnippetTextArea(org.knime.base.node.jsnippet.ui.JSnippetTextArea) BorderLayout(java.awt.BorderLayout) RTextScrollPane(org.fife.ui.rtextarea.RTextScrollPane) ErrorStrip(org.fife.ui.rsyntaxtextarea.ErrorStrip)

Aggregations

BorderLayout (java.awt.BorderLayout)1 JPanel (javax.swing.JPanel)1 JScrollPane (javax.swing.JScrollPane)1 ErrorStrip (org.fife.ui.rsyntaxtextarea.ErrorStrip)1 RTextScrollPane (org.fife.ui.rtextarea.RTextScrollPane)1 JSnippetTextArea (org.knime.base.node.jsnippet.ui.JSnippetTextArea)1