The mechanism through which a debug breakpoint comes to be associated with a particular line of text has what I want - the ability to track a particular statement, no matter how the file it's in is edited, and associate data with it. In this particular case, a breakpoint.
Moreover, the association persists between VMs (that is it endures through the closing
and re-opening of IntelliJ).
This ability is all I have ever dreamed of. How is it achieved and can I break myself off a little bit of the action?
I have tried to use UserData, but I can't persist the info.
I also tried to use the PSI as a type of makeshift URI. However, if two lines are EXACTLY the same text and come one right after the other, then there is no way to differentiate them using the PSI, except the fact that one comes before the other, which is useless.
Most things in the PSI are unique by virtue of the "paths" in the PSI that (can be used to) describe them, somewhat the way URIs are unique. But actually, as in the above example, two different lines can be indistinguishable as far as the PSI is concerned.
I just know this can be done. Breakpoints do it and so do VCS annotations. How do bookmarks work? I search the OpenAPI but found nothing for "bookmark".
In actuality, if anyone is in a position to give me exactly what I want, what I need is more fine-grained than what bookmarks and breakpoints offer, since I want to associate data with individual PSI elements.