void (final DirDiffSettings settings, DirDiffTableModel model, @Nullable final Runnable onWindowClosing) { if (settings.showInFrame) { DirDiffFrame frame = new DirDiffFrame(myProject, model); setWindowListener(onWindowClosing, frame.getFrame()); frame.show(); } else { DirDiffDialog dirDiffDialog = new DirDiffDialog(myProject, model); if (myProject == null || myProject.isDefault()/* || isFromModalDialog(myProject)*/) { dirDiffDialog.setModal(true); } setWindowListener(onWindowClosing, dirDiffDialog.getOwner()); dirDiffDialog.show(); } }