mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 20:41:22 +07:00
The initial purpose of doHighlight was to measure the time it takes to apply different text attributes (color, style, etc.) to tokens. However, there hasn't been (and still isn't) a generic way to achieve this effectively. Currently, this command triggers HighlightVisitorBasedInspection, which is essentially a "mock" inspection used in Global Analysis tools (such as inspect.sh, Qodana, etc.). This inspection combines three functionalities—syntax error, annotator, and generic error—into one. As a result, the highlighting produced by this command is a very rough estimation, if not just random values. Highlighting in general is handled by the editor, which leverages information from the parser, annotators, additional passes, and specific inspections (e.g., dead code, which has a unique severity that makes the code appear grey). At this point, we do not have a clear way to make doHighlight work correctly, nor are we certain it's needed at all. GitOrigin-RevId: 8c821f456e867395bb6de55a142a000cfc3a50a9