.
| # 构建脚本
├─ build.gradle.kts
|
| # 这个文件包含了插件信息,版本,编译版本范围
| # 会被build.gradle.kts访问并填入适当位置
├─ gradle.properties
|
| # 设置文件,不过这里边好像只有一个工程名
├─ settings.gradle.kts
|
| # 其余未列出的文件无需特别关注
|
└─src
└─main
├─java #这里包含了所有Java源文件
│ └─com.template.clionplugin #包名
│ └─java程序文件
├─kotlin #这里包含了所有Kotlin源文件
│ └─com.template.clionplugin #包名
│ └─ kotlin程序文件
└─resources #资源文件
├─messages
│ └─ MyBundle.properties
└─META-INF
├─plugin.xml #插件清单
└─pluginIcon.svg #默认插件图标
模板中还自带了几个小功能,分别为
功能 | 现有的功能 | 对应源文件 | 位置 |
---|---|---|---|
工程管理器监听器 | 监听“打开工程”这一事件,当打开工程的时候,获取或创建工程服务 | MyProjectManagerListener.kt | src/main/kotlin/包名/listeners/ |
应用服务 | IDE被启动时,输出一句“applicationService ” |
MyApplicationService.kt | src/main/kotlin/包名/services/ |
工程服务 | 该服务被启动时(由上述的监听器启动),输出一句“Project service: +工程名” |
MyProjectService.kt | src/main/kotlin/包名/services/ |
已将平台改为 CLion
修改了 gradle.properties
platformType = CL #将平台改为CLion('CL'对应CLion)
platformVersion = 2021.2.2
朴实无华的的分割线
以下为
github
工程模板原内容
- Create a new IntelliJ Platform Plugin Template project.
- Get familiar with the template documentation.
- Verify the pluginGroup, plugin ID and sources package.
- Review the Legal Agreements.
- Publish a plugin manually for the first time.
- Set the Plugin ID in the above README badges.
- Set the Deployment Token.
- Click the Watch button on the top of the IntelliJ Platform Plugin Template to be notified about releases containing new features and fixes.
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
This specific section is a source for the plugin.xml file which will be extracted by the Gradle during the build process.
To keep everything working, do not remove <!-- ... -->
sections.
-
Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "ClionPlugin" > Install Plugin
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
Plugin based on the IntelliJ Platform Plugin Template.