We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 065c149 commit b8cc0e6Copy full SHA for b8cc0e6
exts/ext-terminal/src/main/kotlin/cc/unitmesh/terminal/sketch/TerminalLangSketchProvider.kt
@@ -70,8 +70,13 @@ class TerminalLangSketchProvider : LanguageSketchProvider {
70
val sendButton = JButton("Send to Sketch").apply {
71
addMouseListener(object : MouseAdapter() {
72
override fun mouseClicked(e: MouseEvent?) {
73
- val output = terminalWidget!!.text
74
- sendToSketch(project, output)
+ try {
+ val output = terminalWidget!!::class.java.getMethod("getText")
75
+ .invoke(terminalWidget) as String
76
+ sendToSketch(project, output)
77
+ } catch (e: Exception) {
78
+ AutoDevNotifications.notify(project, "Failed to send to Sketch")
79
+ }
80
}
81
})
82
0 commit comments