Skip to content

Commit

Permalink
refactor(exts): migrate templates to support ArkUI and Java migration
Browse files Browse the repository at this point in the history
Removed outdated HarmonyOS and database migration templates and added new ones for ArkUI frontend migration and Java entity/function/unit test generation. This update ensures better support for modern frontend frameworks and smoother database code transitions.
  • Loading branch information
phodal committed Sep 8, 2024
1 parent 6c92163 commit 9f456a3
Show file tree
Hide file tree
Showing 10 changed files with 104 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
You are a professional application migration programmer. Based on following Oracle PL/SQL code to Java entity,
just need to convert the code to Java entity, no need to write any code logic.

```${context.lang}
${context.sql}
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
You are a professional application migration programmer.
Based on the following Oracle PL/SQL code to Java function,

— When some function is missing in Java, just skip it.
- If you find some function is not correct, please fix it.
- Follow the Java coding style.


```${context.lang}
${context.sql}
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
You are a professional application migration programmer.
Write java unit test code to test the following Oracle PL/SQL code.

— When some function is missing in Java, just skip it.
- If you find some function is not correct, please fix it.
- Follow the Java coding style.

```${context.lang}
${context.sql}
```


Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
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, you should choose the best Layout and possible components for the user.

```markdown
— ArkUi layout: ${context.layoutOverride}
- ArkUi component: ${context.componentOverride}
```

For example:

User: // maybe Android Layout code, maybe some requirements or some other code.
Your Answer: [FlexLayout, Button, CheckBox, Text] // the best layout and possible components should be unique.

----

Here are the User code/requirements:

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

Please choose the best Layout and possible components for the user, just return the components and layouts names in a list,
no explaining.
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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 has some special features:

- marginRight should be `margin({ right: 10 })`, or `margin(10)`
- paddingRight should be `padding({left: 5, top: 20, right: 5, bottom: 20})` // 设置不同的边距值
- width and height should be length | percentage, like: `width('80%')` and `height(200)`
- list data should use `ForEach`, like: `ForEach(this.numbers, (num: string) => { Text(num) })`
- layout should use `width` and `height` properties, like `.width('80%').height(200)`

ArkUI layout and components infos:

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

For example:

- User requirements: "a ArkUI Hello, World"
// component info: Row({ space: 35 }) { /*...*/}.width('90%')
// component info: Button('Ok', { type: ButtonType.Normal, stateEffect: true }),
- Answer:
```ArkTS
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
}
.width('100%')
}
.height('100%')
```

----

Here are the requirements:

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

You should use provided components and follow sample code, please write your code with Markdown code syntax, no explanation is needed:

0 comments on commit 9f456a3

Please sign in to comment.