Adding quick fix or intention to existing problems fround through other inspections

Answered

Is there a way to add quick fix or intentions from a plugin? For example:


I'd like to add either a quickfix or an intention that perhaps shows up under "More actions".
Current I'm using the `errorQuickFixProvider` extension point but that only seems to work with syntatical errors that the IDE finds. I'd like my intention/quickfix to show up for all the problems on the page.

Is there some API that I could use to do this?

Thanks!

4 comments
Comment actions Permalink

Hi,

Unfortunately, there is no API that would allow achieving it.

1
Comment actions Permalink

I managed to get it working using the HighlightInfoFilter extension point - I understand this is meant for filtering out highlights but I'm using it to mutate the highlightInfo and register a quickfix using `highlightInfo#registerFix`. Do you see any problems with using it this way? Appreciate any comments, and thanks for responding!

0
Comment actions Permalink

Using API in an unintentional way is a bad idea. Its behavior may be changed in a way that may break your code, e.g., HighlightInfo may become immutable by wrapping it after it is created/registered.

1
Comment actions Permalink

Noted, thanks! Is there any other way I could get a list of all the problems in the current file to do something with them? Perhaps maybe I could Gutter Icons with actions for each problem, or just show them in a separate Pane with the actions I want.

0

Please sign in to leave a comment.