How to refresh Line markers for currently opened file?

Answered

LineMarkerProvider#collectSlowLineMarkers() is only called when a new file is opened. But I'd like to show these line markers on demand (when the user presses something). This will work for newly opened files but not for those files which are already open(LineMarkerProvider#collectSlowLineMarkers() is not called again for the same file).

0
3 comments

Try with:

 DaemonCodeAnalyzer.getInstance(project).restart(psiFile)
 
0
Avatar
Permanently deleted user

Thanks. This works.

0

Where should I invoke this method? I want the line markers to be refreshed every time the file changes.

0

Please sign in to leave a comment.