boolean (VirtualFile f) { FileViewProvider viewProvider = PsiManager.getInstance(project).findViewProvider(f); // important: skip non-java files with given word in literal (IDEA-126201) if (viewProvider == null || viewProvider.getPsi(JavaLanguage.INSTANCE) == null) return true; PsiFile psiFile = viewProvider.getPsi(viewProvider.getBaseLanguage()); if (psiFile != null) { List<PsiLiteralExpression> duplicateLiteralsInFile = findDuplicateLiteralsInFile(query.stringToFind, query.ignorePropertyKeys, psiFile); if (!duplicateLiteralsInFile.isEmpty()) { foundExpressions.addAll(duplicateLiteralsInFile); if (query.isOnFlySearch && ++filesWithLiterals >= MAX_FILES_TO_ON_THE_FLY_SEARCH) { return false; } } } return true; }