InlayHints: add example

GitOrigin-RevId: 5f0f2a16a1334061cf3d157fee378b18bba9b7b1
This commit is contained in:
Roman.Ivanov
2019-07-02 07:30:13 +03:00
committed by intellij-monorepo-bot
parent b524745152
commit 4115b05022
@@ -98,7 +98,7 @@ class AnnotationInlayProvider : InlayHintsProvider<AnnotationInlayProvider.Setti
seq(
psiSingleReference(smallText(attribute.name ?: ""), resolve = { attribute.reference?.resolve() }),
smallText(" = "),
smallText(attribute.value?.text ?: "") // TODO values references, at least annotations and enum names
smallText(attribute.value?.text ?: "")
)
}
}
@@ -111,7 +111,13 @@ class AnnotationInlayProvider : InlayHintsProvider<AnnotationInlayProvider.Setti
override val key: SettingsKey<Settings>
get() = ourKey
override val previewText: String?
get() = "" // TODO
get() = """
class Demo {
private static int pure(int x, int y) {
return x * y + 10;
}
}
""".trimIndent()
override fun createConfigurable(settings: Settings): ImmediateConfigurable {
return object : ImmediateConfigurable {