File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
233/main/resources/META-INF
main/kotlin/cc/unitmesh/devti/smartpaste Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 51
51
<!-- Run Configurations -->
52
52
<programRunner implementation =" cc.unitmesh.devti.runconfig.AutoDevCommandRunner" />
53
53
54
+ <!-- <copyPastePostProcessor implementation="cc.unitmesh.devti.smartpaste.SmartCopyPasteProcessor"/>-->
55
+
54
56
<toolWindow id =" AutoDev"
55
57
doNotActivateOnStart =" true"
56
58
anchor =" right"
Original file line number Diff line number Diff line change
1
+ package cc.unitmesh.devti.smartpaste
2
+
3
+ import com.intellij.codeInsight.editorActions.CopyPastePostProcessor
4
+ import com.intellij.codeInsight.editorActions.TextBlockTransferableData
5
+ import com.intellij.openapi.editor.Editor
6
+ import com.intellij.openapi.project.DumbService
7
+ import com.intellij.psi.PsiFile
8
+
9
+ class SmartCopyPasteProcessor : CopyPastePostProcessor <TextBlockTransferableData >() {
10
+ override fun collectTransferableData (
11
+ file : PsiFile ,
12
+ editor : Editor ,
13
+ startOffsets : IntArray ,
14
+ endOffsets : IntArray
15
+ ): List <TextBlockTransferableData > {
16
+ if (DumbService .isDumb(file.project)) return emptyList()
17
+
18
+ return emptyList()
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments