Skip to content

Commit b428c8d

Browse files
Merge main into feature/q-dev-execution
2 parents a5d9f74 + 7c89b10 commit b428c8d

File tree

1 file changed

+7
-2
lines changed
  • plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/inline

1 file changed

+7
-2
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/inline/OpenChatInputAction.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,20 @@
33

44
package software.aws.toolkits.jetbrains.services.cwc.inline
55

6-
import com.intellij.execution.impl.ConsoleViewImpl
76
import com.intellij.openapi.actionSystem.AnAction
87
import com.intellij.openapi.actionSystem.AnActionEvent
98
import com.intellij.openapi.actionSystem.CommonDataKeys
9+
import com.intellij.openapi.util.Key
1010

1111
class OpenChatInputAction : AnAction() {
1212
override fun actionPerformed(e: AnActionEvent) {
1313
val editor = e.getData(CommonDataKeys.EDITOR) ?: return
14-
val isConsole = editor.document.getUserData(ConsoleViewImpl.IS_CONSOLE_DOCUMENT)
14+
// FIX_WHEN_MIN_IS_241: change below to use ConsoleViewImpl.IS_CONSOLE_DOCUMENT
15+
var isConsole: Any? = null
16+
val key: Key<*>? = Key.findKeyByName("IS_CONSOLE_DOCUMENT")
17+
if (key != null) {
18+
isConsole = editor.document.getUserData(key)
19+
}
1520
if (isConsole == true) return
1621
if (!editor.document.isWritable) return
1722
val project = editor.project ?: return

0 commit comments

Comments
 (0)