private static boolean canUseNativeDialog(FileChooserDescriptor descriptor) {
    return !descriptor.isForcedToUseIdeaFileChooser() &&
           SystemInfo.isJetBrainsJvm &&
           (SystemInfo.isWindows || SystemInfo.isMac) &&
           (ApplicationManager.getApplication() == null || AdvancedSettings.getBoolean("ide.ui.native.file.chooser"));
  }
private static boolean canUseNativeDialog(FileChooserDescriptor descriptor)