From 446a8e33e00cb9effe1d1e181cac192a70648412 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 7 Jul 2013 06:33:18 +0200 Subject: FINALLY! Found the cause of a really weird eclipse bug, where _ANY_ mention of com.sun.tools.javac.tree.TreeMaker, anywhere in a source file, would disable pretty much every intelligent part of what makes the 'I' in IDE in eclipse: No auto-complete, no 'go to declaration', etcetera, but only since Eclipse Juno (not fixed in Kepler either). It's the presence of src/stubs/com/sun/tools/javac/util/Context.java. I've moved Context to a special stubs directory that's only used for javac (so that we still get the benefit of getting some warnings and such when making command line builds), and removed the @Override annotations for where the stubbing is relevant (for methods that exist in javac7 but not in javac6 on interfaces we create implementations of). Furthermore, I did some extremely tricky work in making our version actuall compatible with the exact class signatures of both javac6- and javac7+'s versions; generation of synthetic methods for reified type parameters was causing havoc. A big stack of 'here be voodoo' comments unfortunately added to explain it all; necessary evil. --- .../com/sun/tools/javac/util/Context.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/javac-only-stubs/com/sun/tools/javac/util/Context.java (limited to 'src/javac-only-stubs/com/sun/tools') diff --git a/src/javac-only-stubs/com/sun/tools/javac/util/Context.java b/src/javac-only-stubs/com/sun/tools/javac/util/Context.java new file mode 100644 index 00000000..06b8ff4d --- /dev/null +++ b/src/javac-only-stubs/com/sun/tools/javac/util/Context.java @@ -0,0 +1,31 @@ +/* + * These are stub versions of various bits of javac-internal API (for various different versions of javac). Lombok is compiled against these. + */ +package com.sun.tools.javac.util; + +public class Context { + public static class Key { + } + + public interface Factory { + T make(Context c); + T make(); + } + + public void put(Key key, Factory fac) { + } + + public void put(Key key, T data) { + } + + public void put(Class clazz, T data) { + } + + public T get(Key key) { + return null; + } + + public T get(Class clazz) { + return null; + } +} -- cgit