Creating a ui with Swing models based on PSI - recommendations


I'm creating a plugin which, among other things, needs to display a user
interface (composed of fields, tables, etc) backed by an XML file. The ui is
to be displayed using a FileEditor (similar to how the web.xml file editor
does it I presume).

Since I want the user to be able to edit the XML file by hand, as well as
through the ui, I thought the best solution would be to have the swing
components have custom Models (javax.swing.Document for JTextFields,
TableModel for tables, etc) that are synchronized with IDEA's
com.intellij.openapi.editor.Document of the file, via a

Has anyone had any experience with this? A link to some existing code base
that does something similar would be even better of course ;)

Arik Kfir.

Please sign in to leave a comment.