palantir / palantir-java-format

A modern, lambda-friendly, 120 character Java formatter.
Apache License 2.0
426 stars 45 forks source link

Fixes the Eclipse Plugin #949

Closed ppkarwasz closed 9 months ago

ppkarwasz commented 10 months ago

This PR fixes the Eclipse Plugin by backporting some code from Google Java Format and solving some configuration problems.

The plugin uses the Eclipse Tycho Maven plugin to build, although it can probably be easily adapted to Gradle.

It was tested on Eclipse 2022-09 under JDK 17. Under JDK 17 the plugin requires additional setup, which is described in README.md.

The plugin requires a JRE 11 to run (same requirement as Eclipse 2020-09 or later).

Before this PR

The Eclipse Plugin didn't even compile.

After this PR

There should a functional Eclipse Plugin.

palantirtech commented 10 months ago

Thanks for your interest in palantir/palantir-java-format, @ppkarwasz! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

ppkarwasz commented 10 months ago

@carterkozak, could you take a look at this?

ppkarwasz commented 10 months ago

Fixes #833

carterkozak commented 10 months ago

I’ll take a closer look when I have a chance, I’d really like to use a gradle plugin to build this plugin so we can publish the compiled jar to maven central in the build process. I’m not sure how feasible that would be, though.

ppkarwasz commented 10 months ago

I’ll take a closer look when I have a chance, I’d really like to use a gradle plugin to build this plugin so we can publish the compiled jar to maven central in the build process. I’m not sure how feasible that would be, though.

The only complex operation in the build is downloading Eclipse artifacts from a P2 repository. I think that diffplug/goomph could help with that, which redirects to the new equodev/equo-ide project.

My Gradle skills are rather limited, but I'll try to come up with something.

In the current state the PR could still be useful, since it allows users to compile the plugin themselves.

ppkarwasz commented 10 months ago

I managed to switch to a Gradle build.

carterkozak commented 10 months ago

I managed to switch to a Gradle build.

Impressive, thanks!

rombert commented 9 months ago

Any plans to see this merged?