Skip to content

improve #1555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 21, 2022
Merged

improve #1555

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions docs/idea-tutorial/idea-tips/idea-plug-in-development-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public class HelloAction extends AnAction {

## 04 验收成果

点击 `Gradle -> runIde` 就会启动一个默认了这个插件的 IDEA。然后,你可以在这个 IDEA 上实际使用这个插件了。
点击 `Gradle -> Tasks -> intellij -> runIde` 就会启动一个默认了这个插件的 IDEA。然后,你可以在这个 IDEA 上实际使用这个插件了。

![点击 runIde 就会启动一个默认了这个插件的 IDEA](https://guide-blog-images.oss-cn-shenzhen.aliyuncs.com/2020-11/image-20201118075912490.png)

Expand Down Expand Up @@ -197,7 +197,27 @@ public class HelloAction extends AnAction {

![](https://guide-blog-images.oss-cn-shenzhen.aliyuncs.com/2020-11/image-20201118075803163.png)

## 06 深入学习
## 06 打包分发

插件写好之后,如果我们想把插件分享给小伙伴使用的话要怎么做呢。

### 首先,我们要打包插件

执行 Gradle -> Tasks -> intellij -> buildPlugin

执行完成后,项目中会生成一个 build 文件夹,点击进入后找到 distributions 文件夹,里面会出现一个 .zip 结尾的压缩包,里面打包了插件所需要的依赖、配置文件等。

### 其次,分发插件

打开 IDEA,在 Settings -> Plugins -> 点击小齿轮后选择 Install Plugin From Disk
![](./pictures/install-plugin-from-disk.png)

### 最后,提交至官网

这步并不是必须的,如果你想把你的插件发布到官网上,别人直接可以在 [应用市场](https://plugins.jetbrains.com/) 中搜到你的插件的话可以做这步。


## 07 深入学习

如果你想要深入学习的 IDEA 插件的话,可以看一下官网文档:[https://jetbrains.org/intellij/sdk/docs/basics/basics.html ](https://jetbrains.org/intellij/sdk/docs/basics/basics.html "https://jetbrains.org/intellij/sdk/docs/basics/basics.html ") 。

Expand All @@ -206,7 +226,7 @@ public class HelloAction extends AnAction {
- [8 条经验轻松上手 IDEA 插件开发](https://developer.aliyun.com/article/777850?spm=a2c6h.12873581.0.dArticle777850.118d6446r096V4&groupCode=alitech "8 条经验轻松上手 IDEA 插件开发")
- [IDEA 插件开发入门教程](https://blog.xiaohansong.com/idea-plugin-development.html "IDEA 插件开发入门教程")

## 07 后记
## 08 后记

我们开发 IDEA 插件主要是为了让 IDEA 更加好用,比如有些框架使用之后可以减少重复代码的编写、有些主题类型的插件可以让你的 IDEA 更好看。

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.