Is it possible to add line markers (gutter icons) without a file change?

In my plugin, I want a line marker to appear next to a function definition if that function can be found in a certain database. The function may appear in the database any time, so I want to poll the database every 2 seconds or so to check for the function. The moment I find the function, I want to show the line marker. This means I don't want to wait for the file to change to run my LineMarkerProvider. Is this possible?

If not, is there any other way to provide some kind of clickable element associated with a PsiElement that I can show at any time? The best solution I can think of is just to check if the caret is inside the function definition, but this doesn't provide any up front hint to the user.

0
1 comment
Avatar
Permanently deleted user

as soon as your certain interpol database changes, you can call

`DaemonCodeAnalyzer.restart()` which will cause re-highlighting of everything, which will lead to your LIneMarkerProvider being called.

1

Please sign in to leave a comment.