use of org.fife.ui.autocomplete.AutoCompletion in project knime-core by knime.
the class JSnippetPanel method createEditorComponent.
/**
* Creates the text editor component along with the scrollpane.
*
* @return The {@link RSyntaxTextArea} wrapped within a {@link JScrollPane}.
* @since 2.8
*/
protected JComponent createEditorComponent() {
RSyntaxTextArea textArea = new RSyntaxTextArea(20, 60);
textArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
JScrollPane scroller = new JScrollPane(textArea);
// An AutoCompletion acts as a "middle-man" between a text component
// and a CompletionProvider. It manages any options associated with
// the auto-completion (the popup trigger key, whether to display a
// documentation window along with completion choices, etc.). Unlike
// CompletionProviders, instances of AutoCompletion cannot be shared
// among multiple text components.
AutoCompletion ac = new AutoCompletion(m_completionProvider);
ac.setShowDescWindow(true);
ac.install(textArea);
setExpEdit(textArea);
return scroller;
}
use of org.fife.ui.autocomplete.AutoCompletion in project fql by CategoricalData.
the class AqlCodeEditor method doTemplates.
@Override
protected void doTemplates() {
CompletionProvider provider = createCompletionProvider();
AutoCompletion ac = new AutoCompletion(provider);
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK);
ac.setTriggerKey(key);
ac.install(topArea);
}
use of org.fife.ui.autocomplete.AutoCompletion in project fql by CategoricalData.
the class FQLPPCodeEditor method doTemplates.
@Override
protected void doTemplates() {
CompletionProvider provider = createCompletionProvider();
AutoCompletion ac = new AutoCompletion(provider);
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK);
ac.setTriggerKey(key);
ac.install(topArea);
}
use of org.fife.ui.autocomplete.AutoCompletion in project fql by CategoricalData.
the class OplCodeEditor method doTemplates.
@Override
protected void doTemplates() {
CompletionProvider provider = createCompletionProvider();
AutoCompletion ac = new AutoCompletion(provider);
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK);
ac.setTriggerKey(key);
ac.install(topArea);
}
use of org.fife.ui.autocomplete.AutoCompletion in project fql by CategoricalData.
the class FqlCodeEditor method doTemplates.
@Override
protected void doTemplates() {
CompletionProvider provider = createCompletionProvider();
AutoCompletion ac = new AutoCompletion(provider);
KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, InputEvent.META_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK);
ac.setTriggerKey(key);
ac.install(topArea);
}
Aggregations