I have to develop a plugin for Eclipse but I prefer IntelliJ IDEA as IDE. Is it possible to configure IDEA for Eclipse plugin development?
-
19Why the downvote? It is a perfectly valid question. – maba Oct 01 '14 at 17:13
-
2@maba Some people just want to watch the world burn – sMaN Feb 23 '16 at 04:42
-
1https://sites.google.com/site/javafornewbie/frameworks-tools/eclipse/eclipse-rcp-application-development-with-idea#TOC-Configure-the-IDEA-Project-Structure – Justin May 27 '16 at 00:01
-
There is an issue you should vote for: https://youtrack.jetbrains.com/issue/IDEA-124520 – Michel Jung May 03 '17 at 14:14
2 Answers
It should be possible by using Eclipse Tycho.
You'll be using maven and that works perfectly with IntellIj.
Tycho is focused on a Maven-centric, manifest-first approach to building Eclipse plug-ins, features, update sites, RCP applications and OSGi bundles. Tycho is a set of Maven plugins and extensions for building Eclipse plugins and OSGi bundles with Maven.

- 47,113
- 10
- 108
- 118
-
Tycho still doesn’t have an 1.0 release. I'm not sure if I can use it in production. – Taras Hupalo Oct 01 '14 at 17:29
-
I don't see why that would be a problem. If it works for you and the plugin you develop can be used then just use it. – maba Oct 01 '14 at 18:09
-
@TarasHupalo If you find the answer helpful you can mark it as accepted. Or give it an upvote. That is how this site works. – maba Oct 02 '14 at 08:08
-
-
Looks like a build tool. Support within the Eclipse IDE for Eclipse plug-ins also includes debugging, generated plug-in templates, customized editors, easy identification of a target platform ... – Andy Thomas Oct 05 '14 at 17:38
-
Tycho is build tool but what if you wants to run the project in eclipse – Ashish Jul 10 '18 at 15:36
-
It might be possible using Osmorc, but I haven't tried that. However, I have a method that works (using IntelliJ 2017.1, but it should be similar for other versions). It does not require Eclipse Tycho, which I couldn't use because my plugin used XCore which doesn't seem compatible with Tycho.
- Create the projects in Eclipse.
- Create your IntelliJ project.
Inside IntelliJ
Open up the Project Structure (Ctrl + Alt + Shift + S)
- In "Global Libraries" (or even just Libraries), add a new Java library.
- Select the
/opt/eclipse/plugins
directory (or wherever eclipse was installed) - Ensure each module has this
ECLIPSE
library as the last dependency.
At this point, you should be able to code and run tests in IntelliJ, but to actually run the plugin, you have to use Eclipse. That's a bit messy, though.
My solution was to run the same command that Eclipse does when you run your plugin:
- Get the BashSupport IntelliJ plugin (may have to be something else on Windows; maybe you can run a batch file)
- In Eclipse, run your plugin (Run Eclipse Application).
Open up the Debug perspective. You should see something like this:
Right click > properties on the
/usr/lib/jvm/...
(may be different Java JVM)Copy the Command Line:
Elsewhere, in your favorite editor, make a new bash file (I put this file in my IntelliJ project folder), and paste this command in there.
Note that when Eclipse runs the command, it runs from a working directory of
/opt/eclipse/
(or wherever eclipse is installed), so we need to add acd /opt/eclipse/
beforehand. Let's do it in a new shell as well:(cd /opt/eclipse && /usr/lib/jvm/java-8-oracle/bin/java ...)
If this bash script is run, it should be the same as if we ran from Eclipse.
In IntelliJ, create a new Bash run configuration (Alt + Shift + F10 > Edit Run Configurations). Make the "Script:" field contain the path to the bash file we just created.
Also, add "Build Project" to the "Before launch" options.
Additionally, tick the "Single instance only" box.
If we now run that configuration, it should work. However, we still cannot debug from within IntelliJ. This fixes that:
- Create a new IntelliJ run configuration of type "Remote", marking it as "Single instance only"
Copy the "Command line arguments for running remote JVM". For me that is
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
I liked the workflow for
suspend=y
better; basically it means that the eclipse application won't start up until we attach the debugger.Copy your bash file and add these arguments:
(cd /opt/eclipse && /usr/lib/jvm/java-8-oracle/bin/java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 ...)
Add another Bash run configuration for IntelliJ that runs this new script (and also runs "Build Project" beforehand, and is "Single instance only").
Now, to debug your Eclipse plugin, run the Debug Bash Configuration, then run your Remote Configuration.
At the end, this is what my run configurations look like:
At this point, the only thing Eclipse is needed for is editing my .xcore
files since Eclipse generates Java code from that, and XCore doesn't have a way to be run from the terminal.

- 24,288
- 12
- 92
- 142
-
There is an issue you should vote for: https://youtrack.jetbrains.com/issue/IDEA-124520 – Michel Jung May 03 '17 at 14:15