given a Module, find the Project window
I'd like to pop up a modal dialog from within JUnitPatcher.patchJavaParameters(), which provides a Module but not the AnActionEvent. The dialog should have the Project's window as its owner. Is there some way to find out the current project window (if any), given a Module?
Please sign in to leave a comment.
Hello Brian,
Most of IDEA's dialogs (including DialogWrapper and dialogs from the Messages
class) can accept a Project as the owner window, and you can use Module.getProject()
to get one.
There's an API for getting a window by a project too (something like WindowManager.suggestParentWindow()),
but using our APIs for showing dialogs is preferable.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"