mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
make java method/field deferred icons not flickering IDEA-343602
GitOrigin-RevId: 56bbc9a8235bab6032ce6da531b517780f34c0c5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6c0c329ac4
commit
0e123a278a
@@ -227,13 +227,19 @@ public class ClsFieldImpl extends ClsMemberImpl<PsiFieldStub> implements PsiFiel
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getElementIcon(final int flags) {
|
||||
public Icon getElementIcon(int flags) {
|
||||
IconManager iconManager = IconManager.getInstance();
|
||||
RowIcon baseIcon =
|
||||
iconManager.createLayeredIcon(this, iconManager.getPlatformIcon(PlatformIcons.Field), ElementPresentationUtil.getFlags(this, false));
|
||||
iconManager.createLayeredIcon(this, getBaseIcon(), ElementPresentationUtil.getFlags(this, false));
|
||||
return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NotNull Icon getBaseIcon() {
|
||||
IconManager iconManager = IconManager.getInstance();
|
||||
return iconManager.getPlatformIcon(PlatformIcons.Field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEquivalentTo(final PsiElement another) {
|
||||
return PsiClassImplUtil.isFieldEquivalentTo(this, another);
|
||||
|
||||
@@ -295,14 +295,18 @@ public final class ClsMethodImpl extends ClsMemberImpl<PsiMethodStub> implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getElementIcon(final int flags) {
|
||||
public Icon getElementIcon(int flags) {
|
||||
IconManager iconManager = IconManager.getInstance();
|
||||
Icon methodIcon =
|
||||
iconManager.getPlatformIcon(hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.AbstractMethod : PlatformIcons.Method);
|
||||
RowIcon baseIcon = iconManager.createLayeredIcon(this, methodIcon, ElementPresentationUtil.getFlags(this, false));
|
||||
RowIcon baseIcon = iconManager.createLayeredIcon(this, getBaseIcon(), ElementPresentationUtil.getFlags(this, false));
|
||||
return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NotNull Icon getBaseIcon() {
|
||||
PlatformIcons iconId = hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.AbstractMethod : PlatformIcons.Method;
|
||||
return IconManager.getInstance().getPlatformIcon(iconId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEquivalentTo(final PsiElement another) {
|
||||
return PsiClassImplUtil.isMethodEquivalentTo(this, another);
|
||||
|
||||
@@ -263,10 +263,16 @@ public class PsiFieldImpl extends JavaStubPsiElement<PsiFieldStub> implements Ps
|
||||
public Icon getElementIcon(int flags) {
|
||||
IconManager iconManager = IconManager.getInstance();
|
||||
RowIcon baseIcon =
|
||||
iconManager.createLayeredIcon(this, iconManager.getPlatformIcon(PlatformIcons.Field), ElementPresentationUtil.getFlags(this, false));
|
||||
iconManager.createLayeredIcon(this, getBaseIcon(), ElementPresentationUtil.getFlags(this, false));
|
||||
return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NotNull Icon getBaseIcon() {
|
||||
IconManager iconManager = IconManager.getInstance();
|
||||
return iconManager.getPlatformIcon(PlatformIcons.Field);
|
||||
}
|
||||
|
||||
private static final class OurConstValueComputer implements JavaResolveCache.ConstValueComputer {
|
||||
private static final OurConstValueComputer INSTANCE = new OurConstValueComputer();
|
||||
|
||||
|
||||
@@ -334,12 +334,16 @@ public class PsiMethodImpl extends JavaStubPsiElement<PsiMethodStub> implements
|
||||
@Override
|
||||
public Icon getElementIcon(int flags) {
|
||||
IconManager iconManager = IconManager.getInstance();
|
||||
Icon methodIcon =
|
||||
iconManager.getPlatformIcon(hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.AbstractMethod : PlatformIcons.Method);
|
||||
RowIcon baseIcon = iconManager.createLayeredIcon(this, methodIcon, ElementPresentationUtil.getFlags(this, false));
|
||||
RowIcon baseIcon = iconManager.createLayeredIcon(this, getBaseIcon(), ElementPresentationUtil.getFlags(this, false));
|
||||
return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected @NotNull Icon getBaseIcon() {
|
||||
PlatformIcons iconId = hasModifierProperty(PsiModifier.ABSTRACT) ? PlatformIcons.AbstractMethod : PlatformIcons.Method;
|
||||
return IconManager.getInstance().getPlatformIcon(iconId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEquivalentTo(PsiElement another) {
|
||||
return PsiClassImplUtil.isMethodEquivalentTo(this, another);
|
||||
|
||||
Reference in New Issue
Block a user