How to Add API-Derived Problems to the File-Level of the Problems Tab Across All Languages?
已回答
Hi,
I’m developing a plugin that uses an external API to analyze files and return potential issues. I want to add these issues to the file-level in the Problems tab and also underline them in the editor.
I’ve come across both Annotators and LocalInspectionTools, but I’m unsure which approach is best to handle the following scenario:
- My API works with any programming language (e.g., Java, Python, etc.), and I want to ensure these problems can be added regardless of the file type.
- Is it possible to generalize declarations in
plugin.xml
so that the plugin works for all languages, or do I need to declare specific language extensions for each one?
Any guidance or examples on how to set this up to work across languages would be greatly appreciated!
请先登录再写评论。
Update:
I've managed to achieve this, it seems like the way to go is to use an external annotator and leave the
language
property empty when declaring the extension point. You can refer to examples in SonarLint: