These are best-effort community-contributed tips, and are not guaranteed to work with any particular Eclipse setup.
Use a recent Eclipse version that includes Buildship for Gradle integration. Currently we recommend Eclipse Oxygen. Start Eclipse with a fresh workspace in a separate directory from your checkout.
Before setting up Eclipse integration, verify that you can successfully build from the commandline by building a sample package:
./gradlew :beam-examples-java:build
If you receive any errors, first verify your environment setup:
Eclipse will scan the project tree and import each as a separate Package.
Verify that your workspace is correctly configured by invoking ‘beam-runners-direct-java:build’ from the “Gradle Tasks” pane. The build should succeed with no errors.
After your Eclipse workspace is properly setup, you will have a “Gradle Tasks” window with a set of operations. If you don't see the pane, open it from “Window” > “Show View” > Other.. > “Gradle” > “Gradle Tasks”.
From the “Gradle Tasks” window, you can build any task registered with Gradle. For example, if you are working on Kinesis IO, select ‘beam-sdks-java-io-kinesis:build’.
Eclipse supports checkstyle within the IDE using the Checkstyle plugin.
sdks/java/build-tools/src/main/resources/beam/checkstyle.xml
Eclipse supports code styles within the IDE. Use one or both of the following to ensure your code style matches the project's checkstyle enforcement.
beam-codestyle.xml
sdks/java/build-tools/src/main/resources/beam/beam-codestyle.xml