public class SdkConfigurationUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
addSdk(Sdk sdk) |
static void |
configureDirectoryProjectSdk(Project project,
java.util.Comparator<? super Sdk> preferredSdkComparator,
SdkType... sdkTypes) |
static Sdk |
createAndAddSDK(java.lang.String path,
SdkType sdkType)
Tries to create an SDK identified by path; if successful, add the SDK to the global SDK table.
|
static ProjectJdkImpl |
createSdk(java.util.Collection<? extends Sdk> allSdks,
java.lang.String homePath,
SdkType sdkType,
SdkAdditionalData additionalData,
java.lang.String customSdkSuggestedName) |
static ProjectJdkImpl |
createSdk(java.util.Collection<? extends Sdk> allSdks,
VirtualFile homeDir,
SdkType sdkType,
SdkAdditionalData additionalData,
java.lang.String customSdkSuggestedName) |
static void |
createSdk(Project project,
Sdk [] existingSdks,
NullableConsumer<? super Sdk> onSdkCreatedCallBack,
boolean createIfExists,
boolean followSymLinks,
SdkType... sdkTypes) |
static void |
createSdk(Project project,
Sdk [] existingSdks,
NullableConsumer<? super Sdk> onSdkCreatedCallBack,
boolean createIfExists,
SdkType... sdkTypes) |
static void |
createSdk(Project project,
Sdk [] existingSdks,
NullableConsumer<? super Sdk> onSdkCreatedCallBack,
SdkType... sdkTypes) |
static java.lang.String |
createUniqueSdkName(SdkType type,
java.lang.String home,
java.util.Collection<? extends Sdk> sdks) |
static java.lang.String |
createUniqueSdkName(java.lang.String suggestedName,
java.util.Collection<? extends Sdk> sdks) |
static java.util.List<java.lang.String> |
filterExistingPaths(SdkType sdkType,
java.util.Collection<java.lang.String> sdkHomes,
Sdk[] sdks) |
static Sdk |
findOrCreateSdk(java.util.Comparator<? super Sdk> comparator,
SdkType... sdkTypes) |
static VirtualFile |
getSuggestedSdkRoot(SdkType sdkType) |
static void |
removeSdk(Sdk sdk) |
static void |
selectSdkHome(SdkType sdkType,
java.awt.Component component,
Consumer<? super java.lang.String> consumer) |
static void |
selectSdkHome(SdkType sdkType,
Consumer<? super java.lang.String> consumer) |
static void |
setDirectoryProjectSdk(Project project,
Sdk sdk) |
static Sdk |
setupSdk(Sdk [] allSdks,
VirtualFile homeDir,
SdkType sdkType,
boolean silent,
SdkAdditionalData additionalData,
java.lang.String customSdkSuggestedName) |
public static void createSdk(Project project, Sdk [] existingSdks, NullableConsumer<? super Sdk> onSdkCreatedCallBack, boolean createIfExists, SdkType... sdkTypes)
public static void createSdk(Project project, Sdk [] existingSdks, NullableConsumer<? super Sdk> onSdkCreatedCallBack, boolean createIfExists, boolean followSymLinks, SdkType... sdkTypes)
public static void createSdk(Project project, Sdk [] existingSdks, NullableConsumer<? super Sdk> onSdkCreatedCallBack, SdkType... sdkTypes)
public static void addSdk(Sdk sdk)
public static void removeSdk(Sdk sdk)
public static Sdk setupSdk(Sdk [] allSdks, VirtualFile homeDir, SdkType sdkType, boolean silent, SdkAdditionalData additionalData, java.lang.String customSdkSuggestedName)
public static ProjectJdkImpl createSdk(java.util.Collection<? extends Sdk> allSdks, VirtualFile homeDir, SdkType sdkType, SdkAdditionalData additionalData, java.lang.String customSdkSuggestedName)
public static ProjectJdkImpl createSdk(java.util.Collection<? extends Sdk> allSdks, java.lang.String homePath, SdkType sdkType, SdkAdditionalData additionalData, java.lang.String customSdkSuggestedName)
public static void configureDirectoryProjectSdk(Project project, java.util.Comparator<? super Sdk> preferredSdkComparator, SdkType... sdkTypes)
public static Sdk findOrCreateSdk(java.util.Comparator<? super Sdk> comparator, SdkType... sdkTypes)
public static Sdk createAndAddSDK(java.lang.String path, SdkType sdkType)
Must be called from the EDT (because it uses WriteAction.compute(com.intellij.openapi.util.ThrowableComputable<T, E>)
under the hood).
path
- identifies the SDKpublic static java.lang.String createUniqueSdkName(SdkType type, java.lang.String home, java.util.Collection<? extends Sdk> sdks)
public static java.lang.String createUniqueSdkName(java.lang.String suggestedName, java.util.Collection<? extends Sdk> sdks)
public static void selectSdkHome(SdkType sdkType, Consumer<? super java.lang.String> consumer)
public static void selectSdkHome(SdkType sdkType, java.awt.Component component, Consumer<? super java.lang.String> consumer)
public static VirtualFile getSuggestedSdkRoot(SdkType sdkType)