goomph icon indicating copy to clipboard operation
goomph copied to clipboard

'equinoxLaunch' for vanilla RCP apps

Open restlessronin opened this issue 2 years ago • 2 comments

For background, I am trying to run an RCP app, not the full Eclipse IDE. As such, I am hoping to reverse-engineer the specific "Eclipse Application" launch configuration command line that is used to launch the RCP app.

With this in mind, there are some issues that I am aware of

  1. The plugin uses 'EclipseStarter' to run the app. The target command line uses the 'org.eclipse.equinox.launcher' jar (part of the platform maven repo). There's a possible version incompatibility here since presumably the 'EclipseStarter' command is the one baked into the plugin classpath, rather than the one in the target platform. Since the equinox launcher doesn't change that much, it may not be an issue, but I'd prefer the former approach for idempotency across run environments. QUESTION. Is there already some way to accomplish this? I see an EclipseIniLauncher that looks like it may do something similar, but is only used internally.

  2. The plugin require some bundles that are not in my 'config.ini' file. Specifically, it needs org.eclipse.platform:org.eclipse.update.configurator (part of the platform repo) and org.eclipse.platform:org.eclipse.equinox.ds (not part of the platform repo). I'm forced to add implementation dependencies to both, even though my app has never needed either. Not adding them triggers some Precondition exceptions. This seems unnecessary. The problematic code is here https://github.com/diffplug/goomph/blob/26ea4e37e38bf77711f67471d8ee9aabf1c0a65b/src/main/java/com/diffplug/gradle/eclipserunner/EquinoxLauncher.java#L105 I'm guessing that many RCP apps may not need these bundles, perhaps they could be commented out, or log a warning instead of throwing?

restlessronin avatar Jun 26 '22 04:06 restlessronin

QUESTION. Is there already some way to accomplish this?

I honestly don't remember. I don't think so, but happy to take a PR that does whatever you want.

I'm guessing that many RCP apps may not need these bundles,

Feel free to remove those lines if you would like.

My only hard requirement is that you figure out how to test your PR's locally. You got one freebie PR merge, but from here on I need you to have a working dev environment. If something fixes a problem that you have, I'm happy to merge and release it. But I don't want to personally be inside your build-test-debug loop.

nedtwigg avatar Jun 26 '22 15:06 nedtwigg

My only hard requirement is that you figure out how to test your PR's locally. You got one freebie PR merge, but from here on I need you to have a working dev environment. If something fixes a problem that you have, I'm happy to merge and release it. But I don't want to personally be inside your build-test-debug loop.

Fair enough. I did install SDKMAN, hoping to install a < 16 but > 11 JRE to try to fix the javadoc issue, but it turns out there aren't any for the M1.

At the moment, I'm trying to investigate a vanilla gradle solution to my specific project. If that doesn't pan out, I'll get back to work on this.

restlessronin avatar Jun 26 '22 16:06 restlessronin

For issues like this I would recommend Solstice https://github.com/equodev/equo-ide/tree/main/solstice

nedtwigg avatar Mar 01 '23 20:03 nedtwigg