本文整理汇总了Java中org.fife.ui.rsyntaxtextarea.RSyntaxTextArea.addParser方法的典型用法代码示例。如果您正苦于以下问题:Java RSyntaxTextArea.addParser方法的具体用法?Java RSyntaxTextArea.addParser怎么用?Java RSyntaxTextArea.addParser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.fife.ui.rsyntaxtextarea.RSyntaxTextArea
的用法示例。
在下文中一共展示了RSyntaxTextArea.addParser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: install
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public void install(RSyntaxTextArea textArea) {
JavaCompletionProvider p = new JavaCompletionProvider(jarManager);
// Can't use createAutoCompletion(), as Java's is "special."
AutoCompletion ac = new JavaAutoCompletion(p, textArea);
ac.setListCellRenderer(new JavaCellRenderer());
ac.setAutoCompleteEnabled(isAutoCompleteEnabled());
ac.setAutoActivationEnabled(isAutoActivationEnabled());
ac.setAutoActivationDelay(getAutoActivationDelay());
ac.setExternalURLHandler(new JavadocUrlHandler());
ac.setParameterAssistanceEnabled(isParameterAssistanceEnabled());
ac.setParamChoicesRenderer(new JavaParamListCellRenderer());
ac.setShowDescWindow(getShowDescWindow());
ac.install(textArea);
installImpl(textArea, ac);
textArea.setToolTipSupplier(p);
Listener listener = new Listener(textArea);
textArea.putClientProperty(PROPERTY_LISTENER, listener);
JavaParser parser = new JavaParser(textArea);
textArea.putClientProperty(PROPERTY_LANGUAGE_PARSER, parser);
textArea.addParser(parser);
textArea.setToolTipSupplier(p);
Info info = new Info(textArea, p, parser);
parserToInfoMap.put(parser, info);
installKeyboardShortcuts(textArea);
textArea.setLinkGenerator(new JavaLinkGenerator(this));
}
示例2: install
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea; //导入方法依赖的package包/类
@Override
public void install(RSyntaxTextArea textArea) {
ZScriptCompletionProvider provider = new ZScriptCompletionProvider();
// We use a custom auto-completion.
//AutoCompletion ac = createAutoCompletion(provider);
AutoCompletion ac = new ZScriptAutoCompletion(provider, textArea);
ac.setListCellRenderer(getDefaultCompletionCellRenderer());
ac.setAutoCompleteEnabled(isAutoCompleteEnabled());
ac.setAutoActivationEnabled(isAutoActivationEnabled());
ac.setAutoActivationDelay(getAutoActivationDelay());
ac.setParameterAssistanceEnabled(isParameterAssistanceEnabled());
ac.setShowDescWindow(getShowDescWindow());
// ac.setParamChoicesRenderer(ac.getListCellRenderer());
ac.install(textArea);
installImpl(textArea, ac);
textArea.setToolTipSupplier(provider);
ZScriptScopeListener scopeListener = new ZScriptScopeListener(textArea);
ZScriptParser parser = new ZScriptParser();
textArea.addParser(parser);
textArea.putClientProperty(PROPERTY_LANGUAGE_PARSER, parser);
Info info = new Info(textArea, provider, parser, scopeListener);
parserToInfoMap.put(parser, info);
installKeyboardShortcuts(textArea);
textArea.setLinkGenerator(new ZScriptLinkGenerator(this));
}