void (@NotNull CompletionParameters parameters, @NotNull CompletionResultSet result) { final PsiElement position = parameters.getPosition(); final VirtualFile file = PsiUtilCore.getVirtualFile(position); if (file == null) return; final JsonSchemaService service = JsonSchemaService.Impl.get(position.getProject()); if (!service.isApplicableToFile(file)) return; final JsonSchemaObject rootSchema = service.getSchemaObject(position.getContainingFile()); if (rootSchema == null) return; PsiElement positionParent = position.getParent(); if (positionParent != null) { PsiElement parent = positionParent.getParent(); if (parent instanceof JsonProperty) { final String propName = ((JsonProperty)parent).getName(); if ("$schema".equals(propName) && parent.getParent() instanceof JsonObject && parent.getParent().getParent() instanceof JsonFile || "$ref".equals(propName) && service.isSchemaFile(file)) { return; } } } updateStat(service.getSchemaProvider(rootSchema), service.resolveSchemaFile(rootSchema)); doCompletion(parameters, result, rootSchema, true); }