JsonSchemaInfoPopupStep (@NotNull JsonSchemaService service, @NotNull Project project, @NotNull VirtualFile virtualFile, boolean showOnlyEdit) { List<JsonSchemaInfo> allSchemas; JsonSchemaMappingsProjectConfiguration configuration = JsonSchemaMappingsProjectConfiguration.getInstance(project); UserDefinedJsonSchemaConfiguration mapping = configuration.findMappingForFile(virtualFile); if (!showOnlyEdit || mapping == null) { List<JsonSchemaInfo> infos = service.getAllUserVisibleSchemas(); Comparator<JsonSchemaInfo> comparator = Comparator.comparing(JsonSchemaInfo::getDescription, String::compareToIgnoreCase); Stream<JsonSchemaInfo> registered = infos.stream().filter(i -> i.getProvider() != null).sorted(comparator); List<JsonSchemaInfo> otherList = ContainerUtil.emptyList(); if (JsonSchemaCatalogProjectConfiguration.getInstance(project).isRemoteActivityEnabled()) { otherList = infos.stream().filter(i -> i.getProvider() == null).sorted(comparator).collect(Collectors.toList()); if (otherList.size() == 0) { otherList = ContainerUtil.createMaybeSingletonList(LOAD_REMOTE); } } allSchemas = Stream.concat(registered, otherList.stream()).collect(Collectors.toList()); allSchemas.add(0, mapping == null ? ADD_MAPPING : EDIT_MAPPINGS); } else { allSchemas = new SmartList<>(EDIT_MAPPINGS); } if (configuration.isIgnoredFile(virtualFile)) { allSchemas.add(0, STOP_IGNORE_FILE); } else { allSchemas.add(0, IGNORE_FILE); } return new JsonSchemaInfoPopupStep(allSchemas, project, virtualFile, service, null); }