LineMarkerProvider Icon is not shown
Answered
Hi, i'm working on an Android Studio Plugin, where i use a LineMarkerProvider to show an icon(for now a Jar Icon) with an action next to a line with the word "deepLink". When i use the gradle plugin and set version '2019.1.3', everything works fine.
But when i use version '192.7142.36' (to target Android Studio). A small dot is shown instead of my icon. When i hover over the dot, i get the tootip and action and everything works as expected. The Jar Icon is 16x16 png, but i tried various icons.

Here is my LinemarkerProvider:
class DeepLinkLineMarkerProvider : LineMarkerProvider {
override fun getLineMarkerInfo(p0: PsiElement): LineMarkerInfo<*>? {
val element = p0
if (element is XmlTokenImpl) {
when (element.text) {
"deepLink" -> {
return LineMarkerInfo(element, element.textRange,
SimpleIcons.LINK, { "Start a deepLink" }, { _: MouseEvent, _: XmlTokenImpl ->
}, GutterIconRenderer.Alignment.CENTER
)
}
else -> {
return null
}
}
} else {
return null
}
}
}
What could be the reason that my icon is not compatible with this version?
Please sign in to leave a comment.
Hi everyone, i could solve my issue. The problem was that the path to the icon was not starting with an "/".