ProjectSettingsStepBase<PyNewProjectSettings> (@NotNull DirectoryProjectGenerator<PyNewProjectSettings> projectGenerator, @NotNull AbstractCallback<PyNewProjectSettings> callback) { var npwGenerator = ObjectUtils.tryCast(projectGenerator, NewProjectWizardDirectoryGeneratorAdapter.class); if (npwGenerator != null) { //noinspection unchecked return new NewProjectWizardProjectSettingsStep<PyNewProjectSettings>(npwGenerator); } else if (Registry.is("python.new.interpreter.creation.ui")) { return new PythonProjectSpecificSettingsStep<>(projectGenerator, callback); } else { return new ProjectSpecificSettingsStep<>(projectGenerator, callback); } }