Search in sources :

Example 1 with DefaultRemoteModule

use of org.sonarsource.sonarlint.core.container.model.DefaultRemoteModule in project sonarlint-core by SonarSource.

the class AllModulesReader method get.

@Override
public Map<String, RemoteModule> get() {
    Map<String, RemoteModule> results = new HashMap<>();
    ModuleList readModuleListFromStorage = storageReader.readModuleList();
    Map<String, Module> modulesByKey = readModuleListFromStorage.getModulesByKeyMap();
    for (Map.Entry<String, Module> entry : modulesByKey.entrySet()) {
        results.put(entry.getKey(), new DefaultRemoteModule(entry.getValue()));
    }
    return results;
}
Also used : RemoteModule(org.sonarsource.sonarlint.core.client.api.connected.RemoteModule) DefaultRemoteModule(org.sonarsource.sonarlint.core.container.model.DefaultRemoteModule) HashMap(java.util.HashMap) ModuleList(org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleList) Module(org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleList.Module) RemoteModule(org.sonarsource.sonarlint.core.client.api.connected.RemoteModule) DefaultRemoteModule(org.sonarsource.sonarlint.core.container.model.DefaultRemoteModule) Map(java.util.Map) HashMap(java.util.HashMap) DefaultRemoteModule(org.sonarsource.sonarlint.core.container.model.DefaultRemoteModule)

Aggregations

HashMap (java.util.HashMap)1 Map (java.util.Map)1 RemoteModule (org.sonarsource.sonarlint.core.client.api.connected.RemoteModule)1 DefaultRemoteModule (org.sonarsource.sonarlint.core.container.model.DefaultRemoteModule)1 ModuleList (org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleList)1 Module (org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleList.Module)1