当前位置: 首页>>代码示例>>Java>>正文


Java AbstractCompletionProvider类代码示例

本文整理汇总了Java中org.fife.ui.autocomplete.AbstractCompletionProvider的典型用法代码示例。如果您正苦于以下问题:Java AbstractCompletionProvider类的具体用法?Java AbstractCompletionProvider怎么用?Java AbstractCompletionProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AbstractCompletionProvider类属于org.fife.ui.autocomplete包,在下文中一共展示了AbstractCompletionProvider类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: PropertyValueCompletionProvider

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public PropertyValueCompletionProvider(boolean isLess) {

		setAutoActivationRules(true, "@: ");
		// While we don't have functions per-se in CSS, we do in Less
		setParameterizedCompletionParams('(', ", ", ')');
		this.isLess = isLess;

		try {
			this.valueCompletions = new HashMap<String, List<Completion>>();
			this.valueCompletionGenerators =
					new HashMap<String, List<CompletionGenerator>>();
			loadPropertyCompletions();
			this.htmlTagCompletions = loadHtmlTagCompletions();
		} catch (IOException ioe) { // Never happens
			throw new RuntimeException(ioe);
		}

		comparator = new AbstractCompletionProvider.CaseInsensitiveComparator();

	}
 
开发者ID:bobbylight,项目名称:RSTALanguageSupport,代码行数:21,代码来源:PropertyValueCompletionProvider.java

示例2: setCommentCompletions

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
private void setCommentCompletions(ShorthandCompletionCache shorthandCache) {
	AbstractCompletionProvider provider = shorthandCache.getCommentProvider();
	if(provider != null) {
		for(Iterator i = shorthandCache.getCommentCompletions().iterator();
				i.hasNext();) {
			Completion c = (Completion)i.next();
			provider.addCompletion(c);
		}
		setCommentCompletionProvider(provider);
	}
}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:12,代码来源:JavaCompletionProvider.java

示例3: ZScriptCompletionProvider

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
/**
 * Constructor.
 */
public ZScriptCompletionProvider() {
	CodeCompletionProvider codeProvider = createCodeCompletionProvider();
	AbstractCompletionProvider commentsProvider =
			createCommentCompletionProvider();
	ShorthandCompletionCache cache = new ZScriptShorthandCompletionCache(
			codeProvider, commentsProvider);
	setDefaultCompletionProvider(createCodeCompletionProvider());
	setStringCompletionProvider(createStringCompletionProvider());
	setCommentCompletionProvider(commentsProvider);
	setShorthandCompletionCache(cache);
}
 
开发者ID:bobbylight,项目名称:ZScriptLanguageSupport,代码行数:15,代码来源:ZScriptCompletionProvider.java

示例4: ZScriptShorthandCompletionCache

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public ZScriptShorthandCompletionCache(AbstractCompletionProvider
		templateProvider, AbstractCompletionProvider commentsProvider) {

	super(templateProvider, commentsProvider);
	String template = null;

	template = "for (int ${i} = 0; ${i} < SizeOfArray(${array}); ${i}++) {\n\t${cursor}\n}";
	addShorthandCompletion(new TemplateCompletion(templateProvider, "for", "for-loop-array", template,
			msg.getString("for.array.shortDesc"), msg.getString("for.array.summary")));

       template = "for (int ${i} = 0; ${i} < ${10:int}; ${i}++) {\n\t${cursor}\n}";
       addShorthandCompletion(new TemplateCompletion(templateProvider, "for", "for-loop",
               template, msg.getString("for.loop.shortDesc"), msg.getString("for.loop.summary")));

       template = "if (${condition}) {\n\t${cursor}\n}";
       addShorthandCompletion(new TemplateCompletion(templateProvider, "if", "if-cond",
               template, msg.getString("if.cond.shortDesc"), msg.getString("if.cond.summary")));

       template = "if (${condition}) {\n\t${cursor}\n}\nelse {\n\t\n}";
       addShorthandCompletion(new TemplateCompletion(templateProvider, "if", "if-else",
               template, msg.getString("if.else.shortDesc"), msg.getString("if.else.summary")));

       template = "do {\n\t${cursor}\n} while (${condition});";
	addShorthandCompletion(new TemplateCompletion(templateProvider, "do", "do-loop", template,
			msg.getString("do.shortDesc"), msg.getString("do.summary")));

       template = "while (${condition}) {\n\t${cursor}\n}";
       addShorthandCompletion(new TemplateCompletion(templateProvider, "while", "while-cond",
               template, msg.getString("while.shortDesc"), msg.getString("while.summary")));

	/** Comments **/
       addCommentCompletion(new BasicCompletion(commentsProvider, "TODO:", null, msg.getString("todo")));
       addCommentCompletion(new BasicCompletion(commentsProvider, "FIXME:", null, msg.getString("fixme")));

}
 
开发者ID:bobbylight,项目名称:ZScriptLanguageSupport,代码行数:36,代码来源:ZScriptShorthandCompletionCache.java

示例5: setCommentCompletions

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
private void setCommentCompletions(ShorthandCompletionCache shorthandCache) {
	AbstractCompletionProvider provider = shorthandCache.getCommentProvider();
	if(provider != null) {
		for (Completion c : shorthandCache.getCommentCompletions()) {
			provider.addCompletion(c);
		}
		setCommentCompletionProvider(provider);
	}
}
 
开发者ID:bobbylight,项目名称:RSTALanguageSupport,代码行数:10,代码来源:JavaCompletionProvider.java

示例6: ShorthandCompletionCache

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public ShorthandCompletionCache(AbstractCompletionProvider templateProvider,
		AbstractCompletionProvider commentProvider) {
	shorthandCompletion = new ArrayList<Completion>();
	commentCompletion = new ArrayList<Completion>();
	this.templateProvider = templateProvider;
	this.commentProvider = commentProvider;
}
 
开发者ID:bobbylight,项目名称:RSTALanguageSupport,代码行数:8,代码来源:ShorthandCompletionCache.java

示例7: setCommentCompletions

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
/**
 * load the comment completions from the short hand cache
 * @param shorthandCache
 */
private void setCommentCompletions(ShorthandCompletionCache shorthandCache){
	AbstractCompletionProvider provider = shorthandCache.getCommentProvider();
	if(provider != null) {
		for (Completion c : shorthandCache.getCommentCompletions()) {
			provider.addCompletion(c);
		}
		setCommentCompletionProvider(provider);
	}
}
 
开发者ID:bobbylight,项目名称:RSTALanguageSupport,代码行数:14,代码来源:JavaScriptCompletionProvider.java

示例8: ShorthandCompletionCache

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public ShorthandCompletionCache(AbstractCompletionProvider templateProvider,
		AbstractCompletionProvider commentProvider) {
	this.templateProvider = templateProvider;
	this.commentProvider = commentProvider;
}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:6,代码来源:ShorthandCompletionCache.java

示例9: getTemplateProvider

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public AbstractCompletionProvider getTemplateProvider() {
	return templateProvider;
}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:4,代码来源:ShorthandCompletionCache.java

示例10: getCommentProvider

import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public AbstractCompletionProvider getCommentProvider() {
	return commentProvider;
}
 
开发者ID:pyros2097,项目名称:GdxStudio,代码行数:4,代码来源:ShorthandCompletionCache.java


注:本文中的org.fife.ui.autocomplete.AbstractCompletionProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。