add icon for Kotlin annotation classes

#KT-11814 Fixed
This commit is contained in:
Dmitry Jemerov
2016-05-24 19:22:36 +02:00
parent 22d378997c
commit 1865750606
6 changed files with 6 additions and 4 deletions
@@ -102,7 +102,7 @@ public final class KotlinDescriptorIconProvider {
if (descriptor instanceof ClassDescriptor) {
switch (((ClassDescriptor) descriptor).getKind()) {
case INTERFACE:
return KotlinIcons.TRAIT;
return KotlinIcons.INTERFACE;
case ENUM_CLASS:
return KotlinIcons.ENUM;
case ENUM_ENTRY:
@@ -99,8 +99,9 @@ class KotlinIconProvider : IconProvider(), DumbAware {
}
is KtFunctionLiteral -> KotlinIcons.LAMBDA
is KtClass -> when {
isInterface() -> KotlinIcons.TRAIT
isInterface() -> KotlinIcons.INTERFACE
isEnum() -> KotlinIcons.ENUM
isAnnotation() -> KotlinIcons.ANNOTATION
this is KtEnumEntry && getPrimaryConstructorParameterList() == null -> KotlinIcons.ENUM
else -> KotlinIcons.CLASS
}
@@ -32,7 +32,8 @@ public interface KotlinIcons {
Icon FILE = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_file.png");
Icon ACTIVITY = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/kotlin_activity.png");
Icon OBJECT = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/objectKotlin.png");
Icon TRAIT = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/interfaceKotlin.png");
Icon INTERFACE = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/interfaceKotlin.png");
Icon ANNOTATION = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/annotationKotlin.png");
Icon FUNCTION = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/function.png");
Icon EXTENSION_FUNCTION = PlatformIcons.FUNCTION_ICON;
Icon LAMBDA = IconLoader.getIcon("/org/jetbrains/kotlin/idea/icons/lambda.png");