...
- Write a new library/compiler. Not quite realistic.
- Use some other than javac (like from Eclipse). Not sure what would be the differentiator between Eclipse and NetBeans? Would result in incompatible changes and probably almost a complete re-write of the existing Java support in NetBeans (unless the Java support itself would be taken from Eclipse as well, which aside from everything else would be a lot of rework too).
- Use a vanilla (unpatched) javac from the current runtime JDK. Besides other complexities, one would need to run on JDK 9 to get the possibility of JDK 9 support (and on, e.g., Valhalla to get the possibility of having Valhalla support), which might possibly lead to workarounds for differences/bugs between JDK versions. Plus, we might run into trouble with strong encapsulation.
- Use a vanilla (unpatched) javac corresponding to a particular revision from the OpenJDK, but let NetBeans have a firm (binary) copy against which it would run, regardless of which runtime JDK would be used. Still a significant endeavour.
- Keep nb-javac as it is now. Certainly the least amount of work and complexity.
Show me the patch!
hg clone http://hg.netbeans.org/main/nb-javac/ cd nb-javac hg diff -r 8e9e1a2373a4 -r 061355d195b
Note: It is huge (this full patch has more that 35000 lines, though that includes additional tests, additional project metadata, etc). The wiki page above gives a better overview of what the patch does.
There are about 10k LLOC with additional tests and about 10k LLOC of modifications with the main purpose of exposing more internals and better error recovery.