add icon for Kotlin annotation classes
#KT-11814 Fixed
This commit is contained in:
@@ -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");
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
@@ -58,7 +58,7 @@ public class NewKotlinFileAction extends CreateFileFromTemplateAction implements
|
||||
.setTitle("New Kotlin File/Class")
|
||||
.addKind("File", KotlinFileType.INSTANCE.getIcon(), "Kotlin File")
|
||||
.addKind("Class", KotlinIcons.CLASS, "Kotlin Class")
|
||||
.addKind("Interface", KotlinIcons.TRAIT, "Kotlin Interface")
|
||||
.addKind("Interface", KotlinIcons.INTERFACE, "Kotlin Interface")
|
||||
.addKind("Enum class", KotlinIcons.ENUM, "Kotlin Enum")
|
||||
.addKind("Object", KotlinIcons.OBJECT, "Kotlin Object");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user