generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 372
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(exts): migrate templates to support ArkUI and Java migration
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
Showing
10 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
exts/ext-database/src/main/resources/genius/zh/migration/gen-entity.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
``` | ||
|
||
|
13 changes: 13 additions & 0 deletions
13
exts/ext-database/src/main/resources/genius/zh/migration/gen-function.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
``` | ||
|
||
|
12 changes: 12 additions & 0 deletions
12
exts/ext-database/src/main/resources/genius/zh/migration/gen-unittest.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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} | ||
``` | ||
|
||
|
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
exts/ext-harmonyos/src/main/resources/genius/zh/harmonyos/arkui-clarify.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
46 changes: 46 additions & 0 deletions
46
exts/ext-harmonyos/src/main/resources/genius/zh/harmonyos/arkui-design.vm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|