IntelliJ Platform Plugin SDK Help

示例代码

本指南包含了一些和 intellij-sdk-code-samples GitHub 仓库相关的插件示例代码.

阅读 README.md 列出了所有的示例代码并带有简单描述.

Each sample is stored in a dedicated folder and is accompanied by its own README.md. Links to the corresponding tutorial or reference page in this tutorial, as well as a list of relevant show-cased elements are provided.

使用 Gradle

所有示例插件都基于 Gradle, 参考 Building Plugins with Gradle 来开始.

Additionally, the screencast Working with Gradle in IntelliJ IDEA offers a thorough introduction to Gradle functionality inside IntelliJ IDEA.

设置示例代码

确保开发工具安装启用了插件 Git, Gradle, 和 Plugin DevKit.

使用菜单 Git | Clone...克隆 intellij-sdk-code-samples GitHub 仓库. 克隆成功后, IDE会建议打开项目.

Select the code sample(s) to import via the Gradle tool window.

Alternatively, import all code samples available by choosing _gradleCompositeBuild, which links all Gradle projects in a Composite Build.

After successful import, the project appears in the Gradle tool window tree as a new node. Assign a Java 11 SDK in for Gradle JVM. Invoke Reload All Gradle Projects from the Gradle tool window toolbar if necessary.

运行代码示例

Run the plugin by using the Gradle runIde task shown under the corresponding project's Tasks node in the Gradle tool window.

Last modified: 29 九月 2022