SdkAdditionalData (@NotNull final Sdk currentSdk, @NotNull final Element additional) { String homePath = currentSdk.getHomePath(); if (homePath != null) { // We decided to get rid of this prefix if (homePath.startsWith(LEGACY_TARGET_PREFIX)) { ((SdkModificator)currentSdk).setHomePath(homePath.substring(LEGACY_TARGET_PREFIX.length())); } var targetAdditionalData = PyTargetAwareAdditionalData.loadTargetAwareData(currentSdk, additional); if (targetAdditionalData != null) { return targetAdditionalData; } else if (isCustomPythonSdkHomePath(homePath)) { PythonRemoteInterpreterManager manager = PythonRemoteInterpreterManager.getInstance(); if (manager != null) { return manager.loadRemoteSdkData(currentSdk, additional); } // TODO we should have "remote" SDK data with unknown credentials anyway! } } var additionalData = PySdkProvider.EP_NAME.getExtensionList().stream() .map(ext -> ext.loadAdditionalDataForSdk(additional)) .filter(data -> data != null) .findFirst() .orElseGet(() -> PythonSdkAdditionalData.loadFromElement(additional)); // Convert legacy conda SDK, temporary fix. PyCondaSdkFixKt.fixPythonCondaSdk(currentSdk, additionalData); return additionalData; }