Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to import and run existing plugins from intellij community edition repo

Tags:

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.

enter image description here

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".

enter image description here

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?

like image 747
OpherV Avatar asked Aug 16 '13 16:08

OpherV


People also ask

How do I add plugins to IntelliJ Community Edition?

Press Ctrl+Alt+S to open the IDE settings and select Plugins. Find the plugin in the Marketplace and click Install.

How do I import settings from IntelliJ community to ultimate?

Call File | Manage IDE Settings | Import Settings from the main menu. Select the ZIP archive that contains your settings in the dialog that opens. Select the settings you want to apply in the Select Components to Import dialog that opens and click OK.

How do I import an existing project into IntelliJ?

Launch IntelliJ IDEA. If the Welcome screen opens, press Ctrl+Shift+A , type project from existing sources , and click the Import project from existing sources action in the popup. Otherwise, from the main menu, select File | New | Project from Existing Sources.


2 Answers

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".

...

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.

like image 160
OpherV Avatar answered Oct 31 '22 23:10

OpherV


I had the same no plugin module specified for configuration issue. To work around it, instead of importing, I created a new plugin project and used the existing code directory.

like image 43
Brian Bowman Avatar answered Oct 31 '22 23:10

Brian Bowman