List<JsonSchemaInfo> () { List<JsonSchemaCatalogEntry> schemas = myCatalogManager.getAllCatalogEntries(); Map<VirtualFile, List<JsonSchemaFileProvider>> map = myState.myData.getValue(); List<JsonSchemaInfo> results = new ArrayList<>(schemas.size() + map.size()); Map<String, JsonSchemaInfo> processedRemotes = new HashMap<>(); myState.processProviders(provider -> { if (provider.isUserVisible()) { final String remoteSource = provider.getRemoteSource(); if (remoteSource != null) { if (!processedRemotes.containsKey(remoteSource)) { JsonSchemaInfo info = new JsonSchemaInfo(provider); processedRemotes.put(remoteSource, info); results.add(info); } } else { results.add(new JsonSchemaInfo(provider)); } } }); for (JsonSchemaCatalogEntry schema: schemas) { final String url = schema.getUrl(); if (!processedRemotes.containsKey(url)) { final JsonSchemaInfo info = new JsonSchemaInfo(url); if (schema.getDescription() != null) { info.setDocumentation(schema.getDescription()); } if (schema.getName() != null) { info.setName(schema.getName()); } results.add(info); } else { // use documentation from schema catalog for bundled schemas if possible // we don't have our own docs, so let's reuse the existing docs from the catalog JsonSchemaInfo info = processedRemotes.get(url); if (info.getDocumentation() == null) { info.setDocumentation(schema.getDescription()); } if (info.getName() == null) { info.setName(schema.getName()); } } } return results; }