From af16ba23cd46fa3d3b096daa8d725df2b4d78976 Mon Sep 17 00:00:00 2001 From: ttzn Date: Wed, 24 Mar 2021 23:52:08 +0100 Subject: @StandardException feature working draft * move feature under experimental * replace ProviderFor with Provides * add doc material (to be completed) * add author --- src/core/lombok/eclipse/handlers/HandleStandardException.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core/lombok/eclipse') diff --git a/src/core/lombok/eclipse/handlers/HandleStandardException.java b/src/core/lombok/eclipse/handlers/HandleStandardException.java index 9996f4fa..e7f25edb 100755 --- a/src/core/lombok/eclipse/handlers/HandleStandardException.java +++ b/src/core/lombok/eclipse/handlers/HandleStandardException.java @@ -23,16 +23,16 @@ package lombok.eclipse.handlers; import lombok.AccessLevel; import lombok.ConfigurationKeys; -import lombok.StandardException; +import lombok.experimental.StandardException; import lombok.core.AST.Kind; import lombok.core.AnnotationValues; import lombok.eclipse.Eclipse; import lombok.eclipse.EclipseAnnotationHandler; import lombok.eclipse.EclipseNode; import lombok.eclipse.handlers.EclipseHandlerUtil.*; +import lombok.spi.Provides; import org.eclipse.jdt.internal.compiler.ast.*; import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants; -import org.mangosdk.spi.ProviderFor; import java.lang.reflect.Modifier; import java.util.*; @@ -42,7 +42,7 @@ import static lombok.eclipse.Eclipse.ECLIPSE_DO_NOT_TOUCH_FLAG; import static lombok.eclipse.Eclipse.pos; import static lombok.eclipse.handlers.EclipseHandlerUtil.*; -@ProviderFor(EclipseAnnotationHandler.class) +@Provides public class HandleStandardException extends EclipseAnnotationHandler { private static final String NAME = StandardException.class.getSimpleName(); @@ -175,12 +175,10 @@ public class HandleStandardException extends EclipseAnnotationHandler parameters, EclipseNode sourceNode) { - ASTNode source = sourceNode.get(); TypeDeclaration typeDeclaration = ((TypeDeclaration) type.get()); boolean isEnum = (((TypeDeclaration) type.get()).modifiers & ClassFileConstants.AccEnum) != 0; - if (isEnum) level = AccessLevel.PRIVATE; boolean addConstructorProperties; -- cgit