mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
lazy icons for groovy elements
This commit is contained in:
+2
-1
@@ -240,7 +240,8 @@ public class GrFieldImpl extends GrVariableBaseImpl<GrFieldStub> implements GrFi
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Icon getIcon(int flags) {
|
||||
@Override
|
||||
protected Icon getElementIcon(@IconFlags int flags) {
|
||||
Icon superIcon = JetgroovyIcons.Groovy.Field;
|
||||
if (!isProperty()) return superIcon;
|
||||
LayeredIcon rowIcon = new LayeredIcon(2);
|
||||
|
||||
+3
-5
@@ -19,10 +19,7 @@ package org.jetbrains.plugins.groovy.lang.psi.impl.statements.typedef;
|
||||
import com.intellij.lang.ASTNode;
|
||||
import com.intellij.navigation.ItemPresentation;
|
||||
import com.intellij.navigation.ItemPresentationProviders;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.Pair;
|
||||
import com.intellij.openapi.util.RecursionGuard;
|
||||
import com.intellij.openapi.util.RecursionManager;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.codeStyle.CodeStyleSettings;
|
||||
@@ -680,7 +677,8 @@ public abstract class GrTypeDefinitionImpl extends GrStubElementBase<GrTypeDefin
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Icon getIcon(int flags) {
|
||||
@Override
|
||||
protected Icon getElementIcon(@IconFlags int flags) {
|
||||
Icon icon = getIconInner();
|
||||
final boolean isLocked = (flags & ICON_FLAG_READ_STATUS) != 0 && !isWritable();
|
||||
RowIcon rowIcon = createLayeredIcon(this, icon, ElementPresentationUtil.getFlags(this, isLocked) | getFlagsInner());
|
||||
|
||||
+2
-1
@@ -297,8 +297,9 @@ public abstract class GrMethodBaseImpl extends GrStubElementBase<GrMethodStub> i
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Icon getIcon(int flags) {
|
||||
protected Icon getElementIcon(@IconFlags int flags) {
|
||||
RowIcon baseIcon = ElementPresentationUtil.createLayeredIcon(JetgroovyIcons.Groovy.Method, this, false);
|
||||
return ElementPresentationUtil.addVisibilityIcon(this, flags, baseIcon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user