use of com.intellij.usages.UsageViewManager in project intellij-community by JetBrains.
the class InheritanceToDelegationProcessor method showObjectUpcastedUsageView.
private void showObjectUpcastedUsageView(final ObjectUpcastedUsageInfo[] usages) {
UsageViewPresentation presentation = new UsageViewPresentation();
presentation.setTargetsNodeText(RefactoringBundle.message("replacing.inheritance.with.delegation"));
presentation.setCodeUsagesString(RefactoringBundle.message("instances.casted.to.java.lang.object"));
final String upcastedString = RefactoringBundle.message("instances.upcasted.to.object");
presentation.setUsagesString(upcastedString);
presentation.setTabText(upcastedString);
UsageViewManager manager = UsageViewManager.getInstance(myProject);
manager.showUsages(new UsageTarget[] { new PsiElement2UsageTargetAdapter(myClass) }, UsageInfoToUsageConverter.convert(new PsiElement[] { myClass }, usages), presentation);
WindowManager.getInstance().getStatusBar(myProject).setInfo(RefactoringBundle.message("instances.upcasted.to.java.lang.object.found"));
}
Aggregations