IJPL-207762 drop unused key for custom action id

GitOrigin-RevId: a0c865615aff9da89dfef2c4f8504b297dffca12
This commit is contained in:
Max Medvedev
2026-02-13 14:33:15 +00:00
committed by intellij-monorepo-bot
parent d53f2dcacb
commit 2e296ab24a
4 changed files with 4 additions and 25 deletions
@@ -1812,7 +1812,6 @@ c:com.intellij.codeInsight.completion.CodeCompletionHandlerBase
- p:completionFinished(com.intellij.codeInsight.completion.CompletionProgressIndicator,Z):V
- s:createHandler(com.intellij.codeInsight.completion.CompletionType):com.intellij.codeInsight.completion.CodeCompletionHandlerBase
- s:createHandler(com.intellij.codeInsight.completion.CompletionType,Z,Z,Z):com.intellij.codeInsight.completion.CodeCompletionHandlerBase
- s:createHandler(com.intellij.codeInsight.completion.CompletionType,Z,Z,Z,java.lang.String):com.intellij.codeInsight.completion.CodeCompletionHandlerBase
- handleCompletionElementSelected(com.intellij.codeInsight.lookup.LookupElement,java.util.List,C,com.intellij.codeInsight.completion.OffsetMap,com.intellij.codeInsight.completion.OffsetsInFile,com.intellij.openapi.editor.Editor,I):V
- f:invokeCompletion(com.intellij.openapi.project.Project,com.intellij.openapi.editor.Editor):V
- f:invokeCompletion(com.intellij.openapi.project.Project,com.intellij.openapi.editor.Editor,I):V
@@ -1,4 +1,4 @@
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright 2000-2026 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.codeInsight.completion;
@@ -111,15 +111,7 @@ public class CodeCompletionHandlerBase {
boolean invokedExplicitly,
boolean autopopup,
boolean synchronous) {
return createHandler(completionType, invokedExplicitly, autopopup, synchronous, IdeActions.ACTION_CODE_COMPLETION);
}
public static @NotNull CodeCompletionHandlerBase createHandler(@NotNull CompletionType completionType,
boolean invokedExplicitly,
boolean autopopup,
boolean synchronous,
@NotNull String actionId) {
AnAction codeCompletionAction = ActionManager.getInstance().getAction(actionId);
AnAction codeCompletionAction = ActionManager.getInstance().getAction(IdeActions.ACTION_CODE_COMPLETION);
if (codeCompletionAction instanceof OverridingAction) {
codeCompletionAction = ((ActionManagerImpl)ActionManager.getInstance()).getBaseAction((OverridingAction)codeCompletionAction);
}
@@ -11,7 +11,6 @@ import com.intellij.codeInsight.completion.impl.CompletionServiceImpl.Companion.
import com.intellij.codeWithMe.ClientId
import com.intellij.codeWithMe.ClientId.Companion.withExplicitClientId
import com.intellij.openapi.Disposable
import com.intellij.openapi.actionSystem.IdeActions
import com.intellij.openapi.application.ApplicationListener
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.application.ModalityState
@@ -316,8 +315,7 @@ sealed class CompletionPhase @ApiStatus.Internal constructor(
phase.requestCompleted()
val time = phase.indicator?.invocationCount ?: 0
val customId = completionEditor.getUserData(CUSTOM_CODE_COMPLETION_ACTION_ID) ?: IdeActions.ACTION_CODE_COMPLETION
val handler = CodeCompletionHandlerBase.createHandler(completionType, false, autopopup, false, customId)
val handler = CodeCompletionHandlerBase.createHandler(completionType, false, autopopup, false)
handler.invokeCompletion(project, completionEditor, time, false)
}
@@ -559,10 +557,6 @@ sealed class CompletionPhase @ApiStatus.Internal constructor(
@JvmField
internal val AUTO_POPUP_TYPED_EVENT: Key<TypedEvent> = Key.create("AutoPopupTypedEvent")
@ApiStatus.Internal
@JvmField
val CUSTOM_CODE_COMPLETION_ACTION_ID: Key<String> = Key.create("CodeCompletionActionID")
@JvmField
val NoCompletion: CompletionPhase = NoCompletionImpl
}
@@ -92,8 +92,6 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import static com.intellij.codeInsight.completion.CompletionPhase.CUSTOM_CODE_COMPLETION_ACTION_ID;
/**
* See cancellation logic in {@link CompletionPhase.BgCalculation#restartOnWriteAction)}
*
@@ -910,11 +908,7 @@ public final class CompletionProgressIndicator extends ProgressIndicatorBase imp
if (handler.isTestingMode() && !TestModeFlags.is(CompletionAutoPopupHandler.ourTestingAutopopup)) {
closeAndFinish(false);
PsiDocumentManager.getInstance(getProject()).commitAllDocuments();
String customId = myEditor.getUserData(CUSTOM_CODE_COMPLETION_ACTION_ID);
if (customId == null) {
customId = IdeActions.ACTION_CODE_COMPLETION;
}
CodeCompletionHandlerBase handler = CodeCompletionHandlerBase.createHandler(myCompletionType, false, false, true, customId);
CodeCompletionHandlerBase handler = CodeCompletionHandlerBase.createHandler(myCompletionType, false, false, true);
handler.invokeCompletion(getProject(), myEditor, myInvocationCount);
return;
}