Are you using Bazel as a build system and doing Java development? Do you want to give the Eclipse plug-in for Bazel a try?
I’ve spend the last couple weeks reworking most of the plug-in to better support Bazel development. It’s approach isn’t very different from the IntelliJ plug-in, i.e. it runs Bazel query and performs Bazel builds with aspects to obtain project and classpath information from Bazel. With that information it creates projects in Eclipse. It also uses project views (
.bazelproject) to configure what’s visible in Eclipse.
However, there are a few differences compared to the Bazel IntelliJ plug-in, which I’d like to highlight.
- It uses Eclipse projects to map targets so the classpath is really scoped to the classpath of the targets.
- It allows for some flexibility how targets are mapped to projects – you can have one project per target or one project per package.
- Because of Eclipse auto-build feature of individual Java source files HotSwap just works and is fast.
Documentation is here. The update site is https://opensource.salesforce.com/bazel-eclipse/latest/.
Oh and there is a preview release of a VS Code extension using the same feature to setup the Java Language Server in VS Code.