File tree Expand file tree Collapse file tree 7 files changed +52
-0
lines changed
exts/ext-http-client/src/main
233/main/resources/META-INF
main/kotlin/cc/unitmesh/devti Expand file tree Collapse file tree 7 files changed +52
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,7 @@ project(":plugin") {
278
278
implementation(project(" :exts:ext-android" ))
279
279
implementation(project(" :exts:ext-harmonyos" ))
280
280
implementation(project(" :exts:ext-git" ))
281
+ implementation(project(" :exts:ext-http-client" ))
281
282
implementation(project(" :exts:ext-terminal" ))
282
283
implementation(project(" :exts:devins-lang" ))
283
284
}
@@ -611,6 +612,17 @@ project(":exts:ext-git") {
611
612
}
612
613
}
613
614
615
+ project(" :exts:ext-http-client" ) {
616
+ intellij {
617
+ version.set(ideaVersion)
618
+ plugins.set(ideaPlugins + " com.jetbrains.restClient" )
619
+ }
620
+
621
+ dependencies {
622
+ implementation(project(" :" ))
623
+ }
624
+ }
625
+
614
626
project(" :local-bundle" ) {
615
627
intellij {
616
628
version.set(ideaVersion)
Original file line number Diff line number Diff line change
1
+ package cc.unitmesh.http
2
+
3
+ class IntellijHttpClientExecutor {
4
+ }
Original file line number Diff line number Diff line change
1
+ <idea-plugin package =" cc.unitmesh.http" >
2
+ <!-- suppress PluginXmlValidity -->
3
+ <dependencies >
4
+ <plugin id =" com.jetbrains.restClient" />
5
+ </dependencies >
6
+
7
+ <actions >
8
+
9
+ </actions >
10
+ </idea-plugin >
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ include(
28
28
" exts:ext-terminal" ,
29
29
// git4idea is the git plugin for IntelliJ IDEA, so we rename it to `exts-git`
30
30
" exts:ext-git" ,
31
+ // for http test
32
+ " exts:ext-http-client" ,
31
33
32
34
// the Input Language support for AutoDev
33
35
" exts:devins-lang"
Original file line number Diff line number Diff line change 185
185
<extensionPoint qualifiedName =" cc.unitmesh.jsonTextProvider"
186
186
interface =" cc.unitmesh.devti.provider.local.JsonTextProvider"
187
187
dynamic =" true" />
188
+
189
+ <extensionPoint qualifiedName =" cc.unitmesh.httpClientExecutor"
190
+ interface =" cc.unitmesh.devti.provider.http.HttpClientProvider"
191
+ dynamic =" true" />
188
192
</extensionPoints >
189
193
190
194
<applicationListeners >
Original file line number Diff line number Diff line change 1
1
package cc.unitmesh.devti.gui.snippet
2
2
3
3
import cc.unitmesh.devti.provider.devins.LanguagePromptProcessor
4
+ import cc.unitmesh.devti.provider.http.HttpClientProvider
4
5
import com.intellij.openapi.actionSystem.ActionUpdateThread
5
6
import com.intellij.openapi.actionSystem.AnActionEvent
6
7
import com.intellij.openapi.fileEditor.FileDocumentManager
@@ -37,6 +38,7 @@ class AutoDevRunDevInsAction : DumbAwareAction() {
37
38
when (language) {
38
39
" http request" -> {
39
40
// call http request processor
41
+ HttpClientProvider .all().forEach { it.execute(project, text) }
40
42
}
41
43
42
44
" DevIn" -> {
Original file line number Diff line number Diff line change
1
+ package cc.unitmesh.devti.provider.http
2
+
3
+ import com.intellij.openapi.extensions.ExtensionPointName
4
+ import com.intellij.openapi.project.Project
5
+
6
+ interface HttpClientProvider {
7
+
8
+ fun execute (project : Project , text : String )
9
+
10
+ companion object {
11
+ private val EP_NAME : ExtensionPointName <HttpClientProvider > =
12
+ ExtensionPointName (" cc.unitmesh.httpClientExecutor" )
13
+
14
+ fun all (): List <HttpClientProvider > {
15
+ return EP_NAME .extensionList
16
+ }
17
+ }
18
+ }
You can’t perform that action at this time.
0 commit comments