IDEA插件开发流程

爱被打了一巴掌 2022-04-11 06:45 517阅读 0赞

1、启用 Plugin DevKit
2、配置 IntelliJ Platform Plugin SDK
3、配置文件

  1. <idea-plugin>
  2. <!-- 插件名称,别人在官方插件库搜索你的插件时使用的名称 -->
  3. <name>MyPlugin</name>
  4. <!-- 插件唯一id,不能和其他插件项目重复,所以推荐使用com.xxx.xxx的格式 插件不同版本之间不能更改,若没有指定,则与插件名称相同 -->
  5. <id>com.example.plugin.myplugin</id>
  6. <!-- 插件的描述 -->
  7. <description>my plugin description</description>
  8. <!-- 插件版本变更信息,支持HTML标签; 将展示在 settings | Plugins 对话框和插件仓库的Web页面 -->
  9. <change-notes>Initial release of the plugin.</change-notes>
  10. <!-- 插件版本 -->
  11. <version>1.0</version>
  12. <!-- 供应商主页和email-->
  13. <vendor url="http://www.jetbrains.com" email="support@jetbrains.com" />
  14. <!-- 插件所依赖的其他插件的id -->
  15. <depends>MyFirstPlugin</depends>
  16. <!-- 插件兼容IDEA的最大和最小 build 号,两个属性可以任选一个或者同时使用 官网详细介绍:http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html-->
  17. <idea-version since-build="3000" until-build="3999"/>
  18. <!-- application components -->
  19. <application-components>
  20. <component>
  21. <!-- 组件接口 -->
  22. <interface-class>com.foo.Component1Interface</interface-class>
  23. <!-- 组件的实现类 -->
  24. <implementation-class>com.foo.impl.Component1Impl</implementation-class>
  25. </component>
  26. </application-components>
  27. <!-- project components -->
  28. <project-components>
  29. <component>
  30. <!-- 接口和实现类相同 -->
  31. <interface-class>com.foo.Component2</interface-class>
  32. </component>
  33. </project-components>
  34. <!-- module components -->
  35. <module-components>
  36. <component>
  37. <interface-class>com.foo.Component3</interface-class>
  38. </component>
  39. </module-components>
  40. <!-- Actions -->
  41. <actions>
  42. ...
  43. </actions>
  44. <!-- 插件定义的扩展点,以供其他插件扩展该插件 -->
  45. <extensionPoints>
  46. ...
  47. </extensionPoints>
  48. <!-- 声明该插件对IDEA core或其他插件的扩展 -->
  49. <extensions xmlns="com.intellij">
  50. ...
  51. </extensions>
  52. </idea-plugin>

发表评论

表情:
评论列表 (有 0 条评论,517人围观)

还没有评论,来说两句吧...

相关阅读

    相关 IDEA开发总结

    前言 IDEA是一个非常强大的工具,对于提高编程效率有非常大的帮助。当然他也不是全能的,有时候的一些需求他可能并没有办法直接满足,这个时候一般就需要通过他的插件来完成了。