aboutsummaryrefslogtreecommitdiff
path: root/src/delombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/delombok')
-rwxr-xr-xsrc/delombok/lombok/delombok/Delombok.java5
-rw-r--r--src/delombok/lombok/delombok/DelombokApp.java7
-rw-r--r--src/delombok/lombok/delombok/PrettyPrinter.java7
3 files changed, 11 insertions, 8 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index 6ab4d3e5..10ec5015 100755
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -61,6 +61,7 @@ import lombok.Lombok;
import lombok.javac.CommentCatcher;
import lombok.javac.Javac;
import lombok.javac.LombokOptions;
+import lombok.javac.apt.LombokProcessor;
import lombok.permit.Permit;
import com.sun.tools.javac.code.Symtab;
@@ -167,6 +168,10 @@ public class Delombok {
private boolean help;
}
+ static {
+ LombokProcessor.addOpensForLombok();
+ }
+
private static String indentAndWordbreak(String in, int indent, int maxLen) {
StringBuilder out = new StringBuilder();
StringBuilder line = new StringBuilder();
diff --git a/src/delombok/lombok/delombok/DelombokApp.java b/src/delombok/lombok/delombok/DelombokApp.java
index 8467bf77..f5a5fc81 100644
--- a/src/delombok/lombok/delombok/DelombokApp.java
+++ b/src/delombok/lombok/delombok/DelombokApp.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 The Project Lombok Authors.
+ * Copyright (C) 2009-2021 The Project Lombok Authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -37,10 +37,9 @@ import java.util.jar.JarFile;
import lombok.core.LombokApp;
import lombok.permit.Permit;
+import lombok.spi.Provides;
-import org.mangosdk.spi.ProviderFor;
-
-@ProviderFor(LombokApp.class)
+@Provides
public class DelombokApp extends LombokApp {
@Override public int runApp(List<String> args) throws Exception {
try {
diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java
index 9f47e5ec..7531b0b1 100644
--- a/src/delombok/lombok/delombok/PrettyPrinter.java
+++ b/src/delombok/lombok/delombok/PrettyPrinter.java
@@ -29,7 +29,6 @@ import static lombok.javac.JavacTreeMaker.TypeTag.typeTag;
import java.io.IOException;
import java.io.Writer;
import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
@@ -279,7 +278,6 @@ public class PrettyPrinter extends JCTree.Visitor {
aligned = false;
}
-
private void println() {
try {
out.write(LINE_SEP);
@@ -1387,9 +1385,10 @@ public class PrettyPrinter extends JCTree.Visitor {
}
void printBindingPattern(JCTree tree) {
- print((JCExpression) readObject(tree, "vartype", null));
+ JCTree var = readObject(tree, "var", tree);
+ print((JCExpression) readObject(var, "vartype", null));
print(" ");
- print((Name) readObject(tree, "name", null));
+ print((Name) readObject(var, "name", null));
}
@Override public void visitTry(JCTry tree) {