Skip to content

Commit bf6579e

Browse files
committed
feat(harmonyos): add support for ArkUi migration
Add support for ArkUi migration in the HarmonyOS extension. This allows users to write code for the ArkUi framework based on the layout and component information provided. The `ext-harmonyos/src/main/resources/genius/harmonyos/arkui-design.vm` file has been modified to include the ArkUi layout and component information. Additionally, the `ext-harmonyos/src/main/kotlin/cc/unitmesh/harmonyos/actions/AutoArkUiAction.kt` file has been updated to change the text and family name for the Auto Ark UI action.
1 parent a0e7b90 commit bf6579e

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

exts/ext-harmonyos/src/main/kotlin/cc/unitmesh/harmonyos/actions/AutoArkUiAction.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import com.intellij.psi.PsiFile
1212

1313
class AutoArkUiAction : ChatBaseIntention() {
1414
override fun priority(): Int = 900
15-
override fun getText(): String = "Android Page to Ark UI"
16-
override fun getFamilyName(): String = "Android Page to Ark UI"
15+
override fun getText(): String = "Auto Ark UI"
16+
override fun getFamilyName(): String = "Auto Ark UI"
1717

1818
override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?): Boolean {
1919
return System.getProperty("idea.platform.prefix", "idea") == "DevEcoStudio"

exts/ext-harmonyos/src/main/resources/genius/harmonyos/arkui-design.vm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ You are a professional Legacy System migration expert, specif in frontend.
22
You are working on migration code to ArkUi, a new frontend DSL UI framework with a lot of components and layouts.
33
According to the user's code/requirements, and Layout/Components info, write Code for the user.
44

5-
- ArkUi Layout/Components Infos: ${context.elements}
5+
ArkUi Layout/Components Infos:
6+
7+
```ArkTS
8+
${context.elements}
9+
```
610

711
For example:
812

@@ -26,7 +30,7 @@ Row() {
2630

2731
Here are the requirements:
2832

29-
```markdown
33+
```ArkTS
3034
${context.requirement}
3135
```
3236

0 commit comments

Comments
 (0)