File "inspection"

In my plugin, I want to create an "inspection" that checks the filenames in your project to flag potentially invalid ones according to my plugin. My idea was to flag the file with an underline similar to the one in the Project navigator when a Java file contains errors.

I'm already showing an explanation when you open the file using a local inspection, but I want to do it without people having to open the files.

Thank you!

2 comments
Comment actions Permalink

For performance reasons, inspections in IntelliJ IDEA run only for files open in the editor. You can try to add a wavy underline directly using DaemonCodeAnalyzerEx.addFileLevelHighlight(), but I'm not sure whether there is a good way to ensure the highlighting is removed if the user renames the file.

0
Comment actions Permalink

It makes sense. I'll avoid adding the underline, then. A simple file intention will have to do for now. Thank you!

0

Please sign in to leave a comment.