@Nullable public String getVMExecutablePath(Sdk sdk) { final Sdk internalJavaSdk = getInternalJavaSdk(sdk); return internalJavaSdk == null ? null : JavaSdk.getInstance().getVMExecutablePath(internalJavaSdk); }
@Nullable public String getToolsPath(Sdk sdk) { final Sdk jdk = getInternalJavaSdk(sdk); if (jdk != null && jdk.getVersionString() != null) { return JavaSdk.getInstance().getToolsPath(jdk); } return null; }
public static boolean isAtLeast(PsiElement element, JavaSdkVersion minVersion) { final Module module = ModuleUtilCore.findModuleForPsiElement(element); if (module != null) { final Sdk sdk = ModuleRootManager.getInstance(module).getSdk(); if (sdk != null && sdk.getSdkType() instanceof JavaSdk) { final JavaSdkVersion version = JavaSdk.getInstance().getVersion(sdk); return version != null && version.isAtLeast(minVersion); } } return true; }
@Override @Nullable public String getBinPath(@NotNull Sdk sdk) { Sdk internalJavaSdk = getInternalJavaSdk(sdk); return internalJavaSdk == null ? null : JavaSdk.getInstance().getBinPath(internalJavaSdk); }