Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import software.aws.toolkits.jetbrains.services.codewhisperer.popup.QInlineCompl
fun InlineCompletionEvent.isManualCall(): Boolean =
this is InlineCompletionEvent.DirectCall && this.context?.getData(DATA_KEY_Q_AUTO_TRIGGER_INTELLISENSE) == false

fun InlineCompletionEvent.isIntelliSense(): Boolean =
this is InlineCompletionEvent.DirectCall && this.context?.getData(DATA_KEY_Q_AUTO_TRIGGER_INTELLISENSE) == true

fun getManualCallEvent(editor: Editor, isIntelliSenseAccept: Boolean): InlineCompletionEvent {
val dataContext = DataContext { dataId ->
when (dataId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import software.aws.toolkits.jetbrains.services.codewhisperer.popup.QInlineCompl
fun InlineCompletionEvent.isManualCall(): Boolean =
this is InlineCompletionEvent.ManualCall && this.additionalData.getUserData(KEY_Q_AUTO_TRIGGER_INTELLISENSE) == false

fun InlineCompletionEvent.isIntelliSense(): Boolean =
this is InlineCompletionEvent.ManualCall && this.additionalData.getUserData(KEY_Q_AUTO_TRIGGER_INTELLISENSE) == true

fun getManualCallEvent(editor: Editor, isIntelliSenseAccept: Boolean): InlineCompletionEvent {
val data = UserDataHolderBase().apply { this.putUserData(KEY_Q_AUTO_TRIGGER_INTELLISENSE, isIntelliSenseAccept) }
return InlineCompletionEvent.ManualCall(editor, Q_INLINE_PROVIDER_ID, data)
Expand Down
Loading
Loading