File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/main/kotlin/cc/unitmesh/devti/custom Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,12 @@ import org.apache.velocity.app.Velocity
19
19
import java.io.StringWriter
20
20
21
21
class CustomActionBaseIntention (private val intentionConfig : CustomIntentionConfig ) : ChatBaseIntention() {
22
- override fun getText (): String = intentionConfig.title
23
-
24
22
private val logger = logger<CustomActionBaseIntention >()
25
23
26
- override fun getFamilyName (): String = AutoDevBundle .message( " autodev.custom.intentions.family " )
27
- override fun priority (): Int {
28
- return intentionConfig.priority
29
- }
24
+ override fun getText (): String = intentionConfig.title
25
+ override fun getFamilyName () = AutoDevBundle .message( " autodev.custom.intentions.family " )
26
+ override fun priority () = intentionConfig.priority
27
+ override fun getActionType (): ChatActionType = ChatActionType . CUSTOM_ACTION
30
28
31
29
override fun isAvailable (project : Project , editor : Editor ? , file : PsiFile ? ): Boolean {
32
30
if (editor == null || file == null ) return false
@@ -40,8 +38,6 @@ class CustomActionBaseIntention(private val intentionConfig: CustomIntentionConf
40
38
}
41
39
}
42
40
43
- override fun getActionType (): ChatActionType = ChatActionType .CUSTOM_ACTION
44
-
45
41
override fun invoke (project : Project , editor : Editor ? , file : PsiFile ? ) {
46
42
if (editor == null || file == null ) return
47
43
val withRange = elementWithRange(editor, file, project) ? : return
You can’t perform that action at this time.
0 commit comments