本文整理汇总了Java中com.intellij.codeInsight.lookup.AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE属性的典型用法代码示例。如果您正苦于以下问题:Java AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE属性的具体用法?Java AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE怎么用?Java AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.codeInsight.lookup.AutoCompletionPolicy
的用法示例。
在下文中一共展示了AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addCompletionElements
private static <T> void addCompletionElements(final CompletionResultSet result,
final TextFieldWithAutoCompletionListProvider<T> listProvider,
final Collection<T> items,
final int index) {
final AutoCompletionPolicy completionPolicy = ApplicationManager.getApplication().isUnitTestMode()
? AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE
: AutoCompletionPolicy.NEVER_AUTOCOMPLETE;
int grouping = index;
for (final T item : items) {
if (item == null) {
LOG.error("Null item from " + listProvider);
continue;
}
LookupElementBuilder builder = listProvider.createLookupBuilder(item);
result.addElement(PrioritizedLookupElement.withGrouping(builder.withAutoCompletionPolicy(completionPolicy), grouping--));
}
}
示例2: addCompletionElements
private static <T> void addCompletionElements(final CompletionResultSet result,
final TextFieldWithAutoCompletionListProvider<T> listProvider,
final Collection<T> items,
final int index) {
final AutoCompletionPolicy completionPolicy = ApplicationManager.getApplication().isUnitTestMode()
? AutoCompletionPolicy.ALWAYS_AUTOCOMPLETE
: AutoCompletionPolicy.NEVER_AUTOCOMPLETE;
int grouping = index;
for (final T item : items) {
LookupElementBuilder builder = listProvider.createLookupBuilder(item);
result.addElement(PrioritizedLookupElement.withGrouping(builder.withAutoCompletionPolicy(completionPolicy), grouping--));
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:14,代码来源:TextFieldWithAutoCompletionContributor.java