idea plugin 插件开发

1.需要安装gradle

参考:Gradle的安装与配置_wenchang-的博客-CSDN博客_gradle安装

2.插件开发

idea plugin 插件开发_第1张图片

 3.项目目录

idea plugin 插件开发_第2张图片

 4.plugin.xml


    
    com.xiaokai.test.demo
    
    Demo
    
    


    
    

    
    
        
    

    
    

        
            
        

        
            
        

    

idea plugin 插件开发_第3张图片

 5.代码

package com.vince.test;

import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.ui.Messages;

public class HelloWorldAction extends AnAction {

    @Override
    public void actionPerformed(AnActionEvent e) {
        Messages.showInfoMessage("Hello World!", "First Plugin");
    }
}

6.运行结果

idea plugin 插件开发_第4张图片

idea plugin 插件开发_第5张图片

 

 代码地址:

zhugezifang/idea-test-plugin: idea plugin hello world (github.com)

参考:

IntelliJ-IDEA-Tutorial/plugins-develop.md at master · judasn/IntelliJ-IDEA-Tutorial (github.com)

IDEA 插件开发入门教程 - Sharehub (xiaohansong.com)

你可能感兴趣的:(java,intellij-idea,gradle,android)