How can I add an icon to the leftside of file for a specific PsiElement? Follow
I have got a specific PsiElement as follows:
// get the element
PsiElement element = memberList[index].getOriginalElement();
For example, I get class FatherController and method speakWhat() by @MyAnnotation(2 PsiElement)
Now the problem is how can I add the same icon on the left of 2 PsiElements?
Addtional: I hope clicking the icon will aumatically jump to the line of the corresponding PsiElement.
Please sign in to leave a comment.
If I understand correctly, you want to add gutter icons for annotations.
You need to implement a line marker provider. See https://plugins.jetbrains.com/docs/intellij/line-marker-provider.html for the example implementations.
In general, I recommend going through the docs or asking this kind of question ("what feature is it?") on Slack.