本文整理汇总了Java中com.intellij.codeInsight.lookup.LookupElementBuilder.bold方法的典型用法代码示例。如果您正苦于以下问题:Java LookupElementBuilder.bold方法的具体用法?Java LookupElementBuilder.bold怎么用?Java LookupElementBuilder.bold使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.codeInsight.lookup.LookupElementBuilder
的用法示例。
在下文中一共展示了LookupElementBuilder.bold方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newLookupElement
import com.intellij.codeInsight.lookup.LookupElementBuilder; //导入方法依赖的package包/类
public LookupElementBuilder newLookupElement(ClassLoader classLoader) {
LookupElementBuilder builder = LookupElementBuilder.create(this, suggestion);
if (referringToValue) {
if (description != null) {
builder = builder.withTypeText(description, true);
}
if (representingDefaultValue) {
builder = builder.bold();
}
if (yaml) {
builder = builder.withInsertHandler(new YamlValueInsertHandler());
}
} else {
builder = builder.withRenderer(CUSTOM_SUGGESTION_RENDERER).withInsertHandler(yaml ?
new YamlKeyInsertHandler(ref, classLoader) :
new YamlKeyInsertHandler(ref, classLoader));
}
return builder;
}
示例2: create
import com.intellij.codeInsight.lookup.LookupElementBuilder; //导入方法依赖的package包/类
private LookupElementBuilder create(final Field field) {
LookupElementBuilder lookupElementBuilder = LookupElementBuilder.create(field, field.getName());
if (field.isRequired()) {
lookupElementBuilder = lookupElementBuilder.bold();
}
return lookupElementBuilder;
}
示例3: setBoldIfInClass
import com.intellij.codeInsight.lookup.LookupElementBuilder; //导入方法依赖的package包/类
private static LookupElementBuilder setBoldIfInClass(@NotNull PsiMember member, @Nullable PsiClass psiClass, @NotNull LookupElementBuilder builder) {
if (psiClass != null && member.getManager().areElementsEquivalent(member.getContainingClass(), psiClass)) {
return builder.bold();
}
return builder;
}