Skip to content

Commit

Permalink
feat(ext-harmonyos): add android plugin dependency and component class
Browse files Browse the repository at this point in the history
- Add a plugin dependency for org.jetbrains.android in ext-harmonyos.xml
- Introduce a new data class Component in AndroidPageToArkUiAction.kt with a list() function.
  • Loading branch information
phodal committed Feb 23, 2024
1 parent 09494cf commit 62042f1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Expand Up @@ -38,3 +38,20 @@ class AndroidPageToArkUiAction : ChatBaseIntention() {
class AutoArkUi(project: Project, selectedText: @NlsSafe String, editor: Editor) {

}

data class Component(val name: String, val type: String, val example: String) {
fun list() {
val button = Component("Button", "Button", "Button('Ok', { type: ButtonType.Normal, stateEffect: true }) \n" +
" .borderRadius(8) \n" +
" .backgroundColor(0x317aff) \n" +
" .width(90)\n" +
" .height(40)")

val radio = Component("Radio", "Radio", " Radio({ value: 'Radio1', group: 'radioGroup' })\n" +
" .onChange((isChecked: boolean) => {\n" +
" if(isChecked) {\n" +
" //需要执行的操作\n" +
" }\n" +
" })")
}
}
@@ -1,6 +1,7 @@
<idea-plugin package="cc.unitmesh.harmonyos">
<!--suppress PluginXmlValidity -->
<dependencies>
<plugin id="org.jetbrains.android"/>
</dependencies>

<extensions defaultExtensionNs="cc.unitmesh">
Expand All @@ -9,5 +10,5 @@
<bundleName>messages.AutoDevBundle</bundleName>
<categoryKey>intention.category.llm</categoryKey>
</autoDevIntention>
</extensions>>
</extensions>
</idea-plugin>

0 comments on commit 62042f1

Please sign in to comment.