PlaceInfo (final @NlsSafe String className, final @NlsSafe String fileName, final int line, final Project project, final int lparenthIndex, final int rparenthIndex) { final PlaceInfo[] info = new PlaceInfo[1]; ApplicationManager.getApplication().runReadAction( () -> { PsiClass aClass = JavaPsiFacade.getInstance(project).findClass(className, GlobalSearchScope.allScope(project)); if (aClass == null) return; PsiFile file = aClass.getContainingFile(); String fileName1 = fileName.replace(File.separatorChar, '/'); int slashIndex = fileName1.lastIndexOf('/'); String shortFileName = slashIndex < 0 ? fileName : fileName.substring(slashIndex + 1); final String name = file.getName(); if (!name.equalsIgnoreCase(shortFileName)) return; info[0] = new PlaceInfo(file.getVirtualFile(), line, 1, lparenthIndex, rparenthIndex); } ); return info[0]; }