Search in sources :

Example 1 with GuardedSection

use of org.knime.base.node.jsnippet.guarded.GuardedSection in project knime-core by knime.

the class JavaSnippet method initGuardedSections.

/**
 * Initialize GUARDED_IMPORTS and GUARDED_FIELDS with information from the settings.
 */
private void initGuardedSections(final GuardedDocument doc) {
    try {
        GuardedSection imports = doc.getGuardedSection(GUARDED_IMPORTS);
        imports.setText(createImportsSection());
        GuardedSection fields = doc.getGuardedSection(GUARDED_FIELDS);
        fields.setText(createFieldsSection());
    } catch (BadLocationException e) {
        throw new IllegalStateException(e.getMessage(), e);
    }
}
Also used : GuardedSection(org.knime.base.node.jsnippet.guarded.GuardedSection) BadLocationException(javax.swing.text.BadLocationException)

Aggregations

BadLocationException (javax.swing.text.BadLocationException)1 GuardedSection (org.knime.base.node.jsnippet.guarded.GuardedSection)1