diff --git a/platform/lang-impl/src/com/intellij/find/FindUtil.java b/platform/lang-impl/src/com/intellij/find/FindUtil.java index 489f6936c4c5..a94b4f5aaf18 100644 --- a/platform/lang-impl/src/com/intellij/find/FindUtil.java +++ b/platform/lang-impl/src/com/intellij/find/FindUtil.java @@ -64,6 +64,7 @@ import com.intellij.usageView.UsageInfo; import com.intellij.usages.*; import com.intellij.usages.impl.UsageViewImpl; import com.intellij.util.containers.ContainerUtil; +import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -921,6 +922,7 @@ public class FindUtil { } }); } + UIUtil.invokeLaterIfNeeded(((UsageViewImpl)view)::expandAll); } }); return view; diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index 18b0d80ac89f..e793cada6244 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -779,7 +779,8 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra } } - private void expandAll() { + public void expandAll() { + ApplicationManager.getApplication().assertIsDispatchThread(); expandingAll = true; try { TreeUtil.expandAll(myTree);