drop allowSlowOperations usages

GitOrigin-RevId: b60b929f767c5fdac1e63ce8cfabb97c43c189c1
This commit is contained in:
Gregory.Shrago
2024-08-20 18:35:39 +04:00
committed by intellij-monorepo-bot
parent fba500e314
commit bc3b7f8235
3 changed files with 12 additions and 18 deletions

View File

@@ -53,7 +53,6 @@ import com.intellij.refactoring.util.occurrences.NotInConstructorCallFilter;
import com.intellij.util.CommonJavaRefactoringUtil;
import com.intellij.util.IncorrectOperationException;
import com.intellij.util.Processor;
import com.intellij.util.SlowOperations;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.containers.MultiMap;
import com.siyeh.ig.psiutils.VariableAccessUtils;
@@ -404,9 +403,8 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
dialogIntroduce.accept(null);
}
else {
SlowOperations.allowSlowOperations(
() -> dumbService.runWithAlternativeResolveEnabled(
() -> inplaceIntroduce(project, editor, choice, targetContainer, occurrenceManager, originalType, dialogIntroduce)));
dumbService.runWithAlternativeResolveEnabled(
() -> inplaceIntroduce(project, editor, choice, targetContainer, occurrenceManager, originalType, dialogIntroduce));
}
}

View File

@@ -407,17 +407,17 @@ private class MoreRunToolbarActions : TogglePopupAction(
}
internal fun filterOutRunIfDebugResumeIsPresent(e: AnActionEvent, actions: List<AnAction>): List<AnAction> {
val hasPause = actions.any {
it.javaClass.simpleName.let { it == "InlineXDebuggerResumeAction" || it == "ConfigurationXDebuggerResumeAction" } ||
val hasPause = actions.find {
it.javaClass.simpleName.let {
it == "InlineXDebuggerResumeAction" ||
it == "ConfigurationXDebuggerResumeAction"
} ||
e.actionManager.getId(it)?.contains("XDebuggerResumeAction") == true
}
val hasInlineStop = actions.any {
it.javaClass.simpleName.let { it == "StopConfigurationInlineAction" }
}
return when {
hasPause -> actions.filter { ((it as? ExecutorAction)?.id ?: e.actionManager.getId(it)) != "Run" }
hasInlineStop -> actions.filter { ((it as? ExecutorAction)?.id ?: e.actionManager.getId(it)) != "Debug" }
else -> actions
} != null
if (!hasPause) return actions
return actions.filter {
((it as? ExecutorAction)?.id ?: e.actionManager.getId(it)) != "Run"
}
}

View File

@@ -2063,10 +2063,6 @@ public final class PersistentFSImpl extends PersistentFS implements Disposable {
}
private void applyEvent(@NotNull VFileEvent event) {
SlowOperations.allowSlowOperations(() -> doApplyEvent(event));
}
private void doApplyEvent(@NotNull VFileEvent event) {
if (LOG.isDebugEnabled()) {
LOG.debug("Applying " + event);
}