本文整理汇总了Java中org.fife.ui.autocomplete.ShorthandCompletion类的典型用法代码示例。如果您正苦于以下问题:Java ShorthandCompletion类的具体用法?Java ShorthandCompletion怎么用?Java ShorthandCompletion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ShorthandCompletion类属于org.fife.ui.autocomplete包,在下文中一共展示了ShorthandCompletion类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addShorthandCompletions
import org.fife.ui.autocomplete.ShorthandCompletion; //导入依赖的package包/类
/**
* Adds shorthand completions to the code completion provider.
*
* @param codeCP The code completion provider.
*/
protected void addShorthandCompletions(DefaultCompletionProvider codeCP) {
codeCP.addCompletion(new ShorthandCompletion(codeCP, "main",
"int main(int argc, char **argv)"));
//for (int i=0; i<5000; i++) {
// codeCP.addCompletion(new BasicCompletion(codeCP, "Number" + i));
//}
}
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:13,代码来源:CCompletionProvider.java
示例2: setSearchString
import org.fife.ui.autocomplete.ShorthandCompletion; //导入依赖的package包/类
private void setSearchString(List<String> searchString) {
searchString.stream().forEach((string) -> {
provider.addCompletion(new ShorthandCompletion(provider, string, "{" + string + "}"));
});
}
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:6,代码来源:SQLTextArea.java
示例3: createCompletionProvider
import org.fife.ui.autocomplete.ShorthandCompletion; //导入依赖的package包/类
/**
* Create a simple provider that adds some Java-related completions.
*
* @return The completion provider.
*/
private CompletionProvider createCompletionProvider() {
// A DefaultCompletionProvider is the simplest concrete implementation
// of CompletionProvider. This provider has no understanding of
// language semantics. It simply checks the text entered up to the
// caret position for a match against known completions. This is all
// that is needed in the majority of cases.
DefaultCompletionProvider provider = new DefaultCompletionProvider();
// Add completions for all Java keywords. A BasicCompletion is just
// a straightforward word completion.
provider.addCompletion(new BasicCompletion(provider, "abstract"));
provider.addCompletion(new BasicCompletion(provider, "assert"));
provider.addCompletion(new BasicCompletion(provider, "break"));
provider.addCompletion(new BasicCompletion(provider, "case"));
provider.addCompletion(new BasicCompletion(provider, "catch"));
provider.addCompletion(new BasicCompletion(provider, "class"));
provider.addCompletion(new BasicCompletion(provider, "const"));
provider.addCompletion(new BasicCompletion(provider, "continue"));
provider.addCompletion(new BasicCompletion(provider, "default"));
provider.addCompletion(new BasicCompletion(provider, "do"));
provider.addCompletion(new BasicCompletion(provider, "else"));
provider.addCompletion(new BasicCompletion(provider, "enum"));
provider.addCompletion(new BasicCompletion(provider, "extends"));
provider.addCompletion(new BasicCompletion(provider, "final"));
provider.addCompletion(new BasicCompletion(provider, "finally"));
provider.addCompletion(new BasicCompletion(provider, "for"));
provider.addCompletion(new BasicCompletion(provider, "goto"));
provider.addCompletion(new BasicCompletion(provider, "if"));
provider.addCompletion(new BasicCompletion(provider, "implements"));
provider.addCompletion(new BasicCompletion(provider, "import"));
provider.addCompletion(new BasicCompletion(provider, "instanceof"));
provider.addCompletion(new BasicCompletion(provider, "interface"));
provider.addCompletion(new BasicCompletion(provider, "native"));
provider.addCompletion(new BasicCompletion(provider, "new"));
provider.addCompletion(new BasicCompletion(provider, "package"));
provider.addCompletion(new BasicCompletion(provider, "private"));
provider.addCompletion(new BasicCompletion(provider, "protected"));
provider.addCompletion(new BasicCompletion(provider, "public"));
provider.addCompletion(new BasicCompletion(provider, "return"));
provider.addCompletion(new BasicCompletion(provider, "static"));
provider.addCompletion(new BasicCompletion(provider, "strictfp"));
provider.addCompletion(new BasicCompletion(provider, "super"));
provider.addCompletion(new BasicCompletion(provider, "switch"));
provider.addCompletion(new BasicCompletion(provider, "synchronized"));
provider.addCompletion(new BasicCompletion(provider, "this"));
provider.addCompletion(new BasicCompletion(provider, "throw"));
provider.addCompletion(new BasicCompletion(provider, "throws"));
provider.addCompletion(new BasicCompletion(provider, "transient"));
provider.addCompletion(new BasicCompletion(provider, "try"));
provider.addCompletion(new BasicCompletion(provider, "void"));
provider.addCompletion(new BasicCompletion(provider, "volatile"));
provider.addCompletion(new BasicCompletion(provider, "while"));
// Add a couple of "shorthand" completions. These completions don't
// require the input text to be the same thing as the replacement text.
provider.addCompletion(new ShorthandCompletion(provider, "sysout",
"System.out.println(", "System.out.println("));
provider.addCompletion(new ShorthandCompletion(provider, "syserr",
"System.err.println(", "System.err.println("));
return provider;
}
开发者ID:CompEvol,项目名称:beastshell,代码行数:70,代码来源:EditorPanel.java
注:本文中的org.fife.ui.autocomplete.ShorthandCompletion类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论