private static void changeSdkModificator(@NotNull Sdk sdk, @NotNull Processor<? super SdkModificator> processor) {
    TransactionGuard.getInstance().assertWriteSafeContext(ModalityState.defaultModalityState());
    ApplicationManager.getApplication().invokeAndWait(() -> {
      final SdkModificator effectiveModificator = sdk.getSdkModificator();
      if (processor.process(effectiveModificator)) {
        ApplicationManager.getApplication().runWriteAction(() -> effectiveModificator.commitChanges());
      }
    });
  }
private static void changeSdkModificator(@NotNull Sdk sdk, @NotNull Processor<? super SdkModificator> processor)