IJPL-232707 refactor: pass coroutineScope and installed panel supplier as a parameter into InstalledTabSearchResultPanel

GitOrigin-RevId: b203b6d1d6cedd7dfaef82af1efd5db92fedce59
This commit is contained in:
Vadim Salavatov
2026-02-12 20:28:06 +00:00
committed by intellij-monorepo-bot
parent f9a3769492
commit 7ef6c0ecd5
2 changed files with 8 additions and 4 deletions
@@ -336,6 +336,7 @@ class InstalledPluginsTab extends PluginsTab {
installedController,
panel,
myInstalledSearchGroup,
() -> myInstalledPanel,
selectionListener,
mySearchInMarketplaceTabHandler,
myPluginModelFacade
@@ -603,16 +604,19 @@ class InstalledPluginsTab extends PluginsTab {
private final @Nullable Consumer<String> mySearchInMarketplaceTabHandler;
private final @NotNull PluginModelFacade myPluginModelFacade;
private final @NotNull DefaultActionGroup mySearchActionGroup;
private final @NotNull Supplier<PluginsGroupComponentWithProgress> myInstalledPanelSupplier;
InstalledTabSearchResultPanel(CoroutineScope coroutineScope,
InstalledTabSearchResultPanel(@NotNull CoroutineScope coroutineScope,
SearchUpDownPopupController installedController,
PluginsGroupComponentWithProgress panel,
@NotNull DefaultActionGroup searchActionGroup,
@NotNull Supplier<PluginsGroupComponentWithProgress> installedPanelSupplier,
@NotNull Consumer<? super PluginsGroupComponent> selectionListener,
@Nullable Consumer<String> searchInMarketplaceTabHandler,
@NotNull PluginModelFacade pluginModelFacade) {
super(coroutineScope, installedController, panel, false);
mySearchActionGroup = searchActionGroup;
myInstalledPanelSupplier = installedPanelSupplier;
mySelectionListener = selectionListener;
mySearchInMarketplaceTabHandler = searchInMarketplaceTabHandler;
myPluginModelFacade = pluginModelFacade;
@@ -752,12 +756,12 @@ class InstalledPluginsTab extends PluginsTab {
}
});
}
PluginModelAsyncOperationsExecutor.INSTANCE.loadUpdates(myCoroutineScope, updates -> {
PluginModelAsyncOperationsExecutor.INSTANCE.loadUpdates(getCoroutineScope(), updates -> {
if (!ContainerUtil.isEmpty(updates)) {
myPostFillGroupCallback = () -> {
//noinspection unchecked
applyUpdates(myPanel, (Collection<PluginUiModel>)updates);
mySelectionListener.accept(myInstalledPanel);
mySelectionListener.accept(myInstalledPanelSupplier.get());
mySelectionListener.accept(getPanel());
};
}
@@ -24,7 +24,7 @@ import javax.swing.ScrollPaneConstants
@ApiStatus.Internal
abstract class SearchResultPanel(
private val coroutineScope: CoroutineScope,
protected val coroutineScope: CoroutineScope,
@JvmField val controller: SearchPopupController,
@JvmField protected val myPanel: PluginsGroupComponentWithProgress,
private val isMarketplace: Boolean,