mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
Rework annotators engine to make annotators run in parallel, each on all relevant PSI elements in their own order (makes fast annotators complete faster to allow them to remove outdated highlighters faster). For that, for each annotator (in parallel): - create its own AnnotationHolder - rearrange its PSI elements in "time to first diagnostic in previous run" order, to reduce latency. - run annotator on these PSI elements sequentially - as soon as annotator produces info/fails to produce the same info from the previous run, update the corresponding range highlighters Pleas note, there's no more contract "Do not call annotators for parent PSI if some (maybe completely unrelated) annotator/highlight visitor produced error for some PSI element". Fix highlighting tests, the majority of which relied on annotator order, or implicit contract above. Fix a bunch of annotators which tried to double-visit some PSI elements to fight the contract above. GitOrigin-RevId: 74f727fc6d3be3f500cdbb0f26e7d0daf1ffe7ff
4 lines
164 B
Python
4 lines
164 B
Python
<error descr="Python version 3.9 does not support match statements"><info descr="null">match</info></error> 42:
|
|
<info descr="null">case</info> 42:
|
|
pass
|