From 29c2ba1bbba7393423463b6c92da2068b6fea7bb Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 29 Nov 2009 20:53:54 +0100 Subject: work in progress --- src/netbeansAgent/lombok/netbeans/agent/PatchFixes.java | 6 ++++-- src/netbeansAgent/lombok/netbeans/agent/TaskListenerProvider.java | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/netbeansAgent/lombok/netbeans/agent/PatchFixes.java b/src/netbeansAgent/lombok/netbeans/agent/PatchFixes.java index 26ddd1e4..c12e6dad 100644 --- a/src/netbeansAgent/lombok/netbeans/agent/PatchFixes.java +++ b/src/netbeansAgent/lombok/netbeans/agent/PatchFixes.java @@ -5,6 +5,8 @@ import java.lang.reflect.Method; import javax.lang.model.element.Element; +import org.netbeans.api.java.source.ClasspathInfo; + import com.sun.source.tree.CompilationUnitTree; import com.sun.source.tree.Tree; import com.sun.source.util.SourcePositions; @@ -63,8 +65,8 @@ public class PatchFixes { //Contributed by Jan Lahoda (jlahoda@netbeans.org) //Turned into a patch script by rzwitserloot. //see http://code.google.com/p/projectlombok/issues/detail?id=20#c3 - public static void addTaskListenerWhenCallingJavac() { - TaskListenerProvider p = /* Lookup.getDefault().lookup(TLP.class) */; + public static void addTaskListenerWhenCallingJavac(Context context, ClasspathInfo cpInfo) { + TaskListenerProvider p = /* Lookup.getDefault().lookup(TaskListenerProvider.class) */; if (p != null) { TaskListener l = p.create(context, cpInfo); task.setTaskListener(l); diff --git a/src/netbeansAgent/lombok/netbeans/agent/TaskListenerProvider.java b/src/netbeansAgent/lombok/netbeans/agent/TaskListenerProvider.java index 59ac6c54..3c721930 100644 --- a/src/netbeansAgent/lombok/netbeans/agent/TaskListenerProvider.java +++ b/src/netbeansAgent/lombok/netbeans/agent/TaskListenerProvider.java @@ -1,5 +1,10 @@ package lombok.netbeans.agent; +import org.netbeans.api.java.source.ClasspathInfo; + +import com.sun.source.util.TaskListener; +import com.sun.tools.javac.util.Context; + public interface TaskListenerProvider { public TaskListener create(Context c, ClasspathInfo info); } -- cgit