Skip to content

Commit d76195a

Browse files
committed
refactor(bridge): move UiComponent and related classes to archview model #319
Moved UiComponent and its related files to `cc.unitmesh.devti.bridge.archview.model` to better organize the code structure. Updated all references to the new location. Renamed `function` package to `archview` for consistency. Adjusted command names in `BridgeCommandProvider` to use lowercase for standardization.
1 parent 6155a78 commit d76195a

File tree

12 files changed

+18
-19
lines changed

12 files changed

+18
-19
lines changed

core/src/233/main/resources/META-INF/autodev-core.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@
255255
<langSketchProvider implementation="cc.unitmesh.devti.sketch.ui.webview.WebpageSketchProvider"/>
256256
<langSketchProvider implementation="cc.unitmesh.devti.sketch.ui.openapi.OpenAPISketchProvider"/>
257257

258-
<toolchainFunctionProvider implementation="cc.unitmesh.devti.bridge.function.ComponentViewFunctionProvider"/>
259-
<toolchainFunctionProvider implementation="cc.unitmesh.devti.bridge.function.ContainerViewFunctionProvider"/>
258+
<toolchainFunctionProvider implementation="cc.unitmesh.devti.bridge.archview.ComponentViewFunctionProvider"/>
259+
<toolchainFunctionProvider implementation="cc.unitmesh.devti.bridge.archview.ContainerViewFunctionProvider"/>
260260
</extensions>
261261

262262
<actions>

core/src/main/kotlin/cc/unitmesh/devti/bridge/BridgeCommandProvider.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,17 @@ sealed interface BridgeCommandProvider {
2727
* Always tell user, if you can try Microservices or Micro Frontend, will be lower cost and higher efficiency.
2828
*/
2929
sealed class Assessment(override val name: String) : BridgeCommandProvider {
30-
object SCC : Assessment("SCC")
31-
object CLOC : Assessment("CLOC")
32-
object Dependencies : Assessment("/dependencies")
30+
object SCC : Assessment("scc")
31+
object Dependencies : Assessment("dependencies")
3332
}
3433

3534
/**
3635
* list all tools, and show in structures.
3736
*/
3837
sealed class Target(override val name: String) : BridgeCommandProvider {
39-
object Docker : Target("Docker")
40-
object BuildTool : Target("/buildTool")
41-
object Mermaid : Target("/mermaid")
38+
object Docker : Target("docker")
39+
object BuildTool : Target("buildTool")
40+
object Mermaid : Target("mermaid")
4241
}
4342

4443
/**

core/src/main/kotlin/cc/unitmesh/devti/bridge/function/ComponentViewFunctionProvider.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/bridge/archview/ComponentViewFunctionProvider.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package cc.unitmesh.devti.bridge.function
1+
package cc.unitmesh.devti.bridge.archview
22

33
import cc.unitmesh.devti.bridge.ArchViewCommand
44
import cc.unitmesh.devti.bridge.provider.ComponentViewProvider
5-
import cc.unitmesh.devti.bridge.tools.UiComponent
5+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
66
import cc.unitmesh.devti.provider.toolchain.ToolchainFunctionProvider
77
import com.intellij.openapi.project.Project
88

core/src/main/kotlin/cc/unitmesh/devti/bridge/function/ContainerViewFunctionProvider.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/bridge/archview/ContainerViewFunctionProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cc.unitmesh.devti.bridge.function
1+
package cc.unitmesh.devti.bridge.archview
22

33
import cc.unitmesh.devti.bridge.ArchViewCommand
44
import cc.unitmesh.devti.provider.toolchain.ToolchainFunctionProvider

core/src/main/kotlin/cc/unitmesh/devti/bridge/tools/UiComponent.kt renamed to core/src/main/kotlin/cc/unitmesh/devti/bridge/archview/model/UiComponent.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package cc.unitmesh.devti.bridge.tools
1+
package cc.unitmesh.devti.bridge.archview.model
22

33
import kotlinx.serialization.Serializable
44

core/src/main/kotlin/cc/unitmesh/devti/bridge/provider/ComponentViewProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cc.unitmesh.devti.bridge.provider
22

3-
import cc.unitmesh.devti.bridge.tools.UiComponent
3+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
44
import com.intellij.openapi.extensions.ExtensionPointName
55
import com.intellij.openapi.project.Project
66
import com.intellij.serviceContainer.LazyExtensionInstance

exts/ext-vue/src/233/main/kotlin/cc/unitmesh/vue/provider/bridge/VueComponentViewProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cc.unitmesh.vue.provider.bridge
22

33
import cc.unitmesh.devti.bridge.provider.ComponentViewProvider
4-
import cc.unitmesh.devti.bridge.tools.UiComponent
4+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
55
import cc.unitmesh.devti.util.relativePath
66
import com.intellij.javascript.nodejs.PackageJsonData
77
import com.intellij.javascript.nodejs.packageJson.PackageJsonFileManager

javascript/src/main/kotlin/cc/unitmesh/ide/javascript/bridge/ReactComponentViewProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cc.unitmesh.ide.javascript.bridge
22

3-
import cc.unitmesh.devti.bridge.tools.UiComponent
3+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
44
import cc.unitmesh.ide.javascript.flow.ReactAutoPage
55
import cc.unitmesh.ide.javascript.util.ReactPsiUtil
66
import com.intellij.lang.javascript.JavaScriptFileType

javascript/src/main/kotlin/cc/unitmesh/ide/javascript/flow/AutoPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package cc.unitmesh.ide.javascript.flow
22

33
import cc.unitmesh.devti.flow.TaskFlow
4-
import cc.unitmesh.devti.bridge.tools.UiComponent
4+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
55

66
/**
77
* FrontendFlow is an interface that represents the flow of tasks in a frontend application.

javascript/src/main/kotlin/cc/unitmesh/ide/javascript/flow/AutoPageFlow.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import cc.unitmesh.devti.llms.LLMProvider
77
import cc.unitmesh.devti.template.GENIUS_PAGE
88
import cc.unitmesh.devti.template.TemplateRender
99
import cc.unitmesh.ide.javascript.flow.model.AutoPageContext
10-
import cc.unitmesh.devti.bridge.tools.UiComponent
10+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
1111
import kotlinx.coroutines.runBlocking
1212

1313
class AutoPageFlow(val context: AutoPageContext, val panel: ChatCodingPanel, val llm: LLMProvider) :

javascript/src/main/kotlin/cc/unitmesh/ide/javascript/flow/ReactAutoPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cc.unitmesh.ide.javascript.flow
22

3-
import cc.unitmesh.devti.bridge.tools.UiComponent
3+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
44
import cc.unitmesh.ide.javascript.bridge.ReactComponentViewProvider
55
import com.intellij.lang.javascript.JavaScriptFileType
66
import com.intellij.lang.javascript.TypeScriptJSXFileType

javascript/src/main/kotlin/cc/unitmesh/ide/javascript/util/ReactPsiUtil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package cc.unitmesh.ide.javascript.util
22

3-
import cc.unitmesh.devti.bridge.tools.UiComponent
3+
import cc.unitmesh.devti.bridge.archview.model.UiComponent
44
import com.intellij.lang.ecmascript6.psi.ES6ExportDeclaration
55
import com.intellij.lang.ecmascript6.psi.ES6ExportDefaultAssignment
66
import com.intellij.lang.javascript.presentable.JSFormatUtil

0 commit comments

Comments
 (0)