String (@NotNull PsiElement targetElement) { FindUsagesManager usagesManager = ((FindManagerImpl)FindManager.getInstance(getProject())).getFindUsagesManager(); FindUsagesHandler handler = usagesManager.getFindUsagesHandler(targetElement, false); assertNotNull("Cannot find handler for: " + targetElement, handler); UsageViewImpl usageView = (UsageViewImpl)usagesManager.doFindUsages(handler.getPrimaryElements(), handler.getSecondaryElements(), handler, handler.getFindUsagesOptions(), false); return getUsageViewTreeTextRepresentation(usageView); }