IJPL-207762 hide hacky AutoPopupController.ALLOW_AUTO_POPUP_FOR_SLASHES_IN_PATHS flag from API

GitOrigin-RevId: c3e2cd9021d61d75a4d50a61b5f2b91badee28d7
This commit is contained in:
Max Medvedev
2026-02-12 14:44:47 +00:00
committed by intellij-monorepo-bot
parent d79c6ad1d1
commit 832d0349e8
3 changed files with 7 additions and 3 deletions
@@ -83,7 +83,6 @@ e:com.intellij.codeHighlighting.TextEditorHighlightingPassRegistrar$Anchor
- s:valueOf(java.lang.String):com.intellij.codeHighlighting.TextEditorHighlightingPassRegistrar$Anchor
- s:values():com.intellij.codeHighlighting.TextEditorHighlightingPassRegistrar$Anchor[]
a:com.intellij.codeInsight.AutoPopupController
- sf:ALLOW_AUTO_POPUP_FOR_SLASHES_IN_PATHS:com.intellij.openapi.util.Key
- sf:ALWAYS_AUTO_POPUP:com.intellij.openapi.util.Key
- sf:AUTO_POPUP_ON_FOCUS_GAINED:com.intellij.openapi.util.Key
- sf:NO_ADS:com.intellij.openapi.util.Key
@@ -36,7 +36,10 @@ public abstract class AutoPopupController {
/**
* Setting this user data key to the editor with a completion provider
* allows showing the auto popup for slashes
* @deprecated Implement your own {@link com.intellij.codeInsight.editorActions.TypedHandlerDelegate#checkAutoPopup(char, Project, Editor, PsiFile)}
*/
@ApiStatus.Internal
@Deprecated
public static final Key<Boolean> ALLOW_AUTO_POPUP_FOR_SLASHES_IN_PATHS = Key.create("Allow Auto-Popup For Slashes In Paths");
/**
@@ -333,8 +333,10 @@ public final class TypedHandler extends TypedActionHandlerBase {
* and implement {@link TypedHandlerDelegate#checkAutoPopup}
*/
public static void autoPopupCompletion(@NotNull Editor editor, char charTyped, @NotNull Project project, @NotNull PsiFile file) {
boolean allowSlashes = Boolean.TRUE.equals(editor.getUserData(AutoPopupController.ALLOW_AUTO_POPUP_FOR_SLASHES_IN_PATHS));
if (charTyped == '.' || (allowSlashes && charTyped == '/') || isAutoPopup(editor, file, charTyped)) {
if (charTyped == '.' ||
(charTyped == '/' && Boolean.TRUE.equals(editor.getUserData(AutoPopupController.ALLOW_AUTO_POPUP_FOR_SLASHES_IN_PATHS))) || // todo rewrite with TypedHandlerDelegate#checkAutoPopup
isAutoPopup(editor, file, charTyped)
) {
AutoPopupController.getInstance(project).scheduleAutoPopup(editor);
}
}