Dialog (final IdeFrame ideFrame) { if (ideFrame == null) return null; Component c = ideFrame.getComponent(); if (c == null) return null; Window window = SwingUtilities.getWindowAncestor(c); if (window == null) return null; if (!isModalBlocked(window)) return null; return getModalBlockerFor(window); }