本文整理汇总了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();
}
示例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);
}
}
示例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);
}
示例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")));
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例8: ShorthandCompletionCache
import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public ShorthandCompletionCache(AbstractCompletionProvider templateProvider,
AbstractCompletionProvider commentProvider) {
this.templateProvider = templateProvider;
this.commentProvider = commentProvider;
}
示例9: getTemplateProvider
import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public AbstractCompletionProvider getTemplateProvider() {
return templateProvider;
}
示例10: getCommentProvider
import org.fife.ui.autocomplete.AbstractCompletionProvider; //导入依赖的package包/类
public AbstractCompletionProvider getCommentProvider() {
return commentProvider;
}