Running Eclipse RCP applications in IntelliJ 2021
I have an existing Eclipse RCP app that I would like to run in IDEA. I have managed to import the Eclipse Workspace into the equivalent IDEA project. (I think) I have managed to setup all the dependencies within the project as well as on the target platform. I am finally at the point where I should be able to run the application.
Here I am running into difficulty in setting up a run configuration which will generate the command line for the RCP application. Using the "Application" run configuration is almost working. I can provide VM arguments and program arguments, but I am unable to provide the correct "Main" entry point (for the equinox launcher).
The only options for the "-cp" parameter are the modules in my project, whereas i need to provide the jar file for the equinox launcher (based on the command line from the equivalent eclipse run configuration).
Can someone tell me what I should do? I'm a relative newbie to IDEA so I may be missing something obvious.
In 2021, the tooling, both on the Eclipse side (in terms of target / product definitions, target platform tooling, etc) and the IDEA side is finally at the point where debugging Eclipse RCP apps in IDEA no longer seems to be a time consuming and frustrating affair. It would be great if the final few issues were ironed out.
Please sign in to leave a comment.
For the time being, Eclipse RCP development support is not on our current roadmap.
Everyone interested in this feature, please vote and follow https://youtrack.jetbrains.com/issue/IDEA-124520
So why not share also the previous steps in detail? I'm basically in the same situation but have very little Eclipse know how, so things like target platform, equinox are greek to me. I have a Eclipse RPC project imported from Maven (as within Eclipse) into IDEA. It builds, but now I also don't know really how to proceed. I thin I have to care about launch configs now.
In Eclipse there's also a local p2 update site which must be running in order that Eclipse (and also Maven) can build. I also don't know how that will map to IDEA.
You can use JAR Application run configuration type if you need to run a jar file instead of just a main class from your project.
That worked! The app is running now, I will update the thread with any new discoveries.
Thank you so much.
I wasn't sure if anyone else had any interest (you're the first person to have commented, 3 months after the post).
I mostly followed the outdated tutorials that are reachable by google search. Even the oldest ones have more or less the correct methodology. The details have changed over time (the tooling has gotten better).
It's been a while and I didn't take detailed notes at the time I did the conversion. If I get a few hours, I'll try to recreate and document what I did, but chances are you'll have to do some experimentation anyhow if your project setup is different from mine.
It could be funny for you, but I will be the second person who is VERY interested to run(and debug) the RCP application form the IDEA.
I'll apreciate if you will have some time to share your steps. Because I'm trying to setup it on the project that I just came to.
Thank you in advance.
Thanks for the feedback. When I get a moment, I'll document what I did.
I'm thinking at the moment that the right direction to go is to move everything to a gradle build. What do y'all think?
Thank you!
Regarding the gradle - sorry, can't say anithing. I didn't use that(
Not for me - my project in question is definitely bound to Maven. And Gradle would even be more greek to me.
Well, then I am already the third person who is VERY interested in launching (and debugging) an RCP application for IDEA.
restlessronin Hey, I also have a project ( or a set of projects to be correct) that I would love to run in IntelliJ. Can you please at least show us some good resources to reference and try to get the things up and running? That should take less than some hours :)
Thank you!
BTW I am the fourth person who is VERY interested in launching (and debugging) an RCP application for IDEA.
I am also very interested debugging eclipse RCP projects in Intellij. Steps to anyone's success would be greatly apricated!
It's good to know that I'm not alone in this journey :-)
Sorry I haven't had a chance to respond earlier. Other projects have been engaging my attention. Another reason for the delay is that my original conversion to IDEA turned out to be quite brittle. Small changes would cause the project to stop working on one side or the other (Eclipse or Idea), and I wound up spending hours debugging and tracking down the cause of the broken build.
I'd like to get to a more deterministic (less flaky) conversion which will let me work on the project in Eclipse, IDEA, or even VS Code (which I've been using a lot lately for non-Java projects). Right now, it seems like Gradle is the one build tool that is supported by all IDE's (and that in turn has support for many IDEs).
So I'm trying to convert my Eclipse PDE-Built project to an equivalent Gradle (Vanilla CL Gradle, not Buildship) project. I am hoping that once this is complete, the gradle files will become the single source of truth that can be imported by any IDE. In particular, I believe IDEA already accepts this as a standard use-case.
This isn't complete as of yet, but I wanted to let y'all know that I _am_ still working on the problem. I have managed to compile and build all the individual components. What is left is to bundle them together and create a launcher.
The steps are similar to the steps that were needed for the conversion to IDEA, but they now are automated, rather than requiring GUI tools that have to be run manually. Hopefully I'll be able to get it completely working relatively soon. And since this is a code solution, it will be easier to write up.
I know it's not exactly what y'all are looking for, but having spent far more time on debugging build problems than I ever wanted to, I think it's the best shot at a no-fuss portable RCP project.
Renisfejzo, basically the problem boils down to dependency resolution, and creating a launch command.
You have to figure out the correct set of libraries to compile against, and then again the correct set of libraries to bundle together at runtime. Eclipse has GUI tools to create target platforms. The target platform is then used by PDE for compilation as well as at runtime.
This has to be recreated in IDEA which doesn't have exactly equivalent tooling and concepts, so you have to experiment to figure out how to overcome the impedance mismatch. To make things more complicated, Eclipse squirrels away important properties and files in the invisible .metadata directory hierarchy. Unless you already know your way around Eclipse internals, figuring out exactly what's happening is time consuming. Most of the how-to articles and other information that is easily found through search is outdated.
Not sure if that's helpful, but without getting into details, that's the best I can do.
restlessronin Thank you for your reply.
I kind of imagined that it would be that way, that is why I am using IntelliJ as a simple code editor at the moment and the whole building/running parts are delegated to eclipse. It's not that convenient working with two IDEs, but I have been able to work at least.
I also found a plugin that looks promising, but since I do not have experience with PDE yet, I haven't spent much time with it.