I am posting this despite having found other people complaining about a similar issue.
I have implemented a plugin for intellij to help me with a certain mangling scheme for identifiers.
Identifiers with extraneous characters, such as
are represented in code by a mangled identifier, such as
In order to see what's going on, these identifiers are kept folded via a plugin implementing the extension point
The placeholder text is the unmangled identifier. (Another action is used to edit mangled identifiers)
This works swell, in all but one detail. Code gets unfolded much more often than it should. When I try to unfold a single identifier (by the "expand" action), every identifier gets unfolded! Pasted text gets unfolded... etc.
I have seen other people complain about excessive unfolding (e.g. https://intellij-support.jetbrains.com/hc/en-us/community/posts/206809345-Turning-off-Auto-code-unfolding?input_string=Folding%20%2F%20Unfolding%20of%20a%20single%20item), my question is:
Is there anything I can do as a plugin developer to prevent this?