diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-03-11 21:01:28 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-12-15 18:48:11 +0100 |
commit | 324022b71903ae5a9a61e9e9a3d7eb92d3d9d96c (patch) | |
tree | 4cd7a9aacac31dcf4dd788f0665b6bd04948e04a /src/core/lombok/eclipse/handlers | |
parent | 7d51842ca381c491d5dfb44bc76b0cea345e7170 (diff) | |
download | lombok-324022b71903ae5a9a61e9e9a3d7eb92d3d9d96c.tar.gz lombok-324022b71903ae5a9a61e9e9a3d7eb92d3d9d96c.tar.bz2 lombok-324022b71903ae5a9a61e9e9a3d7eb92d3d9d96c.zip |
work in progress on ProjectSearcher.
Diffstat (limited to 'src/core/lombok/eclipse/handlers')
-rw-r--r-- | src/core/lombok/eclipse/handlers/HandleWither.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/lombok/eclipse/handlers/HandleWither.java b/src/core/lombok/eclipse/handlers/HandleWither.java index 27fbc635..e114ab19 100644 --- a/src/core/lombok/eclipse/handlers/HandleWither.java +++ b/src/core/lombok/eclipse/handlers/HandleWither.java @@ -31,11 +31,13 @@ import java.util.Collections; import java.util.List; import lombok.AccessLevel; +import lombok.Lombok; import lombok.core.AST.Kind; import lombok.core.AnnotationValues; import lombok.core.TransformationsUtil; import lombok.eclipse.EclipseAnnotationHandler; import lombok.eclipse.EclipseNode; +import lombok.eclipse.EclipseProjectSearcher; import lombok.eclipse.handlers.EclipseHandlerUtil.FieldAccess; import lombok.experimental.Wither; @@ -56,6 +58,7 @@ import org.eclipse.jdt.internal.compiler.ast.ThisReference; import org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.eclipse.jdt.internal.compiler.ast.TypeReference; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; +import org.eclipse.jdt.internal.core.JavaProject; import org.mangosdk.spi.ProviderFor; @ProviderFor(EclipseAnnotationHandler.class) @@ -124,6 +127,18 @@ public class HandleWither extends EclipseAnnotationHandler<Wither> { AccessLevel level = annotation.getInstance().value(); if (level == AccessLevel.NONE || node == null) return; + /** hackery */ { + JavaProject project = annotationNode.getAst().getProject(); + if (project != null) try { + new EclipseProjectSearcher(project).findAllWithName("/java/lang/String.class"); + } catch (Exception e) { + throw Lombok.sneakyThrow(e); + } else { + Thread.dumpStack(); + System.err.println("****!!!!*!*!*!*!*!*!!*!********!!!! PROJECT IS NULL!!!!"); + } + } + List<Annotation> onMethod = unboxAndRemoveAnnotationParameter(ast, "onMethod", "@Setter(onMethod=", annotationNode); List<Annotation> onParam = unboxAndRemoveAnnotationParameter(ast, "onParam", "@Setter(onParam=", annotationNode); |