A> Ive implemented a custom file editor (extends PerspectiveFileEditor). A> How do save the edited file (in a custom xml)? what method have I to A> override?
If your custom xml file is the file which is passed to the PerspectiveFileEditor constructor, then you need to modify the document linked to the file as the user is making changes in the editor, and IDEA will handle saving automatically. If your custom xml file is not in any way related to it, then you'll have to save it by yourself at whatever time you consider appropriate - there is no method to override for this.
Hello Andre,
A> Ive implemented a custom file editor (extends PerspectiveFileEditor).
A> How do save the edited file (in a custom xml)? what method have I to
A> override?
If your custom xml file is the file which is passed to the PerspectiveFileEditor
constructor, then you need to modify the document linked to the file as the
user is making changes in the editor, and IDEA will handle saving automatically.
If your custom xml file is not in any way related to it, then you'll have
to save it by yourself at whatever time you consider appropriate - there
is no method to override for this.
--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi Dmitry,
I'm editing my file using BasicGraphComponent created inside a PerspectiveFileEditor. I don't know how to manipulate documents in this case...
Have I to create a listener in my graph and call PerspetiveFileEditor.getDocuments()[0].xxxx every time graph changes?
Andre
I'd suggest you to do the changes through PSI in your XML file on every
change in your graph. Changing document directly is a bit hard.
"Andre" <ad-rocha@uol.com.br> wrote in message
news:32886782.1159801073882.JavaMail.itn@is.intellij.net...
>
>
>
Thanks Peter,
I'll do that.
Andre