mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
[indexing] Remove progress indicator from PsiSearchHelper.isCheapEnoughToSearch and at use sites
Was unused GitOrigin-RevId: 98f5e2b1f48f54fc15d54cbbf73ff549f96fca6a
This commit is contained in:
committed by
intellij-monorepo-bot
parent
310d7e251c
commit
5428775b85
@@ -126,7 +126,7 @@ public final class ExplicitToImplicitClassMigrationInspection extends AbstractBa
|
||||
if (isOnTheFly) {
|
||||
final PsiSearchHelper searchHelper = PsiSearchHelper.getInstance(project);
|
||||
final PsiSearchHelper.SearchCostResult cost =
|
||||
searchHelper.isCheapEnoughToSearch(className, scope, null, null);
|
||||
searchHelper.isCheapEnoughToSearch(className, scope, null);
|
||||
if (cost == PsiSearchHelper.SearchCostResult.TOO_MANY_OCCURRENCES) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.intellij.codeInspection.InspectionManager;
|
||||
import com.intellij.codeInspection.ProblemDescriptor;
|
||||
import com.intellij.codeInspection.deadCode.UnusedDeclarationInspectionBase;
|
||||
import com.intellij.codeInspection.reference.RefUtil;
|
||||
import com.intellij.openapi.progress.EmptyProgressIndicator;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.util.AccessModifier;
|
||||
import com.intellij.psi.util.PropertyUtilBase;
|
||||
@@ -16,8 +15,6 @@ import com.siyeh.ig.psiutils.MethodUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@SuppressWarnings("InspectionDescriptionNotFoundInspection") // via UnusedReturnValue
|
||||
public class UnusedReturnValueLocalInspection extends AbstractBaseJavaLocalInspectionTool {
|
||||
private final UnusedReturnValue myGlobal;
|
||||
@@ -56,7 +53,7 @@ public class UnusedReturnValueLocalInspection extends AbstractBaseJavaLocalInspe
|
||||
}
|
||||
|
||||
final boolean[] atLeastOneUsageExists = new boolean[]{false};
|
||||
if (UnusedSymbolUtil.processUsages(manager.getProject(), method.getContainingFile(), method, new EmptyProgressIndicator(), null, u -> {
|
||||
if (UnusedSymbolUtil.processUsages(manager.getProject(), method.getContainingFile(), method, null, u -> {
|
||||
if (!atLeastOneUsageExists[0]) atLeastOneUsageExists[0] = true;
|
||||
PsiElement element = u.getElement();
|
||||
if (element instanceof PsiReferenceExpression) {
|
||||
|
||||
Reference in New Issue
Block a user