Gutter icons refresh
Answered
Is there a mechanism that allows to trigger gutter icons state refresh? I develop a plugin that draws an icon in the gutter if there is a certain data ("true" boolean) from third-party server's response. And it should drop the icons (in the visible area, at least) if the boolean is "false". I have some business-logic in the overriden public LineMarkerInfo<PsiElement> getLineMarkerInfo(@NotNull PsiElement element) of LineMarkerProviderDescriptor, which return "null" if that boolean is false, but my custom icons in the gutter are still present. How often getLineMarkerInfo() is called if I do not scroll anything in the editor? May be I can fire a certain event or something?
Please sign in to leave a comment.
Updates of UI elements in the IDE are done when there is a change in the file/PSI so to trigger an update you can get the file re-processed for highlights which includes line markers with: