public void checkProjectCanBeCreatedOnSdk(final @NotNull Sdk sdk,
                                            final @NotNull File projectDirectory) throws PyNoProjectAllowedOnSdkException {

    // Check if project does not support remote creation at all
    if (!myAllowRemoteProjectCreation && PythonSdkUtil.isRemote(sdk)) {
      throw new PyNoProjectAllowedOnSdkException(
        PyBundle.message("python.remote.interpreter.can.t.create.project.this.type"));
    }


    // Check if project synchronizer could be used with this project dir
    // No project can be created remotely if project synchronizer can't work with it

    final PyProjectSynchronizer synchronizer = PyProjectSynchronizerProvider.getSynchronizer(sdk);
    if (synchronizer == null) {
      return;
    }
    final String syncError = synchronizer.checkSynchronizationAvailable(new PySyncCheckOnly(projectDirectory));
    if (syncError != null) {
      throw new PyNoProjectAllowedOnSdkException(syncError);
    }
  }
public void checkProjectCanBeCreatedOnSdk(final @NotNull Sdk sdk,
                                            final @NotNull File projectDirectory)