Search in sources :

Example 1 with JavaScriptingCompletionProvider

use of org.knime.base.node.util.JavaScriptingCompletionProvider in project knime-core by knime.

the class StringManipulationNodeDialog method createCompletionProvider.

/**
 * Create a simple provider that adds some Java-related completions.
 *
 * @return The completion provider.
 * @since 3.3
 */
protected KnimeCompletionProvider createCompletionProvider() {
    m_completionProvider = new JavaScriptingCompletionProvider();
    Collection<Manipulator> manipulators = StringManipulatorProvider.getDefault().getManipulators(ManipulatorProvider.ALL_CATEGORY);
    for (Manipulator m : manipulators) {
        // A BasicCompletion is just a straightforward word completion.
        m_completionProvider.addCompletion(new BasicCompletion(m_completionProvider, m.getName(), m.getDisplayName(), m.getDescription()));
    }
    return m_completionProvider;
}
Also used : JavaScriptingCompletionProvider(org.knime.base.node.util.JavaScriptingCompletionProvider) BasicCompletion(org.fife.ui.autocomplete.BasicCompletion) Manipulator(org.knime.base.node.preproc.stringmanipulation.manipulator.Manipulator)

Aggregations

BasicCompletion (org.fife.ui.autocomplete.BasicCompletion)1 Manipulator (org.knime.base.node.preproc.stringmanipulation.manipulator.Manipulator)1 JavaScriptingCompletionProvider (org.knime.base.node.util.JavaScriptingCompletionProvider)1