mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin, ui] use correct icon in Kotlin for visibility KTIJ-28601
GitOrigin-RevId: afce8a4695366c15463da10f8dca0cd0a055ae48
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f3667aeb29
commit
1296efe5b8
@@ -40,7 +40,7 @@ import javax.swing.Icon
|
||||
class CoreIconManager : IconManager, CoreAwareIconManager {
|
||||
override fun getPlatformIcon(id: PlatformIcons): Icon {
|
||||
return when (id) {
|
||||
PlatformIcons.Public -> AllIcons.Nodes.Public
|
||||
PlatformIcons.Public -> AllIcons.Nodes.C_public
|
||||
PlatformIcons.Private -> AllIcons.Nodes.C_private
|
||||
PlatformIcons.Protected -> AllIcons.Nodes.C_protected
|
||||
PlatformIcons.Local -> AllIcons.Nodes.C_plocal
|
||||
|
||||
@@ -123,7 +123,7 @@ abstract class KotlinIconProvider : IconProvider(), DumbAware {
|
||||
null
|
||||
}
|
||||
|
||||
return icon?.let(IconManager.getInstance()::getPlatformIcon) ?: PlatformIcons.PUBLIC_ICON
|
||||
return (icon ?: com.intellij.ui.PlatformIcons.Public).let(IconManager.getInstance()::getPlatformIcon)
|
||||
}
|
||||
|
||||
private fun PsiFile.scriptIcon(): Icon = when {
|
||||
|
||||
@@ -11,7 +11,7 @@ import javax.swing.Icon
|
||||
|
||||
class KotlinIconProviderTest: KotlinLightCodeInsightFixtureTestCase() {
|
||||
fun testPublicClassFile() {
|
||||
createFileAndCheckIcon("Foo.kt", "class Foo", "org/jetbrains/kotlin/idea/icons/classKotlin.svg", "nodes/c_public.svg")
|
||||
createFileAndCheckIcon("Foo.kt", "class Foo", "org/jetbrains/kotlin/idea/icons/classKotlin.svg", "Public")
|
||||
}
|
||||
|
||||
fun testFileSingleFunction() {
|
||||
@@ -23,7 +23,7 @@ class KotlinIconProviderTest: KotlinLightCodeInsightFixtureTestCase() {
|
||||
typealias F = Foo
|
||||
class Foo
|
||||
""".trimIndent()
|
||||
createFileAndCheckIcon("Foo.kt", fileBody, "org/jetbrains/kotlin/idea/icons/classKotlin.svg", "nodes/c_public.svg")
|
||||
createFileAndCheckIcon("Foo.kt", fileBody, "org/jetbrains/kotlin/idea/icons/classKotlin.svg", "Public")
|
||||
}
|
||||
|
||||
fun testClassAndPrivateFunction() {
|
||||
@@ -31,7 +31,7 @@ class KotlinIconProviderTest: KotlinLightCodeInsightFixtureTestCase() {
|
||||
class Foo
|
||||
private fun bar() {}
|
||||
""".trimIndent()
|
||||
createFileAndCheckIcon("Foo.kt", fileBody, "org/jetbrains/kotlin/idea/icons/classKotlin.svg", "nodes/c_public.svg")
|
||||
createFileAndCheckIcon("Foo.kt", fileBody, "org/jetbrains/kotlin/idea/icons/classKotlin.svg", "Public")
|
||||
}
|
||||
|
||||
fun testClassAndInternalFunction() {
|
||||
|
||||
Reference in New Issue
Block a user