Search in sources :

Example 1 with GlobalUpdateRequiredException

use of org.sonarsource.sonarlint.core.client.api.exceptions.GlobalUpdateRequiredException in project sonarlint-core by SonarSource.

the class ConnectedContainer method updateModule.

public void updateModule(String moduleKey, ProgressWrapper progress) {
    GlobalStorageStatus updateStatus = getComponentByType(StorageReader.class).getGlobalStorageStatus();
    if (updateStatus == null) {
        throw new GlobalUpdateRequiredException("Please update server first");
    }
    getComponentByType(ModuleStorageUpdateExecutor.class).update(moduleKey, progress);
}
Also used : StorageReader(org.sonarsource.sonarlint.core.container.storage.StorageReader) GlobalUpdateRequiredException(org.sonarsource.sonarlint.core.client.api.exceptions.GlobalUpdateRequiredException) ModuleStorageUpdateExecutor(org.sonarsource.sonarlint.core.container.connected.update.perform.ModuleStorageUpdateExecutor) GlobalStorageStatus(org.sonarsource.sonarlint.core.client.api.connected.GlobalStorageStatus)

Aggregations

GlobalStorageStatus (org.sonarsource.sonarlint.core.client.api.connected.GlobalStorageStatus)1 GlobalUpdateRequiredException (org.sonarsource.sonarlint.core.client.api.exceptions.GlobalUpdateRequiredException)1 ModuleStorageUpdateExecutor (org.sonarsource.sonarlint.core.container.connected.update.perform.ModuleStorageUpdateExecutor)1 StorageReader (org.sonarsource.sonarlint.core.container.storage.StorageReader)1