Skip to main content
  • Log in
  • Manage Cookies
EclipseCon - Eclipse Foundation
  • Conference
    • Program Schedule
    • Program List
    • Registration
  • Features
    • Community Day
    • Hacker Day
    • Dinner Meetups
    • OSGi Summit
    • Keynotes
  • Community
    • Code of Conduct
    • Health & Safety at EclipseCon
    • Community Resources
    • 2022 Speakers
    • Information for Speakers
  • Sponsors
    • Be a Sponsor
    • Information for Exhibitors
    • Our Sponsors
    • Sponsor Testimonials
  • Venue
    • Conference Venue
    • Hotels
    • Ludwigsburg
  • About Us
    • EclipseCon 2022
    • Program Committee
    • The Eclipse Foundation
    • Past Conferences
    • Other Events
  1. Home
  2. EclipseCon
  3. EclipseCon 2022
  4. Sessions
  5. Extending Eclipse JDT to Support Java Projects with a Bazel Build

Extending Eclipse JDT to Support Java Projects with a Bazel Build

Session details
Status: 
Accepted
Speaker(s): 
Peter Laird (Salesforce.com, Inc.)
Experience level: 
Intermediate
Tags: 
bazel jdt java plugin
Session Track: 
Web & Desktop Tools & IDEs
Session Type: 
Standard

This session will cover the interesting highlights of the design and implementation of the Bazel Eclipse Feature. Attendees should have some development experience with Java in Eclipse to get the most out of this seession. 

Intro (2 minutes)

Part 1: Bazel basics (5 minutes)

  • What is it and where did it come from
  • What are the main two selling points
  • The heart of Bazel - the dependency graph
  • How are Java projects supported by Bazel
  • Basic example of a Bazel BUILD file with a Java target

Part 2: Extending Eclipse JDT to support Bazel (12 minutes)

This part will be driven by recorded demos of Bazel Eclipse Feature (BEF) to show how major use cases were implemented.

  • Implementing the Import wizard for Bazel
  • Modelling Bazel targets and packages as Eclipse Projects 
  • Mapping of the classpath; Bazel has a lot more flexibility than just main/test, how did we handle this <= this is the most critical part
  • Java editor - quick fly by, all the expected features work without issue
  • Problems View - populated by output from the Bazel build  
  • Implementing Eclipse Launchers for running Bazel built applications and tests (and how nice it is that debug came for free)

Part 3: Interesting Implementation Details (remaining time)

There are a handful of interesting obstacles/solutions in the BEF implementation that I can talk about, as time allows. Such as:

  • Global type search: explain how BEF supports searching all Java types referenced in the Bazel workspace even when the user has imported just a subset of all projects
  • Import optimization: Bazel supports a rich query interface for interogating the project file layout, but is very expensive. Explain some of the solutions for avoiding queries in many cases.
  • The IDE has to model your build: Bazel is very flexible, to the point that some configurations are impossible to model correctly in JDT. Explain a couple of these cases, with the lesson that these corner cases are easy to avoid. Complexity in your build configuration causes pain for your IDE.

 

 

Objective of the presentation: 
First, provide a quick introduction to the Bazel build technology (open sourced by Google a few years ago) - explain the core concepts, and explain some of the benefits. Second, celebrate how adaptable Eclipse and JDT are by showing how they were extended to support Bazel, which is much more flexible than Maven. Third, discuss some interesting details and design tradeoffs of the implementation which Eclipse users may find interesting.
Attendee pre-requisites - If none, enter "N/A": 
Java basics Eclipse JDT basics
Schedule info
Time: 
25 Oct 2022 - 12:30 to 25 Oct 2022 - 13:05
Room: 
Schubartsaal
  • Sign in to post comments.

Elite

  • IBM
  • Huawei

Premium

  • Eurotech
  • Red Hat
  • Yatta Solutions GmbH

Basic

  • Mercedes-Benz Tech Innovation
  • Obeo
  • ARCAD Software
  • TypeFox GmbH
  • SCANOSS
  • Bosch IO GmbH
  • EclipseSource
  • SSI Schaefer IT Solutions GmbH

Media

  • GermanTechJobs

Become a Sponsor

Eclipse Foundation

  • About Us
  • Contact Us
  • Sponsor
  • Members
  • Governance
  • Code of Conduct
  • Logo and Artwork
  • Board of Directors
  • Careers

Legal

  • Privacy Policy
  • Terms of Use
  • Copyright Agent
  • Eclipse Public License
  • Legal Resources

Useful Links

  • Report a Bug
  • Documentation
  • How to Contribute
  • Mailing Lists
  • Forums
  • Marketplace
EclipseCon is brought to you by The Eclipse Foundation with the support of our sponsors.
Powered by Drupal and built on COD.

Copyright © Eclipse Foundation. All Rights Reserved.

Back to the top