Plug into the back and forward navigation mechanism
Answered
I am building a plugin with my own FileEditor for a file type wich is not a TextFileEditor. Still I would like to plug into the back and forward navigation mechanism so I can push places onto the history stack and get callbacks when the user uses the back button.
Is this even possible? And if yes, how?
Please sign in to leave a comment.
Hi Sven,
I don't see any way of integrating with the IdeDocumentHistory for non-text editors. Its logic for retrieving caret position supports only TextEditors.
Thanks. Could you nonetheless give me an idea of how this works? Maybe I could create a "virtual text editor" since I have something like a caret position.
Otherwise I would just create my own history stack just for my plugin.
I suggest setting breakpoints in public methods of the IdeDocumentHistoryImpl class and inspecting what is done in specific contexts.
Thanks for the explanation. I will see what I can do with it.