use of org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin.logException in project eclipse.jdt.ls by eclipse.
the class JDTLanguageServer method didChangeConfiguration.
/* (non-Javadoc)
* @see org.eclipse.lsp4j.services.WorkspaceService#didChangeConfiguration(org.eclipse.lsp4j.DidChangeConfigurationParams)
*/
@Override
public void didChangeConfiguration(DidChangeConfigurationParams params) {
logInfo(">> workspace/didChangeConfiguration");
Object settings = JSONUtility.toModel(params.getSettings(), Map.class);
if (settings instanceof Map) {
@SuppressWarnings("unchecked") Preferences prefs = Preferences.createFrom((Map<String, Object>) settings);
preferenceManager.update(prefs);
}
syncCapabilitiesToSettings();
boolean jvmChanged = false;
try {
jvmChanged = configureVM();
} catch (Exception e) {
JavaLanguageServerPlugin.logException(e.getMessage(), e);
}
try {
boolean autoBuildChanged = pm.setAutoBuilding(preferenceManager.getPreferences().isAutobuildEnabled());
if (jvmChanged) {
buildWorkspace(true);
} else if (autoBuildChanged) {
buildWorkspace(false);
}
} catch (CoreException e) {
JavaLanguageServerPlugin.logException(e.getMessage(), e);
}
pm.registerWatchers();
logInfo(">>New configuration: " + settings);
}
Aggregations