The right way to create Windows in Idea

Hallo

I have a working Eclipse Plugin that I should rewrite as an IntelliJ Plugin. Its basically an MultiPagedEditor consisting of Frames. On my first try created an Action that starts a Thread and draws a Frame with a TabbedPane containing all the Frames I need. It kind of works but is probably the wrong way to do it and has some serious Problems. For Instance I cant use the Messages class because I use another Thread. What is the right way to do this?

1 comment
Comment actions Permalink

Hello Michael,

All UI operations must be performed from the event dispatch thread, not from
an arbitrary thread started by your plugin. This limitation is not specific
to IntelliJ IDEA, and is a general feature of Swing. To pass control from
your thread to the event dispatch thread, you can use the SwingUtilities.invokeLater()
method.

Since most IDEA plugins do not create their own top-level windows, there
is no specific framework in IntelliJ IDEA for that.

I have a working Eclipse Plugin that I should rewrite as an IntelliJ
Plugin. Its basically an MultiPagedEditor consisting of Frames. On my
first try created an Action that starts a Thread and draws a Frame
with a TabbedPane containing all the Frames I need. It kind of works
but is probably the wrong way to do it and has some serious Problems.
For Instance I cant use the Messages class because I use another
Thread. What is the right way to do this?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.