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

◇◆丶佛笑我妖孽 提交于 2019-11-30 17:22:30
OpherV

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.

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.

After changing type="JAVA_MODULE" to type="PLUGIN_MODULE" in *.iml file I was getting following error -

Error running 'IdeaPlugin': Wrong SDK type for plugin module

To fix this go to -

  1. Module Settings -> Platform settings -> SDKs.
  2. Click on Add new SDK
  3. Select Intellij Platform plugin SDK
  4. For home directory select your Inetllij installation dir
  5. Select JAVA SDK you want to use with it.

Once this is added got to Module Settings again

  1. Module Settings -> Project settings -> project.
  2. In Project SDK change the JAVA sdk to the SDK we just added in the above steps.
  3. Run/Debug you plugin now.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!