mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IJPL-232707 refactor: clarify myEmpty in SearchResultPanel
GitOrigin-RevId: 55e309754ca7a9f7ae7be8088552408122cef644
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e8d3e9253c
commit
9248add7d4
+1
-1
@@ -617,7 +617,7 @@ public final class PluginManagerConfigurablePanel implements Disposable {
|
||||
|
||||
public @Nullable Runnable enableSearch(String option, boolean ignoreTagMarketplaceTab) {
|
||||
if (StringUtil.isEmpty(option) &&
|
||||
(myTabHeaderComponent.getSelectionTab() == MARKETPLACE_TAB || myInstalledTab.getInstalledSearchPanel().isEmpty())) {
|
||||
(myTabHeaderComponent.getSelectionTab() == MARKETPLACE_TAB || myInstalledTab.getInstalledSearchPanel().isQueryEmpty())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ public abstract class PluginsTab {
|
||||
searchTextField.setTextIgnoreEvents(query);
|
||||
IdeFocusManager.getGlobalInstance()
|
||||
.doWhenFocusSettlesDown(() -> IdeFocusManager.getGlobalInstance().requestFocus(searchTextField, true));
|
||||
searchPanel.setEmpty();
|
||||
searchPanel.setEmptyQuery();
|
||||
showSearchPanel(query);
|
||||
};
|
||||
|
||||
@@ -232,7 +232,7 @@ public abstract class PluginsTab {
|
||||
protected abstract @NotNull SearchResultPanel createSearchPanel(@NotNull Consumer<? super PluginsGroupComponent> selectionListener);
|
||||
|
||||
public @Nullable String getSearchQuery() {
|
||||
if (searchPanel == null || searchPanel.isEmpty()) {
|
||||
if (searchPanel == null || searchPanel.isQueryEmpty()) {
|
||||
return null;
|
||||
}
|
||||
String query = searchPanel.getQuery();
|
||||
@@ -250,7 +250,7 @@ public abstract class PluginsTab {
|
||||
}
|
||||
|
||||
public void showSearchPanel(@NotNull String query) {
|
||||
if (searchPanel.isEmpty()) {
|
||||
if (searchPanel.isQueryEmpty()) {
|
||||
cardPanel.select(SEARCH_PANEL, true);
|
||||
detailsPage.showPlugin(null);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ public abstract class PluginsTab {
|
||||
}
|
||||
|
||||
public void hideSearchPanel() {
|
||||
if (!searchPanel.isEmpty()) {
|
||||
if (!searchPanel.isQueryEmpty()) {
|
||||
onSearchReset();
|
||||
cardPanel.select(DEFAULT_PANEL, true);
|
||||
searchPanel.setQuery("");
|
||||
|
||||
@@ -33,7 +33,7 @@ public abstract class SearchResultPanel {
|
||||
private PluginsGroup myGroup;
|
||||
private String myQuery;
|
||||
private AtomicBoolean myRunQuery;
|
||||
private boolean myEmpty = true;
|
||||
private boolean isQueryEmpty = true;
|
||||
private boolean isMarketplace;
|
||||
private boolean isLoading;
|
||||
private SingleAlarm myAnnounceSearchResultsAlarm;
|
||||
@@ -89,12 +89,12 @@ public abstract class SearchResultPanel {
|
||||
myPanel.getEmptyText().setText(IdeBundle.message("empty.text.nothing.found"));
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return myEmpty;
|
||||
public boolean isQueryEmpty() {
|
||||
return isQueryEmpty;
|
||||
}
|
||||
|
||||
public void setEmpty() {
|
||||
myEmpty = true;
|
||||
public void setEmptyQuery() {
|
||||
isQueryEmpty = true;
|
||||
myQuery = "";
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ public abstract class SearchResultPanel {
|
||||
setEmptyText(query);
|
||||
|
||||
if (query.equals(myQuery)) {
|
||||
myEmpty = query.isEmpty();
|
||||
isQueryEmpty = query.isEmpty();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public abstract class SearchResultPanel {
|
||||
removeGroup();
|
||||
myQuery = query;
|
||||
|
||||
if (!(myEmpty = query.isEmpty())) {
|
||||
if (!(isQueryEmpty = query.isEmpty())) {
|
||||
handleQuery(query);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user