More adjustment in icons
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 633 B |
Binary file not shown.
|
After Width: | Height: | Size: 713 B |
@@ -76,7 +76,8 @@ public final class JetDescriptorIconProvider {
|
||||
return PlatformIcons.PACKAGE_OPEN_ICON;
|
||||
}
|
||||
if (descriptor instanceof FunctionDescriptor) {
|
||||
return JetIcons.FUNCTION;
|
||||
return descriptor.getContainingDeclaration() instanceof ClassDescriptor ?
|
||||
PlatformIcons.METHOD_ICON : JetIcons.FUNCTION;
|
||||
}
|
||||
if (descriptor instanceof ClassDescriptor) {
|
||||
switch (((ClassDescriptor)descriptor).getKind()) {
|
||||
@@ -97,9 +98,20 @@ public final class JetDescriptorIconProvider {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (descriptor instanceof ValueParameterDescriptor) {
|
||||
return JetIcons.PARAMETER;
|
||||
}
|
||||
|
||||
if (descriptor instanceof LocalVariableDescriptor) {
|
||||
return ((LocalVariableDescriptor)descriptor).isVar() ? JetIcons.VAR : JetIcons.VAL;
|
||||
}
|
||||
|
||||
if (descriptor instanceof PropertyDescriptor) {
|
||||
return ((PropertyDescriptor)descriptor).isVar() ? JetIcons.VAR : JetIcons.VAL;
|
||||
return ((PropertyDescriptor)descriptor).isVar() ? JetIcons.FIELD_VAR : JetIcons.FIELD_VAL;
|
||||
}
|
||||
|
||||
if (descriptor instanceof TypeParameterDescriptor) {
|
||||
return PlatformIcons.CLASS_ICON;
|
||||
}
|
||||
|
||||
LOG.warn("No icon for descriptor: " + descriptor);
|
||||
|
||||
@@ -64,7 +64,7 @@ public class JetIconProvider extends IconProvider {
|
||||
}
|
||||
if (psiElement instanceof JetNamedFunction) {
|
||||
return PsiTreeUtil.getParentOfType(psiElement, JetNamedDeclaration.class) instanceof JetClass
|
||||
? JetIcons.LAMBDA
|
||||
? PlatformIcons.METHOD_ICON
|
||||
: JetIcons.FUNCTION;
|
||||
}
|
||||
if (psiElement instanceof JetClass) {
|
||||
@@ -90,14 +90,14 @@ public class JetIconProvider extends IconProvider {
|
||||
if (parameter.getValOrVarNode() != null) {
|
||||
JetParameterList parameterList = PsiTreeUtil.getParentOfType(psiElement, JetParameterList.class);
|
||||
if (parameterList != null && parameterList.getParent() instanceof JetClass) {
|
||||
return parameter.isVarArg() ? JetIcons.VAR : JetIcons.VAL;
|
||||
return parameter.isMutable() ? JetIcons.FIELD_VAR : JetIcons.FIELD_VAL;
|
||||
}
|
||||
}
|
||||
return JetIcons.PARAMETER;
|
||||
}
|
||||
if (psiElement instanceof JetProperty) {
|
||||
JetProperty property = (JetProperty)psiElement;
|
||||
return property.isVar() ? JetIcons.VAR : JetIcons.VAL;
|
||||
return property.isVar() ? JetIcons.FIELD_VAR : JetIcons.FIELD_VAL;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -34,4 +34,6 @@ public interface JetIcons {
|
||||
Icon VAR = IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/variable.png");
|
||||
Icon VAL = IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/value.png");
|
||||
Icon PARAMETER = IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/parameter.png");
|
||||
Icon FIELD_VAL = IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/field_value.png");
|
||||
Icon FIELD_VAR = IconLoader.getIcon("/org/jetbrains/jet/plugin/icons/field_variable.png");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user