Intellij IDEA插件开发入门
现今的IDE尽管有如“洪水猛兽”般强大,但要知道再强大的IDE也没法提供给使用者想要的一切功能,
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
package com.cdai.plugin.rapidg;
import com.intellij.openapi.components.ApplicationComponent;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;
/**
* My Component
* User: cdai
* Date: 13-11-4
* Time: 上午10:08
*/
public class MyComponent implements ApplicationComponent {
public MyComponent() {
}
public void initComponent() {
// TODO: insert component initialization logic here
}
public void disposeComponent() {
// TODO: insert component disposal logic here
}
@NotNull
public String getComponentName() {
return "MyComponent" ;
}
public void sayHello() {
// Show dialog with message
Messages.showMessageDialog(
"Hello World!" ,
"Sample" ,
Messages.getInformationIcon()
);
}
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package com.cdai.plugin.rapidg;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.application.Application;
import com.intellij.openapi.application.ApplicationManager;
/**
* Say Hello Action
* User: cdai
* Date: 13-11-4
* Time: 上午10:16
*/
public class SayHelloAction extends AnAction {
@Override
public void actionPerformed(AnActionEvent e) {
Application application = ApplicationManager.getApplication();
MyComponent myComponent = application.getComponent(MyComponent. class );
myComponent.sayHello();
}
}
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
< idea-plugin version = "2" >
< id >com.cdai.plugin.rapidg</ id >
< name >CDai's Rapid Generator Plugin</ name >
< version >1.0</ version >
< vendor email = "dc_726@163.com" url = "http://www.yourcompany.com" >CDai</ vendor >
< description > <![CDATA[
Enter short description for your plugin here.<br>
<small>most HTML tags may be used</small>
]]> </ description >
< change-notes > <![CDATA[
Add change notes here.<br>
<small>most HTML tags may be used</small>
]]>
</ change-notes >
<!-- please see http://confluence.jetbrains.net/display/IDEADEV/Build+Number+Ranges for description -->
< idea-version since-build = "107.105" />
<!-- please see http://confluence.jetbrains.net/display/IDEADEV/Plugin+Compatibility+with+IntelliJ+Platform+Products
on how to target different products -->
<!-- uncomment to enable plugin in all products
<depends>com.intellij.modules.lang</depends>
-->
< application-components >
<!-- Add your application components here -->
< component >
< implementation-class >com.cdai.plugin.rapidg.MyComponent</ implementation-class >
</ component >
</ application-components >
< project-components >
<!-- Add your project components here -->
</ project-components >
< actions >
<!-- Add your actions here -->
< action id = "SayHello" class = "com.cdai.plugin.rapidg.SayHelloAction" text = "Say Hello!" >
< add-to-group group-id = "WindowMenu" anchor = "first" />
</ action >
</ actions >
< extensions defaultExtensionNs = "com.intellij" >
<!-- Add your extensions here -->
</ extensions >
</ idea-plugin >
|
More experienced plugin developers can find answers in these two articles:
1. The Basics of Plugin Development for IntelliJ IDEA by Alexey Efimov (for beginners)
2. Developing Custom Language Plugins for IntelliJ IDEA 5.0 by Dmitry Jemerov (for more advanced developers)
Also IntelliJ IDEA tries to ease the plugin development by providing specific code generation, completion, etc. Just look what was done for 5.0 and 5.1 releases for Open API & Plugins .
Intellij IDEA插件开发入门相关推荐
- IntelliJ IDEA插件开发入门教程(一)
插件开发环境配置 IDEA分为社区版(Community Edition)和旗舰版(Ultimate Edition) 社区版:完全免费,代码开源,但是缺少一些旗舰版中的高级特性. 旗舰版:30天免费 ...
- 【直播回顾】蚂蚁金服高级开发工程师萧恺:IDEA 插件开发入门教程
主讲人:萧恺(蚂蚁金服-支付宝事业群-高级开发工程师) 本名:肖汉松 讲师介绍: 热爱阅读,喜欢挑战,热衷尝试新的技术,关注技术背后的原理. 关注领域:Java 服务端开发,分布式系统 关注语言:Ja ...
- IntelliJ IDEA开发入门教程
IntelliJ IDEA开发入门教程 本系列教程从 IntelliJ IDEA 的安装.卸载.软件设置.项目配置等各个方面进行讲解.通过本系列教程的学习,也希望你能爱上 IntelliJ IDEA, ...
- xposed模块编写教程_Xposed插件开发入门详解,
Xposed插件开发入门详解, 前言 Xposed的用处不必言说,能hook任意java写的代码,修改替换apk内部的资源文件. 至于如何开发一个XPosed的插件,官方给出的答案如下: https: ...
- 视频教程-FastAdmin插件开发入门-PHP
FastAdmin插件开发入门 2009年4月创办 淄博日诺网络科技有限公司 法人总经理 2016年负责 中国传媒大学凤凰学院 网站开发 项目负责人 2017年 参与负责 用友软件理财项目开发 郭孟涛 ...
- Maya插件开发入门
Maya插件开发入门 这里笔者给出一个创建简单的MAYA C++插件的流程. 笔者给出MEL和C++插件两个版本,实现了同样的功能. 这个插件的背景是这样的,大多人听说MAYA8. ...
- 基于jquery插件开发入门教程
鉴于最近要使用大量的jquery,所以总有一种捣鼓文字来抒发一下情绪的冲动.思前想后就来篇jquery插件开发入门教程吧,毕竟如果不想开发插件,那自己无论用别人的插件多牛逼,最多只是js的使用者,作为 ...
- carbide.c++ 插件开发入门(转)
carbide.c++ 插件开发入门(仅仅入门) 热10已有 229 次阅读 2010-07-25 20:39 标签: carbide 入门 插件 开发 symbian开发,最不爽的就是 ...
- QT浏览器插件开发入门
QT浏览器插件开发入门_百度文库 http://wenku.baidu.com/view/427755d13186bceb19e8bbbf.html
最新文章
- 工作组环境下WPAD部署的另类解决--WINS解析
- 2012年4月当选微软MVP的CSDN会员名单揭晓!
- VC中的TRACE宏:
- J-link v8固件修复
- java excel添加公式_JAVA实现EXCEL公式专题(四)——字符串函数
- linux 查看强制位,linux强制位与冒险位
- 解决手机死机之锦囊妙计
- 博客园的博客终于开通了
- 通过豆瓣Api,输入ISBN获取图书信息
- asp.net身份认证
- c语言万年历自动翻页,C语言实现万年历效果
- 私藏的18个黑科技网站,想找什么软件就找什么软件!!!
- 如何用 NAS 搭建属于自己的云端书库 | 极客分享第 32 期
- OneNote打开其他账号的笔记共享
- An工具介绍之形状工具及渐变变形工具
- 团队管理的一些基本要点
- 程序员也需要掌握的常用Linux网络命令汇总
- 2021年中国人机界面软件市场趋势报告、技术动态创新及2027年市场预测
- Bootstrap3源码分析
- MYSQL建表时PK,NN,UQ,BIN,UN,ZF,AI字段标识的意义
热门文章
- Ubuntu:apt 配置阿里源
- 写一个程序判断一个数是否为素数(质数)
- 教务系统和服务器,教务系统服务器地址
- 惠普服务器-ILO使用
- 合并两个有序链表(java算法)
- 无中继的DHCP配置-ZTE中兴路由器
- 毕业设计-基于微信小程序的答题系统
- StackExchange.Redis官方文档(一)【基本用法】
- DevExpress WinForm嵌入子图、允许数据换行显示
- android 按钮修改边框颜色代码,Android CheckBox修改大小、边框颜色,以及自定义CheckBox;...