Implementing custom Inspections Widgets
Answered
Hi Team,
Currently I am developing a plugin for IntelliJ Idea community edition,
In that I want it use custom inspection widgets next to the default inspections widget warnings intelliJ has.
Eg: Take a look at this sonarlint icon which displays near the default inspection warnings
Similar to this I want to add my own custom icons and warnings.
Can you guide me how to achieve this
Thanks.
Please sign in to leave a comment.
You can provide custom severities in your plugin via extension point
com.intellij.codeInsight.daemon.impl.SeveritiesProvider
Hi Yann Cebron,
Thank you for the suggestion, but still I am unable to achieve my goal here, The
SeveritiesProvider
class in IntelliJ's plugin development framework is designed to allow custom implementations of severity levels for inspections and code highlighting. But I don't want to do any inspection or code highlighting, Instead I have a set of data that I need to display in the editor screen, lets say I have a JBPanel like this which data will change based on the what file is open.and I want to place this panel in the editor screen next to where the intelliJs default inspection widgets are present, only the visual representation of the data I have is enough, please let me know, if this could be possible or not, just for an example I took panel but it does not have to be a JBPanel, it could be anything but I need my data specific to the current open file should be populated to the editor screen like in the picture above.
Thank you
No, we don't have an API for that. You can use LineMarkerProvider for drawing custom icons next to the lines you want though
Thank you Alexey for the information, I'll try to find out different approach or might change the requirement and come back