use of org.sonarsource.sonarlint.core.client.api.connected.ConnectedGlobalConfiguration.Builder in project sonarlint-core by SonarSource.
the class ConnectedSonarLintImpl method start.
@Override
public void start(ConnectedConfiguration requestConfig, StreamObserver<Void> response) {
if (engine != null) {
engine.stop(false);
engine = null;
}
try {
Builder builder = ConnectedGlobalConfiguration.builder();
if (requestConfig.getHomePath() != null) {
builder.setSonarLintUserHome(Paths.get(requestConfig.getHomePath()));
}
builder.setLogOutput(logOutput).setServerId(requestConfig.getStorageId());
engine = new ConnectedSonarLintEngineImpl(builder.build());
response.onNext(Void.newBuilder().build());
response.onCompleted();
} catch (Exception e) {
LOGGER.error("Error registering", e);
response.onError(e);
}
}
Aggregations