How to keep scan results of previously opened files in the Problems tool window

已回答

Description:
I am trying to integrate a custom scanner/linter with IntelliJ IDEA. My goal is to show errors/warnings in the Problems tool window.

Currently, the File tab of the Problems window only shows issues for the currently active file. As soon as I switch to another file, the previous file’s errors are no longer visible there.

What I would like to achieve is:

  • Keep the errors of previously opened files stored in the File tab (not just the currently active one).
  • Essentially, the Problems window should accumulate issues for all recently opened files, so the user can switch back without losing context.
  • I do not want to use the Analyze → Inspect Code… option, because that relies on GlobalInspectionTool, and I want this behavior to come directly from my custom scanner / inspection flow.

Question:
Is there a way to customize or extend IntelliJ so that the File tab of the Problems tool window can retain results for previously opened files?

  • Do I need to hook into the ProblemsProvider / InspectionProfile APIs?
  • Or is there an extension point to override the default behavior of the File tab?
  • If not, is the only option to create a custom tab in the Problems window that persists my results?

Any guidance or pointers to the right APIs would be greatly appreciated!

0

Hello Aniket,

I recommend reviewing the source code in this package in GitHub.
This may help you in addressing your task.

At the moment, our support team does not provide assistance with plugin development. We kindly suggest visiting the JetBrains Platform Forum and creating a new post there if you require more detailed information regarding your request.

Thank you for your understanding.

0

请先登录再写评论。