use of org.knime.base.node.jsnippet.guarded.GuardedDocument in project knime-core by knime.
the class JavaSnippet method updateSettings.
private void updateSettings() {
try {
final GuardedDocument doc = getDocument();
m_settings.setScriptImports(doc.getTextBetween(GUARDED_IMPORTS, GUARDED_FIELDS));
m_settings.setScriptFields(doc.getTextBetween(GUARDED_FIELDS, GUARDED_BODY_START));
m_settings.setScriptBody(doc.getTextBetween(GUARDED_BODY_START, GUARDED_BODY_END));
} catch (BadLocationException e) {
// this should never happen
throw new IllegalStateException(e);
}
// update input fields
m_settings.setJavaSnippetFields(m_fields);
// update jar files
m_settings.setJarFiles(m_jarFiles);
}
Aggregations