While working on the DiffFile plugin I have been having a problem with
the DialogWrapper class. What I wanted was to be able to switch between
the editor and the diff. First I tried a JFrame, but was unable to get
the DiffPanel's copy and find functionality to work when the panel is in
a JFrame. Next I tried using a DialogWrapper thinking that it would
simplify the button code, however, altough I can set the DialogWrapper
to be non-modal, there is no way to build one without a parent window.
Since it chooses the parent window for me (presumably using the
WindowManager and the Project) it still will not let me switch back to
the editor window.
My apologies if I am just missing something or if this has been changed
in build 640. I'm waiting for 641 to upgrade since I'm already almost a
week or so behind.
~Mike
As far as I can tell, creating a DialogWrapper with no parent does
the same thing as creating a JDialog with no parent: uses
SwingUtilities.getSharedOwnerFrame().
Have you created a JDialog without a DialogWrapper inside IDEA to see if
the behavior is any different?
Mike Abney wrote:
While working on the DiffFile plugin I have been having a problem with
the DialogWrapper class. What I wanted was to be able to switch between
the editor and the diff. First I tried a JFrame, but was unable to get
the DiffPanel's copy and find functionality to work when the panel is in
a JFrame. Next I tried using a DialogWrapper thinking that it would
simplify the button code, however, altough I can set the DialogWrapper
to be non-modal, there is no way to build one without a parent window.
Since it chooses the parent window for me (presumably using the
WindowManager and the Project) it still will not let me switch back to
the editor window.
My apologies if I am just missing something or if this has been changed
in build 640. I'm waiting for 641 to upgrade since I'm already almost a
week or so behind.
~Mike
--
Erb
==============================================================
"The only time I like in the morning is afternoon."
- Russell D. Cooper
"If you do everything, then you're all done."
- Melissa F. Cooper
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================