From f2cdfd1f8a445f881627606c6c7dcd98c9eedfb5 Mon Sep 17 00:00:00 2001 From: cnuessgens Date: Tue, 26 Dec 2017 21:46:19 +0100 Subject: Initial test --- src/core/lombok/core/Version.java | 2 +- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index 18c78b04..e776774b 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,7 +30,7 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.16.19"; + private static final String VERSION = "1.16.19-issue-879"; private static final String RELEASE_NAME = "Edgy Guinea Pig"; // private static final String RELEASE_NAME = "Dancing Elephant"; diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 135b5c77..8638ceb0 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -217,6 +217,7 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { private static void patchDisableLombokForCodeFormatterAndCleanup(ScriptManager sm) { sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) + //.target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) .callToWrap(new Hook("org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil", "parseCompilationUnit", "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration", "char[]", "java.util.Map", "boolean")) .symbol("lombok.disable") .build()); -- cgit From 251870cf65ad1de01e7d304cef68689ff4606960 Mon Sep 17 00:00:00 2001 From: cnuessgens Date: Tue, 26 Dec 2017 21:47:54 +0100 Subject: Revert "Initial test" This reverts commit 43d91281d0a298df72b38c43d87769c3a33e950b. --- src/core/lombok/core/Version.java | 2 +- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index e776774b..18c78b04 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,7 +30,7 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.16.19-issue-879"; + private static final String VERSION = "1.16.19"; private static final String RELEASE_NAME = "Edgy Guinea Pig"; // private static final String RELEASE_NAME = "Dancing Elephant"; diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 8638ceb0..135b5c77 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -217,7 +217,6 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { private static void patchDisableLombokForCodeFormatterAndCleanup(ScriptManager sm) { sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) - //.target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) .callToWrap(new Hook("org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil", "parseCompilationUnit", "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration", "char[]", "java.util.Map", "boolean")) .symbol("lombok.disable") .build()); -- cgit From f8a6ba556ca21eb83bda6117d25b860398505714 Mon Sep 17 00:00:00 2001 From: cnuessgens Date: Tue, 26 Dec 2017 21:48:15 +0100 Subject: Revert "Revert "Initial test"" This reverts commit c489b49c3684e0d8cc52c5180207375d1313dbc5. --- src/core/lombok/core/Version.java | 2 +- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index 18c78b04..e776774b 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,7 +30,7 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.16.19"; + private static final String VERSION = "1.16.19-issue-879"; private static final String RELEASE_NAME = "Edgy Guinea Pig"; // private static final String RELEASE_NAME = "Dancing Elephant"; diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 135b5c77..8638ceb0 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -217,6 +217,7 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { private static void patchDisableLombokForCodeFormatterAndCleanup(ScriptManager sm) { sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) + //.target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) .callToWrap(new Hook("org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil", "parseCompilationUnit", "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration", "char[]", "java.util.Map", "boolean")) .symbol("lombok.disable") .build()); -- cgit From 98f08c245528ffd72c341d43ace131a4691927c0 Mon Sep 17 00:00:00 2001 From: cnuessgens Date: Tue, 26 Dec 2017 21:54:54 +0100 Subject: revert initial fix-trial --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 8638ceb0..64838e3a 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -216,8 +216,8 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { private static void patchDisableLombokForCodeFormatterAndCleanup(ScriptManager sm) { sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() - .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) - //.target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) + //.target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) + .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) .callToWrap(new Hook("org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil", "parseCompilationUnit", "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration", "char[]", "java.util.Map", "boolean")) .symbol("lombok.disable") .build()); -- cgit From c025ef0695a3678463bfa1487372427b00e3e887 Mon Sep 17 00:00:00 2001 From: cnuessgens Date: Tue, 26 Dec 2017 22:13:23 +0100 Subject: Try fix "A save participant caused problems." The bugfix was originally created by mateusz-matela --- .../lombok/eclipse/agent/EclipsePatcher.java | 30 +++++++++------------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 64838e3a..d3477c1f 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -105,7 +105,7 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { patchHideGeneratedNodes(sm); patchPostCompileHookEclipse(sm); patchFixSourceTypeConverter(sm); - patchDisableLombokForCodeFormatterAndCleanup(sm); + patchDisableLombokForCodeCleanup(sm); patchListRewriteHandleGeneratedMethods(sm); patchSyntaxAndOccurrencesHighlighting(sm); patchSortMembersOperation(sm); @@ -214,14 +214,7 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { .build()); } - private static void patchDisableLombokForCodeFormatterAndCleanup(ScriptManager sm) { - sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() - //.target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) - .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) - .callToWrap(new Hook("org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil", "parseCompilationUnit", "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration", "char[]", "java.util.Map", "boolean")) - .symbol("lombok.disable") - .build()); - + private static void patchDisableLombokForCodeCleanup(ScriptManager sm) { sm.addScript(ScriptBuilder.exitEarly() .target(new MethodTarget("org.eclipse.jdt.internal.corext.fix.ControlStatementsFix$ControlStatementFinder", "visit", "boolean", "org.eclipse.jdt.core.dom.DoStatement")) .target(new MethodTarget("org.eclipse.jdt.internal.corext.fix.ControlStatementsFix$ControlStatementFinder", "visit", "boolean", "org.eclipse.jdt.core.dom.EnhancedForStatement")) @@ -340,18 +333,19 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { } private static void patchFormatters(ScriptManager sm) { + // before Eclipse Mars sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() - .target(new MethodTarget("org.eclipse.jdt.internal.ui.text.java.JavaFormattingStrategy", "format", "void")) - .callToWrap(new Hook("org.eclipse.jdt.internal.corext.util.CodeFormatterUtil", "reformat", "org.eclipse.text.edits.TextEdit", - "int", "java.lang.String", "int", "int", "int", "java.lang.String", "java.util.Map")) - .symbol("lombok.disable").build()); + .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "formatCompilationUnit")) + .callToWrap(new Hook("org.eclipse.jdt.internal.core.util.CodeSnippetParsingUtil", "parseCompilationUnit", "org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration", "char[]", "java.util.Map", "boolean")) + .symbol("lombok.disable") + .build()); + // Eclipse Mars and beyond sm.addScript(ScriptBuilder.setSymbolDuringMethodCall() - .target(new MethodTarget("org.eclipse.jdt.internal.corext.fix.CodeFormatFix", "createCleanUp", "org.eclipse.jdt.ui.cleanup.ICleanUpFix", - "org.eclipse.jdt.core.ICompilationUnit", "org.eclipse.jface.text.IRegion[]", "boolean", "boolean", "boolean", "boolean")) - .callToWrap(new Hook("org.eclipse.jdt.internal.corext.util.CodeFormatterUtil", "reformat", "org.eclipse.text.edits.TextEdit", - "int", "java.lang.String", "int", "java.lang.String", "java.util.Map")) - .symbol("lombok.disable").build()); + .target(new MethodTarget("org.eclipse.jdt.internal.formatter.DefaultCodeFormatter", "parseSourceCode")) + .callToWrap(new Hook("org.eclipse.jdt.core.dom.ASTParser", "createAST", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.core.runtime.IProgressMonitor")) + .symbol("lombok.disable") + .build()); } private static void patchRefactorScripts(ScriptManager sm) { -- cgit From cdee2996514723dfbcf6ac177d82446acef260f3 Mon Sep 17 00:00:00 2001 From: cnuessgens Date: Sun, 7 Jan 2018 19:51:45 +0100 Subject: remove issue-suffix from version-string --- src/core/lombok/core/Version.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lombok/core/Version.java b/src/core/lombok/core/Version.java index e776774b..18c78b04 100644 --- a/src/core/lombok/core/Version.java +++ b/src/core/lombok/core/Version.java @@ -30,7 +30,7 @@ public class Version { // ** CAREFUL ** - this class must always compile with 0 dependencies (it must not refer to any other sources or libraries). // Note: In 'X.Y.Z', if Z is odd, its a snapshot build built from the repository, so many different 0.10.3 versions can exist, for example. // Official builds always end in an even number. (Since 0.10.2). - private static final String VERSION = "1.16.19-issue-879"; + private static final String VERSION = "1.16.19"; private static final String RELEASE_NAME = "Edgy Guinea Pig"; // private static final String RELEASE_NAME = "Dancing Elephant"; -- cgit From ba928d194bf42d7c7a761363ce13a63e8c24d298 Mon Sep 17 00:00:00 2001 From: Christian Nüssgens Date: Wed, 28 Mar 2018 19:20:49 +0200 Subject: add self to authors --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 27b3fcf5..68270ec8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,5 +24,6 @@ Takuya Murakami Taiki Sugawara Thomas Darimont Yun Zhi Lin +Christian Nüssgens By adding your name to this list, you grant full and irrevocable copyright and patent indemnity to Project Lombok and all use of Project Lombok, and you certify that you have the right to do so for all commits you add to Project Lombok. -- cgit From ea7d6727bcae74d24664da3760d4a2b730f809e9 Mon Sep 17 00:00:00 2001 From: mateusz-matela Date: Wed, 28 Mar 2018 20:01:08 +0200 Subject: add self to authors [Issue #879] --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index 68270ec8..15394c60 100644 --- a/AUTHORS +++ b/AUTHORS @@ -25,5 +25,6 @@ Taiki Sugawara Thomas Darimont Yun Zhi Lin Christian Nüssgens +Mateusz Matela By adding your name to this list, you grant full and irrevocable copyright and patent indemnity to Project Lombok and all use of Project Lombok, and you certify that you have the right to do so for all commits you add to Project Lombok. -- cgit