Let’s “just” leverage Javac in JDT! - OCX 2024
JDT-LS and vscode-java users, and the Java ecosystem in general have put more and more pressure on being capable to try new Java language features very early, as it is offered by the main competing Java development tools. After evaluating various possibilities to offer that in JDT-LS (and underlying JDT), our team has concluded that the most promising approach would be to allow JDT to leverage Javac as an alternative addition to the Eclipse Compiler for Java (ECJ). This means that Javac would provide the lower-level parsing, resolution and code-generation operations in JDT. And then, we made it happen. In this presentation, we’ll go through our preliminary evaluation and arguments that made us follow the direction of JDT running on Javac; we’ll then present how things work and what (relatively small) changes are necessary in JDT to allow hooking other compiler backends and we’ll demo the current state of the project and how it serves its purpose.