use of org.springframework.ide.vscode.commons.jandex.JandexIndex in project sts4 by spring-projects.
the class GradleProjectClasspath method getBaseIndices.
@Override
protected JandexIndex[] getBaseIndices() {
return new JandexIndex[] { new JandexIndex(getJreLibs().map(path -> path.toFile()).collect(Collectors.toList()), jarFile -> findIndexFile(jarFile), (classpathResource) -> {
try {
String javaVersion = getJavaRuntimeMinorVersion();
if (javaVersion == null) {
javaVersion = "8";
}
URL javadocUrl = new URL("https://docs.oracle.com/javase/" + javaVersion + "/docs/api/");
return new HtmlJavadocProvider((type) -> SourceUrlProviderFromSourceContainer.JAVADOC_FOLDER_URL_SUPPLIER.sourceUrl(javadocUrl, type.getFullyQualifiedName()));
} catch (MalformedURLException e) {
Log.log(e);
return null;
}
}) };
}
Aggregations