mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Tool windows: use ToolWindow.remove instead of deprecated ToolWindowManagerEx.unregisterToolWindow
GitOrigin-RevId: 5e2945843a4115a4480c0bc6ac86164f249675d0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
20e3cc86ad
commit
28fcadd5e3
+1
-1
@@ -47,7 +47,7 @@ final class FacetDependentToolWindowManager implements ProjectComponent {
|
||||
return;
|
||||
}
|
||||
}
|
||||
toolWindowManager.unregisterToolWindow(extension.id);
|
||||
toolWindow.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-3
@@ -13,6 +13,7 @@ import com.intellij.openapi.startup.StartupActivity;
|
||||
import com.intellij.openapi.wm.ToolWindow;
|
||||
import com.intellij.openapi.wm.ex.ToolWindowManagerEx;
|
||||
import com.intellij.openapi.wm.ext.LibraryDependentToolWindow;
|
||||
import com.intellij.openapi.wm.ext.LibrarySearchHelper;
|
||||
import com.intellij.util.concurrency.SequentialTaskExecutor;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import com.intellij.util.messages.MessageBusConnection;
|
||||
@@ -54,7 +55,10 @@ public class LibraryDependentToolWindowManager implements StartupActivity {
|
||||
List<LibraryDependentToolWindow> extensions = LibraryDependentToolWindow.EXTENSION_POINT_NAME.getExtensionList();
|
||||
|
||||
ReadAction
|
||||
.nonBlocking(() -> new HashSet<>(ContainerUtil.findAll(extensions, ltw -> ltw.getLibrarySearchHelper().isLibraryExists(project))))
|
||||
.nonBlocking(() -> new HashSet<>(ContainerUtil.findAll(extensions, ltw -> {
|
||||
LibrarySearchHelper helper = ltw.getLibrarySearchHelper();
|
||||
return helper != null && helper.isLibraryExists(project);
|
||||
})))
|
||||
.inSmartMode(project)
|
||||
.coalesceBy(this)
|
||||
.finishOnUiThread(currentModalityState, existing -> {
|
||||
@@ -68,12 +72,11 @@ public class LibraryDependentToolWindowManager implements StartupActivity {
|
||||
}
|
||||
else {
|
||||
if (toolWindow != null) {
|
||||
toolWindowManagerEx.unregisterToolWindow(libraryToolWindow.id);
|
||||
toolWindow.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.submit(ourExecutor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user