use of org.springframework.ide.vscode.boot.properties.completions.SpringPropertiesCompletionEngine in project sts4 by spring-projects.
the class BootPropertiesLanguageServerComponents method getCompletionEngine.
@Override
public ICompletionEngine getCompletionEngine() {
ICompletionEngine propertiesCompletions = new SpringPropertiesCompletionEngine(indexProvider, typeUtilProvider, javaProjectFinder);
ICompletionEngine yamlCompletions = new YamlCompletionEngine(yamlStructureProvider, yamlAssistContextProvider, COMPLETION_OPTIONS);
return (TextDocument document, int offset) -> {
String uri = document.getUri();
if (uri != null) {
if (uri.endsWith(PROPERTIES)) {
return propertiesCompletions.getCompletions(document, offset);
} else if (uri.endsWith(YML)) {
return yamlCompletions.getCompletions(document, offset);
}
}
return ImmutableList.of();
};
}
Aggregations