ensure root is expanded when usages are shown (IDEA-166853)

This commit is contained in:
Anna Kozlova
2017-01-20 12:58:33 +03:00
parent 93fa3ed8c8
commit d6066cc1d0
2 changed files with 1 additions and 1 deletions
@@ -425,7 +425,6 @@ public abstract class BaseRefactoringProcessor implements Runnable {
String canNotMakeString = RefactoringBundle.message("usageView.need.reRun");
addDoRefactoringAction(usageView, refactoringRunnable, canNotMakeString);
((UsageViewImpl)usageView).expandRoot();
}
private void addDoRefactoringAction(@NotNull UsageView usageView, @NotNull Runnable refactoringRunnable, @NotNull String canNotMakeString) {
@@ -81,6 +81,7 @@ public class UsageViewManagerImpl extends UsageViewManager {
UsageView usageView = createUsageView(searchedFor, foundUsages, presentation, factory);
addContent((UsageViewImpl)usageView, presentation);
showToolWindow(true);
UIUtil.invokeLaterIfNeeded(((UsageViewImpl)usageView)::expandRoot);
return usageView;
}