1、新建项目
2、初始化配置项目
- // Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
- intellij {
- // version.set("2022.2.1")
- // type.set("AI") // Target IDE Platform
-
- plugins.set(listOf("Kotlin","android","git4idea"))
- // plugins.set(listOf("com.jetbrains.android:222.4345.14","kotlin","git4idea"))
-
- localPath.set("H:\\develop\\software\\Toolbox\\apps\\AndroidStudio\\ch-1\\222.4345.14.2221.9252092")
-
- }
这里写的是as的版本 还有添加依赖
- <depends>com.intellij.modules.platform</depends>
- <depends>org.jetbrains.kotlin</depends>
- <depends>com.intellij.modules.all</depends>
下一步 创建AnAction
这些个包名要自己创建 文件名也是
然后配置到配置文件当中
- <actions>
- <action id="SecondAction"
- class="com.anguomob.anguo.actions.HelloWordAction"
- text="测试标题"
- description="第二个测试标题"/>
-
- <group id="MyPlugin.TopMnu" text="安果" description="安果专用组件">
-
- <reference id="SecondAction"/>
-
- <action id="Demo Action"
- class="com.anguomob.anguo.actions.HelloWordAction"
- text="测试标题"
- description="测试通知标题"
- >
- <keyboard-shortcut first-keystroke="ctrl alt p" keymap="$default"/>
- </action>
- <add-to-group group-id="MainMenu" anchor="last"/>
-
-
- </group>
- <group id="SecondGroup" text="_My Second Group" popup="true">
- <add-to-group group-id="MyPlugin.TopMnu" anchor="first"/>
- <reference id="SecondAction"/>
- </group>
- </actions>
然后 run
漂亮的一笔 爱死我了。