本文整理汇总了Java中consulo.ide.IconDescriptor.setRightIcon方法的典型用法代码示例。如果您正苦于以下问题:Java IconDescriptor.setRightIcon方法的具体用法?Java IconDescriptor.setRightIcon怎么用?Java IconDescriptor.setRightIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类consulo.ide.IconDescriptor
的用法示例。
在下文中一共展示了IconDescriptor.setRightIcon方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processModifierListOwner
import consulo.ide.IconDescriptor; //导入方法依赖的package包/类
@RequiredReadAction
private static void processModifierListOwner(PsiElement element, IconDescriptor iconDescriptor, int flags)
{
DotNetModifierListOwner owner = (DotNetModifierListOwner) element;
if(BitUtil.isSet(flags, Iconable.ICON_FLAG_VISIBILITY))
{
if(owner.hasModifier(MsilTokens.PRIVATE_KEYWORD))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_private);
}
else if(owner.hasModifier(MsilTokens.PUBLIC_KEYWORD))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_public);
}
else if(owner.hasModifier(MsilTokens.PROTECTED_KEYWORD))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_protected);
}
else
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_plocal);
}
}
if(owner.hasModifier(MsilTokens.SEALED_KEYWORD))
{
iconDescriptor.addLayerIcon(AllIcons.Nodes.FinalMark);
}
}
示例2: processModifierList
import consulo.ide.IconDescriptor; //导入方法依赖的package包/类
public static void processModifierList(PsiElement element, IconDescriptor iconDescriptor, int flags)
{
PsiModifierListOwner owner = (PsiModifierListOwner) element;
if(owner.hasModifierProperty(PsiModifier.FINAL))
{
iconDescriptor.addLayerIcon(AllIcons.Nodes.FinalMark);
}
if(owner.hasModifierProperty(PsiModifier.STATIC))
{
iconDescriptor.addLayerIcon(AllIcons.Nodes.StaticMark);
}
if((flags & Iconable.ICON_FLAG_VISIBILITY) != 0)
{
if(owner.hasModifierProperty(PsiModifier.PUBLIC))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_public);
}
else if(owner.hasModifierProperty(PsiModifier.PRIVATE))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_private);
}
else if(owner.hasModifierProperty(PsiModifier.PROTECTED))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_protected);
}
else if(owner.hasModifierProperty(PsiModifier.PACKAGE_LOCAL))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_plocal);
}
}
}
示例3: processModifierListOwner
import consulo.ide.IconDescriptor; //导入方法依赖的package包/类
@RequiredReadAction
private static void processModifierListOwner(PsiElement element, IconDescriptor iconDescriptor, int flags)
{
DotNetModifierListOwner owner = (DotNetModifierListOwner) element;
if(BitUtil.isSet(flags, Iconable.ICON_FLAG_VISIBILITY))
{
if(owner.hasModifier(CSharpModifier.PRIVATE))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_private);
}
else if(owner.hasModifier(CSharpModifier.PUBLIC))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_public);
}
else if(owner.hasModifier(CSharpModifier.PROTECTED))
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_protected);
}
else
{
iconDescriptor.setRightIcon(AllIcons.Nodes.C_plocal);
}
}
if(owner.hasModifier(CSharpModifier.STATIC) && !(owner instanceof CSharpTypeDeclaration))
{
iconDescriptor.addLayerIcon(AllIcons.Nodes.StaticMark);
}
if(owner.hasModifier(CSharpModifier.SEALED) || owner.hasModifier(CSharpModifier.READONLY) || element instanceof DotNetVariable && ((DotNetVariable) element).isConstant())
{
iconDescriptor.addLayerIcon(AllIcons.Nodes.FinalMark);
}
// dont check it for msil wrappers
if(!(element instanceof MsilElementWrapper))
{
if(element instanceof DotNetTypeDeclaration && DotNetRunUtil.hasEntryPoint((DotNetTypeDeclaration) element) || element instanceof DotNetMethodDeclaration && DotNetRunUtil.isEntryPoint(
(DotNetMethodDeclaration) element))
{
iconDescriptor.addLayerIcon(AllIcons.Nodes.RunnableMark);
}
}
}