mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Rename isEssential to isEssentialByDefault for clarity
(cherry picked from commit b264b22247b6eb470d5b7c3cdf566569980bbb02) IJ-MR-168243 GitOrigin-RevId: d13dd6c5efb488d65b315aa634091622c881a66b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a55ff56017
commit
c878a86c04
@@ -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
|
||||
|
||||
+4
-4
@@ -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);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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);
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user