Intellij IDEA CodeReview插件开发1:理论篇

本文介绍了IntelliJ Platform SDK,讲解了插件开发的基础,包括分类、结构和核心组件如Action动作、文件系统、文档及编辑器的使用。通过SDK,开发者可以定制IDE,添加语言支持、工具集成和UI增强。文章详细阐述了Action的创建、文件系统的虚拟化以及编辑器交互的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

IntelliJ Platform SDK

可以让我们开发插件,定制IDE,例如支持特定的语言

插件

在IntelliJ平台上构建的产品是可组合的应用程序,插件可以通过多种方式扩展平台,从添加简单的菜单项到添加对完整语言,构建系统和调试器的支持。

分类
  • 自定义语言支持 (Kotlin)
  • 框架集成 (Spring)
  • 工具集成 (DBHelper)
  • 用户界面加载项(背景图片插件)
结构
  1. 组成部分
.IntelliJIDEAx0/
  plugins/
    sample.jar/
      com/foo/...
      ...
      ...
      META-INF/
        plugin.xml
        pluginIcon.svg
        pluginIcon_dark.svg

jar包+plugin.xml+图标
plugin.xml

  • <depends>依赖于一个或多个其他插件
<!-- url="" specifies the URL of the plugin homepage (displayed in the Welcome Screen and in "Plugins" settings dialog) -->
<idea-plugin url="http://www.jetbrains.com/idea">

  <!-- Plugin name -->
  <name>VssIntegration</name>

  <!-- Unique identifier of the plugin.
       Cannot be changed between the plugin versions.
       If not specified, assumed to be equal to <name>. -->
  <id>VssIntegration</id>

  <!-- Description of the plugin. -->
  <description>Vss integration plugin</description>

  <!-- Description of changes in the latest version of the plugin.
       Displayed in the "Plugins" settings dialog and in the
       plugin repository Web interface. -->
  <change-notes>Initial release of the plugin.</change-notes>

  <!-- Plugin version -->
  <version>1.0</version>

  <!-- The vendor of the plugin.
       The optional "url" attribute specifies the URL of the vendor homepage.
       The optional "email" attribute specifies the e-mail address of the vendor.-->
  <vendor url="http://www.jetbrains.com" email="support@jetbrains.com" />

  <!-- The unique identifiers of the plugins on which this plugin depends. -->
  <depends>MyFirstPlugin</depends>

  <!-- Optional dependency on another plugin.
       If the plugin with the "MySecondPlugin" ID is installed,
       the contents of mysecondplugin.xml (the format of this file
       conforms to the format of plugin.xml) will be loaded. -->
  <depends optional
要在Mac上安装IDEA Code Review Helper插件,您可以按照以下步骤进行操作: 1. 打开IDEA并进入插件市场。 2. 在搜索框中输入"Code Review Helper"并点击搜索按钮。 3. 找到"Code Review Helper"插件并点击安装按钮。 4. 安装完成后,重启IDEA以使插件生效。 这个插件提供了一些常见的组件和功能,例如菜单、工具栏、工具窗口、对话框和其他Swing组件等。它还提供了一些扩展,允许您扩展其他插件IntelliJ平台的功能。您可以通过声明一个或多个扩展来实现这一点。此外,该插件还增加了一个名为"CodeReview"的工具窗口和一个名为"ReviewAction"的动作,您可以通过编辑器右键菜单或快捷键来访问它们。 希望这些信息对您有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [IDEA中——Code Review Helper的安装和使用](https://blog.youkuaiyun.com/qq_25580555/article/details/127102045)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [Intellij IDEA CodeReview插件开发1理论](https://blog.youkuaiyun.com/taobao1014/article/details/84659068)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值