File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
src/main/kotlin/cc/unitmesh/devti/gui Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package cc.unitmesh.devti.gui.chat.message
3
3
import cc.unitmesh.devti.AutoDevBundle
4
4
import cc.unitmesh.devti.AutoDevIcons
5
5
import cc.unitmesh.devti.AutoDevNotifications
6
+ import com.intellij.openapi.actionSystem.ActionUpdateThread
6
7
import com.intellij.temporary.gui.block.CompletableMessage
7
8
import com.intellij.openapi.actionSystem.AnActionEvent
8
9
import com.intellij.openapi.project.DumbAwareToggleAction
@@ -16,6 +17,8 @@ enum class ChatMessageRating {
16
17
}
17
18
18
19
abstract class AutoDevRateMessageAction : DumbAwareToggleAction () {
20
+ override fun getActionUpdateThread (): ActionUpdateThread = ActionUpdateThread .EDT
21
+
19
22
abstract fun getReaction (): ChatMessageRating
20
23
abstract fun getReactionIcon (): Icon
21
24
abstract fun getReactionIconSelected (): Icon
Original file line number Diff line number Diff line change 1
1
package cc.unitmesh.devti.gui.snippet
2
2
3
+ import com.intellij.openapi.actionSystem.ActionUpdateThread
3
4
import com.intellij.openapi.actionSystem.AnActionEvent
4
5
import com.intellij.openapi.project.DumbAwareAction
5
6
import java.awt.Toolkit
6
7
import java.awt.datatransfer.StringSelection
7
8
8
9
class AutoDevCopyToClipboardAction : DumbAwareAction () {
10
+ override fun getActionUpdateThread (): ActionUpdateThread = ActionUpdateThread .EDT
11
+
9
12
override fun actionPerformed (e : AnActionEvent ) {
10
13
val editor = e.getData(com.intellij.openapi.actionSystem.PlatformDataKeys .EDITOR ) ? : return
11
14
val document = editor.document
Original file line number Diff line number Diff line change 1
1
package cc.unitmesh.devti.gui.snippet
2
2
3
+ import com.intellij.openapi.actionSystem.ActionUpdateThread
3
4
import com.intellij.openapi.actionSystem.AnActionEvent
4
5
import com.intellij.openapi.actionSystem.CommonDataKeys
5
6
import com.intellij.openapi.actionSystem.Presentation
@@ -14,6 +15,8 @@ import com.intellij.util.ui.UIUtil
14
15
import javax.swing.JComponent
15
16
16
17
class AutoDevLanguageLabelAction : DumbAwareAction (), CustomComponentAction {
18
+ override fun getActionUpdateThread (): ActionUpdateThread = ActionUpdateThread .BGT
19
+
17
20
override fun createCustomComponent (presentation : Presentation , place : String ): JComponent {
18
21
val languageId = snippetLanguageName(presentation)
19
22
val jBLabel: JComponent = JBLabel (languageId)
You can’t perform that action at this time.
0 commit comments