public synchronized void finish(boolean success, boolean cancel, boolean showErrors, boolean restartRequired) {
    if (myClosed) {
      return;
    }
    if (myPluginModel == null) {
      MyPluginModel.finishInstall(myDescriptor);
      closeStatusBarIndicator();
      if (success && !cancel && restartRequired) {
        ourShowRestart = true;
      }
      if (MyPluginModel.myInstallingInfos.isEmpty() && ourShowRestart) {
        ourShowRestart = false;
        ApplicationManager.getApplication().invokeLater(() -> PluginManagerConfigurable.shutdownOrRestartApp());
      }
    }
    else if (!cancel) {
      myPluginModel.finishInstall(myDescriptor, myInstalledDescriptor, success, showErrors, restartRequired);
    }
  }
public synchronized void finish(boolean success, boolean cancel, boolean showErrors, boolean restartRequired)