如何从intellij社区版repo导入和运行现有插件 [英] How to import and run existing plugins from intellij community edition repo

查看:1023
本文介绍了如何从intellij社区版repo导入和运行现有插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试导入并运行IntelliJ git4idea(Git Integration)插件,以便玩游戏并贡献我自己的一些代码。



我已经从由Dmitry Jemerov在官方Jetbrains插件开发论坛上发布:


最简单的答案这是不要。 IntelliJ IDEA社区
版项目设置为整体开发,并且相应地设置
依赖项。如果你想破解Git
插件,你只需使用提供的运行配置运行IDEA,它就会在启用所有插件的情况下运行
,你只需进行所需的任何更改
并测试它们使用主运行配置。



如果你真的想要,你可以设置一个新的插件模块,并将其指向
里面的git4idea插件的源代码IntelliJ IDEA
社区版Git结账。这不是太难,但是你需要从头开始做
,你不能使用
现有的.iml文件。


在任何情况下,我都可以通过手动重新排序文件目录,整理依赖项和编辑.iml文件来解决这个问题。插件的类型是通过将 type =JAVA_MODULE更改为 type =PLUGIN_MODULE来定义的。


I'm trying to import and run the IntelliJ git4idea (Git Integration) plugin in order to play around and contribute some of my own code.

I've pulled the Intellij community edition from the github repo, and imported the git4idea plugin as a project. I'm running the Intellij community edition

My main issue is this:

After importing all the modules, the git4idea module comes up as a general module type, and not a plugin module type.

This means that when trying to create a new run\debug configuration, I get [none] under "Use classpath of module", instead of of the ability to select the git4idea plugin. This obviously results in a "Run configuration error: no plugin module specified for configuration".

So the question is - How can I change the general type of imported "git4idea" to plugin type?

Or better yet, what are the steps required in order to import and build/debug/run a plugin from the Intellij community edition repo?

解决方案

This is the answer given by Dmitry Jemerov on the official Jetbrains plugin development forum:

The easiest answer to this is "don't". The IntelliJ IDEA Community Edition project is set up to be developed as a whole, and the dependencies are set up accordingly. If you want to hack on the Git plugin, you simply run IDEA using the provided run configuration, it runs with all plugins enabled, and you simply make whatever changes you need and test them using the main run configuration.

If you really want, you can set up a new plugin module and point it to the source code of the git4idea plugin inside the IntelliJ IDEA Community Edition Git checkout. This is not too hard, but it's something you'll need to do from scratch, and you can't use the existing .iml file.

In any case I was able to solve this by manually reordering file directories, sorting out dependencies and editing the .iml file. The type of plugin is defined by changing type="JAVA_MODULE" to type="PLUGIN_MODULE".

这篇关于如何从intellij社区版repo导入和运行现有插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆