Rename isEssential to isEssentialByDefault for clarity

(cherry picked from commit b264b22247b6eb470d5b7c3cdf566569980bbb02)

IJ-MR-168243

GitOrigin-RevId: d13dd6c5efb488d65b315aa634091622c881a66b
This commit is contained in:
fatimazahra.elakkary
2025-07-16 13:11:54 +00:00
committed by intellij-monorepo-bot
parent a55ff56017
commit c878a86c04
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -2041,8 +2041,8 @@ c:com.intellij.ide.actions.searcheverywhere.ContributorSearchResult$Builder
- setHasMore(Z):V
com.intellij.ide.actions.searcheverywhere.EssentialContributor
- s:checkEssential(com.intellij.ide.actions.searcheverywhere.SearchEverywhereContributor):Z
- s:checkEssentialWithoutMl(com.intellij.ide.actions.searcheverywhere.SearchEverywhereContributor):Z
- isEssential():Z
- s:checkEssentialByDefault(com.intellij.ide.actions.searcheverywhere.SearchEverywhereContributor):Z
- isEssentialByDefault():Z
c:com.intellij.ide.actions.searcheverywhere.ExtendedInfo
- <init>():V
- <init>(kotlin.jvm.functions.Function1,kotlin.jvm.functions.Function1):V
@@ -11,12 +11,12 @@ import org.jetbrains.annotations.Nullable;
*/
public interface EssentialContributor {
default boolean isEssential() {
default boolean isEssentialByDefault() {
return true;
}
static boolean checkEssentialWithoutMl(SearchEverywhereContributor<?> contributor) {
return (contributor instanceof EssentialContributor ic) && ic.isEssential();
static boolean checkEssentialByDefault(SearchEverywhereContributor<?> contributor) {
return (contributor instanceof EssentialContributor ic) && ic.isEssentialByDefault();
}
static boolean checkEssential(SearchEverywhereContributor<?> contributor) {
@@ -25,7 +25,7 @@ public interface EssentialContributor {
return isEssentialByMl;
}
else {
return checkEssentialWithoutMl(contributor);
return checkEssentialByDefault(contributor);
}
}
/**
+1 -1
View File
@@ -8363,7 +8363,7 @@ f:com.intellij.ide.actions.searcheverywhere.PSIPresentationBgRendererWrapper
- getSupportedScopes():java.util.List
- isDumbAware():Z
- isEmptyPatternSupported():Z
- isEssential():Z
- isEssentialByDefault():Z
- isMultiSelectionSupported():Z
- isShownInSeparateTab():Z
- isSlow():Z
@@ -61,8 +61,8 @@ public final class PSIPresentationBgRendererWrapper implements WeightedSearchEve
}
@Override
public boolean isEssential() {
return EssentialContributor.checkEssentialWithoutMl(myDelegate);
public boolean isEssentialByDefault() {
return EssentialContributor.checkEssentialByDefault(myDelegate);
}
@Override
@@ -50,7 +50,7 @@ public final class WaitForContributorsListenerWrapper implements SearchListener,
private void initializeDefaultEssentialContributors(Collection<? extends SearchEverywhereContributor<?>> contributors) {
if (defaultEssentialContributorsCache.isEmpty()) {
Map<? extends SearchEverywhereContributor<?>, Boolean> fallbackContributors = contributors.stream()
.filter(EssentialContributor::checkEssentialWithoutMl)
.filter(EssentialContributor::checkEssentialByDefault)
.collect(Collectors.toMap(Function.identity(), c -> false));
defaultEssentialContributorsCache.putAll(fallbackContributors);
}
@@ -6,7 +6,7 @@ import com.intellij.util.Processor
import javax.swing.JPanel
import javax.swing.ListCellRenderer
fun createDumbContributor(id: String, showTab: Boolean = false, essential: Boolean = false): SearchEverywhereContributor<Unit> =
fun createDumbContributor(id: String, showTab: Boolean = false, essentialByDefault: Boolean = false): SearchEverywhereContributor<Unit> =
object : SearchEverywhereContributor<Unit>, EssentialContributor {
override fun getSearchProviderId(): String = id
override fun getGroupName(): String = id
@@ -17,7 +17,7 @@ fun createDumbContributor(id: String, showTab: Boolean = false, essential: Boole
override fun processSelectedItem(selected: Unit, modifiers: Int, searchText: String): Boolean = false
override fun fetchElements(pattern: String, progressIndicator: ProgressIndicator, consumer: Processor<in Unit>) {}
override fun isEssential(): Boolean = essential
override fun isEssentialByDefault(): Boolean = essentialByDefault
override fun toString(): String = id
}