File tree Expand file tree Collapse file tree 2 files changed +11
-32
lines changed
core/src/main/kotlin/cc/unitmesh/devti/bridge Expand file tree Collapse file tree 2 files changed +11
-32
lines changed Original file line number Diff line number Diff line change @@ -68,19 +68,26 @@ sealed class Security(override val name: String) : BridgeCommandProvider {
68
68
* ```
69
69
*/
70
70
sealed class ArchViewCommand (override val name : String ) : BridgeCommandProvider {
71
- object WebApi : ArchViewCommand(" / webapi" )
71
+ object WebApi : ArchViewCommand(" webapi" )
72
72
73
73
/* *
74
74
* Aka Module View
75
75
*/
76
76
object ContainerView : ArchViewCommand(" containerView" )
77
-
78
77
/* *
79
78
* /componentView
80
79
*/
81
80
object ComponentView : ArchViewCommand(" componentView" )
82
- object StylingView : ArchViewCommand(" stylingView" )
81
+
82
+ /* *
83
+ * For show code dependency, like UML Class Diagram in Graph.
84
+ */
83
85
object CodeView : ArchViewCommand(" codeView" )
86
+
87
+ /* *
88
+ * For frontend Style, like CSS, SCSS, etc.
89
+ */
90
+ object StylingView : ArchViewCommand(" stylingView" )
84
91
}
85
92
86
93
/* *
Original file line number Diff line number Diff line change 1
1
package cc.unitmesh.devti.bridge.command
2
2
3
- import com.intellij.util.io.awaitExit
4
- import kotlinx.coroutines.*
5
- import kotlinx.serialization.Serializable
6
3
import kotlinx.serialization.SerialName
4
+ import kotlinx.serialization.Serializable
7
5
import kotlinx.serialization.json.Json
8
6
9
7
@Serializable
@@ -60,32 +58,6 @@ class SccWrapper(
60
58
return parseResult(output)
61
59
}
62
60
63
- /* *
64
- * 异步执行 scc 命令(使用协程)
65
- * @param arguments scc 命令行参数
66
- */
67
- suspend fun runSccAsync (vararg arguments : String ): List <SccResult > =
68
- withContext(Dispatchers .IO ) {
69
- val command = buildCommand(arguments)
70
- val process = ProcessBuilder (command)
71
- .redirectErrorStream(true )
72
- .start()
73
-
74
- val output = process.inputStream.reader().use { reader ->
75
- reader.readText()
76
- }
77
-
78
- val exitCode = withTimeoutOrNull(timeoutSeconds * 1000 ) {
79
- process.awaitExit()
80
- } ? : throw SccException (" scc execution timed out after $timeoutSeconds seconds" )
81
-
82
- if (exitCode != 0 ) {
83
- throw SccException (" scc exited with code $exitCode . Output: $output " )
84
- }
85
-
86
- parseResult(output)
87
- }
88
-
89
61
private fun buildCommand (arguments : Array <out String >): List <String > {
90
62
val baseCommand = if (sccPath.contains(" " )) {
91
63
listOf (" cmd" , " /c" , sccPath)
You can’t perform that action at this time.
0 commit comments