use of org.sonarsource.sonarlint.core.container.connected.ConnectedContainer in project sonarlint-core by SonarSource.
the class ConnectedSonarLintEngineImpl method updateModule.
@Override
public void updateModule(ServerConfiguration serverConfig, String moduleKey, @Nullable ProgressMonitor monitor) {
checkNotNull(serverConfig);
checkNotNull(moduleKey);
setLogging(null);
rwl.writeLock().lock();
checkUpdateStatus();
ConnectedContainer connectedContainer = new ConnectedContainer(globalConfig, serverConfig);
try {
changeState(State.UPDATING);
connectedContainer.startComponents();
connectedContainer.updateModule(moduleKey, new ProgressWrapper(monitor));
} catch (RuntimeException e) {
throw SonarLintWrappedException.wrap(e);
} finally {
try {
connectedContainer.stopComponents(false);
} catch (Exception e) {
// Ignore
}
changeState(getHandler().getGlobalStorageStatus() != null ? State.UPDATED : State.NEVER_UPDATED);
rwl.writeLock().unlock();
}
}
Aggregations