I'm stuck, in the CamouflagePlugin. To provide
auto-folding/camouflaging, and fix a huge bug, I need to know ..
Q1/ How to detect that the caret entered/left a foldregion?
..without scanning all the fold regions, after each single caracter
move of the caret ?
Q2/ How to detect code changes ?
As the user types, and refactor, I need to detect some specific code
- add/remove the keyword "final"
- change in the for statements parameter lists
- change in if condition or block statement
How can I do that? I checked the Psi classes for appropriate listeners, but
only Mouse and MouseMotion listeners.
CaretListener only listens to caretPositionChanged
I guess I need some
that would offer :
Should a solution exist for the problems above,
Q3/ how to add a listener to all the editors, current and future?