Retrieving error/warning highlights in IntelliJ Idea

Hello!

I am currently developing a plugin that needs to obtain the error/warning highlights from the IDE. I do not need to produce them, but I am wondering what subsystem produces them, and what API I can use to retrieve them.

Thank you for the help!

Have a nice day.

You may try something like com.intellij.codeInspection.InspectionEngine.inspectElements to process elements of file and get highlights.