本文整理汇总了Java中com.intellij.codeInsight.lookup.LookupElementPresentation.isReal方法的典型用法代码示例。如果您正苦于以下问题:Java LookupElementPresentation.isReal方法的具体用法?Java LookupElementPresentation.isReal怎么用?Java LookupElementPresentation.isReal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.codeInsight.lookup.LookupElementPresentation
的用法示例。
在下文中一共展示了LookupElementPresentation.isReal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderElement
import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
super.renderElement(presentation);
if (sudden) {
presentation.setItemTextBold(true);
if (!presentation.isReal() || !((RealLookupElementPresentation)presentation).isLookupSelectionTouched()) {
char shortcutChar = myTemplate.getShortcutChar();
if (shortcutChar == TemplateSettings.DEFAULT_CHAR) {
shortcutChar = TemplateSettings.getInstance().getDefaultShortcutChar();
}
presentation.setTypeText(" [" + KeyEvent.getKeyText(shortcutChar) + "] ");
}
presentation.setTailText(" (" + myTemplate.getDescription() + ")", true);
} else {
presentation.setTypeText(myTemplate.getDescription());
}
}
示例2: renderElement
import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
super.renderElement(presentation);
char shortcut = getTemplateShortcut();
presentation.setItemText(getItemText());
if (sudden) {
presentation.setItemTextBold(true);
if (!presentation.isReal() || !((RealLookupElementPresentation)presentation).isLookupSelectionTouched()) {
if (shortcut == TemplateSettings.DEFAULT_CHAR) {
shortcut = TemplateSettings.getInstance().getDefaultShortcutChar();
}
presentation.setTypeText(" [" + KeyEvent.getKeyText(shortcut) + "] ");
}
if (StringUtil.isNotEmpty(myDescription)) {
presentation.setTailText(" (" + myDescription + ")", true);
}
}
else {
presentation.setTypeText(myDescription);
}
}
示例3: renderElement
import com.intellij.codeInsight.lookup.LookupElementPresentation; //导入方法依赖的package包/类
@Override
public void renderElement(LookupElementPresentation presentation) {
super.renderElement(presentation);
char shortcut = getTemplateShortcut();
presentation.setItemText(getItemText());
if (sudden) {
presentation.setItemTextBold(true);
if (!presentation.isReal() || !((RealLookupElementPresentation)presentation).isLookupSelectionTouched()) {
if (shortcut == TemplateSettings.DEFAULT_CHAR) {
shortcut = TemplateSettings.getInstance().getDefaultShortcutChar();
}
if (shortcut != TemplateSettings.CUSTOM_CHAR) {
presentation.setTypeText(" [" + KeyEvent.getKeyText(shortcut) + "] ");
} else {
String shortcutText =
KeymapUtil.getFirstKeyboardShortcutText(ActionManager.getInstance().getAction(IdeActions.ACTION_EXPAND_LIVE_TEMPLATE_CUSTOM));
if (StringUtil.isNotEmpty(shortcutText)) {
presentation.setTypeText(" [" + shortcutText + "] ");
}
}
}
if (StringUtil.isNotEmpty(myDescription)) {
presentation.setTailText(" (" + myDescription + ")", true);
}
}
else {
presentation.setTypeText(myDescription);
}
}