diff --git a/platform/analysis-impl/api-dump-unreviewed.txt b/platform/analysis-impl/api-dump-unreviewed.txt index 02d51d828f27..64d2bfff3ffb 100644 --- a/platform/analysis-impl/api-dump-unreviewed.txt +++ b/platform/analysis-impl/api-dump-unreviewed.txt @@ -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 diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/AutoPopupController.java b/platform/analysis-impl/src/com/intellij/codeInsight/AutoPopupController.java index 20df04ce9566..3943f7679e58 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/AutoPopupController.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/AutoPopupController.java @@ -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 ALLOW_AUTO_POPUP_FOR_SLASHES_IN_PATHS = Key.create("Allow Auto-Popup For Slashes In Paths"); /** diff --git a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java index 015a5c4ba650..93a1b6e5dbd2 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/editorActions/TypedHandler.java @@ -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); } }