void (@NotNull CompletionParameters parameters, @NotNull ProcessingContext context, @NotNull CompletionResultSet result) { PsiFile file = parameters.getOriginalFile(); InjectedLanguageManager injectedLanguageManager = InjectedLanguageManager.getInstance(file.getProject()); PsiLanguageInjectionHost injectionHost = injectedLanguageManager.getInjectionHost(file); if (injectionHost != null) { PsiFile hostFile = injectionHost.getContainingFile(); if (hostFile != null) { visitJsonPathLiteralsInFile(injectedLanguageManager, hostFile, propertyName -> { addCompletionElement(result, propertyName); }); } } Supplier<JsonFile> targetFileGetter = file.getUserData(JsonPathEvaluateManager.JSON_PATH_EVALUATE_SOURCE_KEY); if (targetFileGetter != null) { JsonFile targetFile = targetFileGetter.get(); if (targetFile == null) return; // it could be already removed targetFile.accept(new JsonRecursiveElementVisitor() { @Override public void visitProperty(@NotNull JsonProperty o) { super.visitProperty(o); String propertyName = o.getName(); if (!propertyName.isBlank()) { addCompletionElement(result, propertyName); } } }); } }