use of org.springframework.ide.vscode.boot.yaml.reconcile.ApplicationYamlReconcileEngine in project sts4 by spring-projects.
the class BootPropertiesLanguageServerComponents method getReconcileEngine.
@Override
public Optional<IReconcileEngine> getReconcileEngine() {
IReconcileEngine propertiesReconciler = new SpringPropertiesReconcileEngine(indexProvider, typeUtilProvider);
IReconcileEngine ymlReconciler = new ApplicationYamlReconcileEngine(parser, indexProvider, typeUtilProvider);
return Optional.of((doc, problemCollector) -> {
String uri = doc.getUri();
if (uri != null) {
if (uri.endsWith(PROPERTIES)) {
propertiesReconciler.reconcile(doc, problemCollector);
return;
} else if (uri.endsWith(YML)) {
ymlReconciler.reconcile(doc, problemCollector);
return;
}
}
// No real reconciler is applicable. So tell the problemCollector there are no problems.
problemCollector.beginCollecting();
problemCollector.endCollecting();
});
}
Aggregations