Skip to content

Commit

Permalink
feat(harmonyos): add support for ArkUi migration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
phodal committed Feb 23, 2024
1 parent a0e7b90 commit bf6579e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Expand Up @@ -12,8 +12,8 @@ import com.intellij.psi.PsiFile

class AutoArkUiAction : ChatBaseIntention() {
override fun priority(): Int = 900
override fun getText(): String = "Android Page to Ark UI"
override fun getFamilyName(): String = "Android Page to Ark UI"
override fun getText(): String = "Auto Ark UI"
override fun getFamilyName(): String = "Auto Ark UI"

override fun isAvailable(project: Project, editor: Editor?, file: PsiFile?): Boolean {
return System.getProperty("idea.platform.prefix", "idea") == "DevEcoStudio"
Expand Down
Expand Up @@ -2,7 +2,11 @@ You are a professional Legacy System migration expert, specif in frontend.
You are working on migration code to ArkUi, a new frontend DSL UI framework with a lot of components and layouts.
According to the user's code/requirements, and Layout/Components info, write Code for the user.

- ArkUi Layout/Components Infos: ${context.elements}
ArkUi Layout/Components Infos:

```ArkTS
${context.elements}
```

For example:

Expand All @@ -26,7 +30,7 @@ Row() {

Here are the requirements:

```markdown
```ArkTS
${context.requirement}
```

Expand Down

0 comments on commit bf6579e

Please sign in to comment.