void (@NotNull DefinitionsScopedSearch.SearchParameters queryParameters, @NotNull Processor<? super PsiElement> consumer) { final PsiElement element = queryParameters.getElement(); Property prop = ReadAction.compute(() -> GotoPropertyParentDeclarationHandler.findProperty(element)); if (prop == null || !(queryParameters.getScope() instanceof GlobalSearchScope)) { return; } ReadAction.run(() -> { final String key = prop.getKey(); if (!prop.isValid() || key == null) return; final PropertiesFile currentFile = PropertiesImplUtil.getPropertiesFile(prop.getContainingFile()); LOG.assertTrue(currentFile != null); final GlobalSearchScope scope = (GlobalSearchScope)queryParameters.getScope(); currentFile.getResourceBundle() .getPropertiesFiles() .stream() .filter(f -> f.equals(currentFile)) .filter(f -> scope.contains(f.getVirtualFile())) .filter(f -> PropertiesUtil.getParent(f, Collections.singleton(currentFile)) == currentFile) .map(f -> f.findPropertyByKey(key)) .filter(Objects::nonNull) .map(IProperty::getPsiElement) .anyMatch(psiElement -> { ProgressManager.checkCanceled(); return !consumer.process(psiElement); }); }); }