From 196334d66b41fa5ad24c5ccf0781066d802daaf4 Mon Sep 17 00:00:00 2001 From: Petr Surkov Date: Tue, 4 Jun 2024 19:39:27 +0200 Subject: [PATCH] [ai-completion] ML-3369 Improve deprecation annotation of isCurrentlyDisplaying GitOrigin-RevId: 379729d9dbe94dc32b62b7fc649a84a09f09be70 --- .../inline/completion/InlineCompletionEventListener.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/codeInsight/inline/completion/InlineCompletionEventListener.kt b/platform/platform-impl/src/com/intellij/codeInsight/inline/completion/InlineCompletionEventListener.kt index c468ed712635..e99a0f17f022 100644 --- a/platform/platform-impl/src/com/intellij/codeInsight/inline/completion/InlineCompletionEventListener.kt +++ b/platform/platform-impl/src/com/intellij/codeInsight/inline/completion/InlineCompletionEventListener.kt @@ -57,7 +57,11 @@ sealed class InlineCompletionEventType { */ class Hide @ApiStatus.Internal constructor( val finishType: FinishType, - @Deprecated("This value is incorrect sometimes. Use Show event to determine if completion was shown") + @Deprecated(""" + This value delegates to InlineCompletionContext.isCurrentlyDisplaying(). + In cases of invalidation (e.g., mismatched typing), the context is already cleared, causing the method to return false, + which can be misleading. + Please use other methods of the listener to determine whether completion is or was being shown.""") val isCurrentlyDisplaying: Boolean ) : InlineCompletionEventType()