• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ShorthandCompletion类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java FontException类代码示例发布时间:2022-05-23
下一篇:
Java StaticArrayBuffer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap