Hello. I try to create plugin. I created custom ed...
# intellij-plugins
c
Hello. I try to create plugin. I created custom editor for non-text format. How I can use embedded redo and undo functions? And second question: when I must save my operation data into disk? Does IDE send some event for save data into disk?
h
Since none of those questions are kotlin specific, it might be a good idea to ask somewhere else?
That said, the undo/redo functions work out of the box if you register your actions properly. Ihave found this to be a well-functionning text change function:
WriteCommandAction.runWriteCommandAction(project) { editor.document.replaceString(textOffset, textOffset + textLength, "New text here") }
c
I don't have any document. I have 3D editor and game scene )
i mean that my custom editor - is 3D scene editor
h
Stupid me, I should have read your original post. But did you look at any examples? In the UMLplugin, for instance, maybe that's where you'll find out how and when to save to disk? https://github.com/esteinberg/plantuml4idea