How to obtain frame reference of Intellij Application ?

Hi,
I developing a plug-in , and I need a frame reference of Intellij to be passed to my classes , so that I can pass as parent to messagebox, or dialog.
I can't find any API from ApplicationManager that able to do that.

How can I retrieve the Intellij's jframe reference ?

thank

1 comment
Comment actions Permalink

Hello geekycoder,

I developing a plug-in , and I need a frame reference of Intellij to
be passed to my classes , so that I can pass as parent to messagebox,
or dialog.

I can't find any API from ApplicationManager that able to do that.

How can I retrieve the Intellij's jframe reference ?


First of all, the recommended way to show dialogs and message boxes is to
use the DialogWrapper class (for dialogs) and different methods in the Messages
class (for message boxes). They handle a lot of things automatically for
you and let your plugin blend better into the IntelliJ IDEA UI. All of these
classes allow you to pass a Project instance and calculate the correct parent
automatically.

If you insist on not using these classes, the correct way to get a parent
component is WindowManager.suggestParentWindow(project).

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


0

Please sign in to leave a comment.