aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rwxr-xr-xAUTHORS2
-rw-r--r--buildScripts/ivy-repo/org.projectlombok-lombok.patcher-0.46.xml14
-rw-r--r--buildScripts/ivy.xml19
-rw-r--r--buildScripts/setup.ant.xml162
-rw-r--r--buildScripts/tests.ant.xml86
-rw-r--r--doc/changelog.markdown52
-rw-r--r--src/core/lombok/CustomLog.java2
-rwxr-xr-xsrc/core/lombok/eclipse/handlers/HandleBuilder.java2
-rw-r--r--src/core/lombok/eclipse/handlers/HandleSuperBuilder.java2
-rw-r--r--src/core/lombok/extern/apachecommons/CommonsLog.java2
-rw-r--r--src/core/lombok/extern/flogger/Flogger.java2
-rw-r--r--src/core/lombok/extern/java/Log.java2
-rw-r--r--src/core/lombok/extern/jbosslog/JBossLog.java2
-rw-r--r--src/core/lombok/extern/log4j/Log4j.java2
-rw-r--r--src/core/lombok/extern/log4j/Log4j2.java2
-rw-r--r--src/core/lombok/extern/slf4j/Slf4j.java2
-rw-r--r--src/core/lombok/extern/slf4j/XSlf4j.java2
-rw-r--r--src/delombok/lombok/delombok/PrettyPrinter.java31
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java10
-rwxr-xr-xsrc/eclipseAgent/lombok/launch/PatchFixesHider.java25
-rw-r--r--src/support/lombok/eclipse/dependencies/DownloadEclipseDependencies.java131
-rw-r--r--src/utils/lombok/javac/JavacTreeMaker.java8
-rw-r--r--test/core/src/lombok/RunTestsViaEcj.java14
-rw-r--r--test/eclipse/resource/cleanup/useThis/after/A.java18
-rw-r--r--test/eclipse/resource/cleanup/useThis/before/A.java18
-rw-r--r--test/eclipse/resource/extractinterface/simple/after/A.java15
-rw-r--r--test/eclipse/resource/extractinterface/simple/after/Interface.java21
-rw-r--r--test/eclipse/resource/extractinterface/simple/before/A.java15
-rw-r--r--test/eclipse/resource/extractinterface/usage/after/A.java15
-rw-r--r--test/eclipse/resource/extractinterface/usage/after/B.java12
-rw-r--r--test/eclipse/resource/extractinterface/usage/after/Interface.java21
-rw-r--r--test/eclipse/resource/extractinterface/usage/before/A.java15
-rw-r--r--test/eclipse/resource/extractinterface/usage/before/B.java12
-rw-r--r--test/eclipse/resource/rename/builderField/after/A.java8
-rw-r--r--test/eclipse/resource/rename/builderField/before/A.java8
-rw-r--r--test/eclipse/resource/rename/simple/after/A.java14
-rw-r--r--test/eclipse/resource/rename/simple/before/A.java14
-rw-r--r--test/eclipse/resource/rename/withGetter/after/A.java18
-rw-r--r--test/eclipse/resource/rename/withGetter/before/A.java18
-rw-r--r--test/eclipse/resource/rename/withGetterDifferentFile/after/A.java14
-rw-r--r--test/eclipse/resource/rename/withGetterDifferentFile/after/B.java7
-rw-r--r--test/eclipse/resource/rename/withGetterDifferentFile/before/A.java14
-rw-r--r--test/eclipse/resource/rename/withGetterDifferentFile/before/B.java7
-rw-r--r--test/eclipse/resource/select/builderField/A.java8
-rw-r--r--test/eclipse/resource/select/superbuilderField/A.java8
-rw-r--r--test/eclipse/src/lombok/eclipse/EclipseRunner.java154
-rw-r--r--test/eclipse/src/lombok/eclipse/EclipseTests.java16
-rw-r--r--test/eclipse/src/lombok/eclipse/RefactoringUtils.java30
-rw-r--r--test/eclipse/src/lombok/eclipse/SetupBeforeAfterTest.java52
-rw-r--r--test/eclipse/src/lombok/eclipse/SetupSingleFileTest.java28
-rw-r--r--test/eclipse/src/lombok/eclipse/SetupTest.java107
-rw-r--r--test/eclipse/src/lombok/eclipse/cleanup/CleanupTest.java45
-rw-r--r--test/eclipse/src/lombok/eclipse/edit/SelectTest.java48
-rw-r--r--test/eclipse/src/lombok/eclipse/refactoring/ExtractInterfaceTest.java47
-rw-r--r--test/eclipse/src/lombok/eclipse/refactoring/RenameTest.java71
-rw-r--r--test/pretty/resource/after/RecordPattern.java15
-rw-r--r--test/pretty/resource/after/Switch19.java32
-rw-r--r--test/pretty/resource/before/RecordPattern.java16
-rw-r--r--test/pretty/resource/before/Switch17.java2
-rw-r--r--test/pretty/resource/before/Switch19.java33
-rw-r--r--test/transform/resource/after-delombok/CheckerFrameworkBuilder.java2
-rw-r--r--test/transform/resource/after-delombok/LoggerFloggerRecord.java3
-rw-r--r--test/transform/resource/after-delombok/ValInvalidParameter.java1
-rw-r--r--test/transform/resource/after-ecj/LoggerFloggerRecord.java3
-rw-r--r--test/transform/resource/after-ecj/NonNullOnRecord3.java6
-rw-r--r--test/transform/resource/before/LoggerFloggerRecord.java2
-rw-r--r--test/transform/resource/before/ValInvalidParameter.java2
-rw-r--r--website/templates/setup/vscode.html4
69 files changed, 1533 insertions, 63 deletions
diff --git a/.gitignore b/.gitignore
index 2417108c..d4285573 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,3 +24,4 @@
/website/lombokSupporters
/pom.xml
/jvm.locations
+/testenv \ No newline at end of file
diff --git a/AUTHORS b/AUTHORS
index ba83bf4e..91d6bd7b 100755
--- a/AUTHORS
+++ b/AUTHORS
@@ -45,7 +45,7 @@ Roel Spilker <r.spilker@gmail.com>
Roland Praml <pram@gmx.de>
Rostislav Krasny <45571812+rosti-il@users.noreply.github.com>
Samuel Pereira <samuel.p.araujo@gmail.com>
-Sander Koning <askoning@gmail.com>
+Sasha Koning <askoning@gmail.com>
Szymon Pacanowski <spacanowski@gmail.com>
Taiki Sugawara <buzz.taiki@gmail.com>
Takuya Murakami <tmurakam@tmurakam.org>
diff --git a/buildScripts/ivy-repo/org.projectlombok-lombok.patcher-0.46.xml b/buildScripts/ivy-repo/org.projectlombok-lombok.patcher-0.46.xml
new file mode 100644
index 00000000..37de93e6
--- /dev/null
+++ b/buildScripts/ivy-repo/org.projectlombok-lombok.patcher-0.46.xml
@@ -0,0 +1,14 @@
+<ivy-module version="2.0">
+ <info organisation="org.projectlombok" module="lombok.patcher" revision="0.46" publication="20230111220000">
+ <license name="MIT License" url="https://www.opensource.org/licenses/mit-license.php" />
+ <ivyauthor name="rzwitserloot" url="https://github.com/rzwitserloot" />
+ <ivyauthor name="rspilker" url="https://github.com/rspilker" />
+ <description homepage="https://projectlombok.org/" />
+ </info>
+ <configurations>
+ <conf name="default" />
+ </configurations>
+ <publications>
+ <artifact conf="default" url="https://projectlombok.org/downloads/lombok.patcher-0.46.jar" />
+ </publications>
+</ivy-module>
diff --git a/buildScripts/ivy.xml b/buildScripts/ivy.xml
index afd799d0..adab33b4 100644
--- a/buildScripts/ivy.xml
+++ b/buildScripts/ivy.xml
@@ -29,7 +29,9 @@
<conf name="ecj11" />
<conf name="ecj14" />
<conf name="ecj16" />
+ <conf name="ecj19" />
+ <conf name="eclipse-202212" />
<conf name="eclipse-oxygen" />
<conf name="eclipse-202006" />
@@ -37,13 +39,13 @@
</configurations>
<dependencies>
- <dependency org="org.projectlombok" name="lombok.patcher" rev="0.44" conf="build,stripe->default" />
+ <dependency org="org.projectlombok" name="lombok.patcher" rev="0.46" conf="build,stripe->default" />
<dependency org="zwitserloot.com" name="cmdreader" rev="1.2" conf="build,stripe->runtime" />
<dependency org="org.apache.ant" name="ant" rev="1.10.5" conf="build->default" />
<dependency org="org.apache.ant" name="ant-junit" rev="1.10.5" conf="build->default" />
<!-- test deps -->
- <dependency org="junit" name="junit" rev="4.8.2" conf="test->default; sources" />
+ <dependency org="junit" name="junit" rev="4.13.2" conf="test->default; sources" />
<dependency org="log4j" name="log4j" rev="1.2.17" conf="test->default; sources" />
<dependency org="org.apache.logging.log4j" name="log4j-api" rev="2.17.1" conf="test->default; sources" />
<dependency org="commons-logging" name="commons-logging" rev="1.2" conf="test->default; sources" />
@@ -77,6 +79,7 @@
<!-- ecjs -->
+ <dependency org="org.eclipse.jdt" name="ecj" rev="3.32.0" conf="ecj19->master" />
<dependency org="org.eclipse.jdt" name="ecj" rev="3.25.0" conf="ecj16->master" />
<dependency org="org.eclipse.jdt" name="ecj" rev="3.22.0.v20200530-2032" conf="ecj14->master" />
<dependency org="org.eclipse.jdt" name="ecj" rev="3.16.0" conf="ecj11->master" />
@@ -86,6 +89,18 @@
<!-- eclipses -->
+ <dependency org="org.eclipse.platform" name="org.eclipse.core.runtime" rev="3.26.100" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.jdt" name="org.eclipse.jdt.core" rev="3.32.0" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.jdt" name="org.eclipse.jdt.ui" rev="3.27.100" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.equinox.common" rev="3.17.0" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.equinox.registry" rev="3.11.200" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.equinox.app" rev="1.6.200" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.core.resources" rev="3.18.100" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.core.contenttype" rev="3.8.200" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.core.jobs" rev="3.13.200" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.osgi" rev="3.18.200" conf="eclipse-202212->default" transitive="false" />
+ <dependency org="org.eclipse.platform" name="org.eclipse.text" rev="3.12.300" conf="eclipse-202212->default" transitive="false" />
+
<dependency org="org.eclipse.platform" name="org.eclipse.core.runtime" rev="3.13.0" conf="eclipse-oxygen->default" transitive="false" />
<dependency org="org.eclipse.jdt" name="org.eclipse.jdt.core" rev="3.13.102" conf="eclipse-oxygen->default" transitive="false" />
<dependency org="org.eclipse.jdt" name="org.eclipse.jdt.ui" rev="3.13.100" conf="eclipse-oxygen->default" transitive="false" />
diff --git a/buildScripts/setup.ant.xml b/buildScripts/setup.ant.xml
index 2a9104eb..0531a392 100644
--- a/buildScripts/setup.ant.xml
+++ b/buildScripts/setup.ant.xml
@@ -34,10 +34,32 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
<property name="jdk6-rt.loc" location="lib/openjdk6_rt.jar" />
<property name="jdk8-rt.loc" location="lib/openjdk8_rt.jar" />
+ <property name="rtstubs18.loc" location="lib/rtstubs18.jar" />
<available file="${jdk6-rt.loc}" property="jdk6-rt.available" />
<available file="${jdk8-rt.loc}" property="jdk8-rt.available" />
+ <available file="${rtstubs18.loc}" property="rtstubs18.available" />
<property name="ssh.configuration.file" location="ssh.configuration" />
+ <condition property="os.specific.native-swt-lib" value="org.eclipse.swt.gtk.linux.aarch64">
+ <os name="Linux" arch="aarch64" />
+ </condition>
+ <condition property="os.specific.native-swt-lib" value="org.eclipse.swt.gtk.linux.x86_64">
+ <os name="Linux" />
+ </condition>
+ <condition property="os.specific.native-swt-lib" value="org.eclipse.swt.cocoa.macosx.aarch64">
+ <os name="Mac OS X" arch="aarch64" />
+ </condition>
+ <condition property="os.specific.native-swt-lib" value="org.eclipse.swt.cocoa.macosx.x86_64">
+ <os name="Mac OS X" />
+ </condition>
+ <condition property="os.specific.native-swt-lib" value="org.eclipse.swt.win32.win32.aarch64">
+ <os family="windows" arch="aarch64" />
+ </condition>
+ <condition property="os.specific.native-swt-lib" value="org.eclipse.swt.win32.win32.x86_64">
+ <os family="windows" />
+ </condition>
+ <fail unless="os.specific.native-swt-lib">Full eclipse testing requires downloading a native SWT binding. This script knows how to download for OS = [mac, linux, or windows] and architecture = [aarch64 or x86-64]. You have something different, you unique snowflake you. Your OS: "${os.name}", Your arch: "${os.arch}".</fail>
+
<target name="-setup.ssh.ask">
<property file="${ssh.configuration.file}" />
<fail>
@@ -167,6 +189,12 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
<get src="https://projectlombok.org/ivyrepo/langtools/rt-openjdk8.jar" dest="${jdk8-rt.loc}" verbose="true" usetimestamp="true" />
</target>
+ <target name="deps.rtstubs18" unless="rtstubs18.available">
+ <echo>To test in eclipse, we need a java runtime, which will now be downloaded...</echo>
+ <mkdir dir="lib" />
+ <get src="https://github.com/eclipse-jdt/eclipse.jdt.ui/raw/master/org.eclipse.jdt.ui.tests/testresources/rtstubs18.jar" dest="${rtstubs18.loc}" verbose="true" usetimestamp="true" />
+ </target>
+
<target name="deps.jdk-runtime" depends="deps.jdk6-runtime, deps.jdk8-runtime" />
<target name="deps.custom" depends="ivy.config" description="Download the dependencies that comprise a configuration (from ivy.xml)">
@@ -175,6 +203,14 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
<ivy:retrieve symlink="true" />
</target>
+ <target name="deps.eclipse.oxygen" depends="deps.rtstubs18, compile.support">
+ <fetchdep.eclipse.osgi name="oxygen" version="4.7/R-4.7-201706120950" />
+ </target>
+
+ <target name="deps.eclipse.2022-03" depends="deps.rtstubs18, compile.support">
+ <fetchdep.eclipse.osgi name="2022-03" version="4.23/R-4.23-202203080310" />
+ </target>
+
<macrodef name="fetchdep.ecj">
<attribute name="version" />
<sequential>
@@ -195,6 +231,132 @@ This buildfile is part of projectlombok.org. It sets up the build itself.
</sequential>
</macrodef>
+ <macrodef name="fetchdep.eclipse.osgi">
+ <attribute name="target" default="testenv" />
+ <attribute name="name" />
+ <attribute name="version" />
+ <sequential>
+ <java classname="lombok.eclipse.dependencies.DownloadEclipseDependencies" failonerror="true">
+ <classpath>
+ <path refid="cp.buildtools" />
+ <pathelement location="build/support" />
+ </classpath>
+ <arg value="@{target}" />
+ <arg value="eclipse-@{name}" />
+ <arg value="https://download.eclipse.org/eclipse/updates/@{version}/plugins/" />
+ <arg value="com.ibm.icu" />
+ <arg value="com.sun.jna" />
+ <arg value="com.sun.jna.platform" />
+ <arg value="javax.inject" />
+ <arg value="javax.annotation" />
+ <arg value="org.apache.batik.constants" />
+ <arg value="org.apache.batik.css" />
+ <arg value="org.apache.batik.i18n" />
+ <arg value="org.apache.batik.util" />
+ <arg value="org.apache.commons.io" />
+ <arg value="org.apache.commons.logging" />
+ <arg value="org.apache.commons.jxpath" />
+ <arg value="org.apache.felix.scr" />
+ <arg value="org.apache.xmlgraphics" />
+ <arg value="org.bouncycastle.bcpg" />
+ <arg value="org.bouncycastle.bcprov" />
+ <arg value="org.eclipse.compare" />
+ <arg value="org.eclipse.compare.core" />
+ <arg value="org.eclipse.core.commands" />
+ <arg value="org.eclipse.core.contenttype" />
+ <arg value="org.eclipse.core.databinding" />
+ <arg value="org.eclipse.core.databinding.observable" />
+ <arg value="org.eclipse.core.databinding.property" />
+ <arg value="org.eclipse.core.expressions" />
+ <arg value="org.eclipse.core.filebuffers" />
+ <arg value="org.eclipse.core.filesystem" />
+ <arg value="org.eclipse.core.jobs" />
+ <arg value="org.eclipse.core.resources" />
+ <arg value="org.eclipse.core.runtime" />
+ <arg value="org.eclipse.core.variables" />
+ <arg value="org.eclipse.debug.core" />
+ <arg value="org.eclipse.debug.ui" />
+ <arg value="org.eclipse.e4.core.commands" />
+ <arg value="org.eclipse.e4.core.contexts" />
+ <arg value="org.eclipse.e4.core.di" />
+ <arg value="org.eclipse.e4.core.di.annotations" />
+ <arg value="org.eclipse.e4.core.di.extensions" />
+ <arg value="org.eclipse.e4.core.di.extensions.supplier" />
+ <arg value="org.eclipse.e4.core.services" />
+ <arg value="org.eclipse.e4.emf.xpath" />
+ <arg value="org.eclipse.e4.ui.bindings" />
+ <arg value="org.eclipse.e4.ui.css.core" />
+ <arg value="org.eclipse.e4.ui.css.swt" />
+ <arg value="org.eclipse.e4.ui.css.swt.theme" />
+ <arg value="org.eclipse.e4.ui.di" />
+ <arg value="org.eclipse.e4.ui.dialogs" />
+ <arg value="org.eclipse.e4.ui.ide" />
+ <arg value="org.eclipse.e4.ui.model.workbench" />
+ <arg value="org.eclipse.e4.ui.services" />
+ <arg value="org.eclipse.e4.ui.widgets" />
+ <arg value="org.eclipse.e4.ui.workbench" />
+ <arg value="org.eclipse.e4.ui.workbench.addons.swt" />
+ <arg value="org.eclipse.e4.ui.workbench.renderers.swt" />
+ <arg value="org.eclipse.e4.ui.workbench.swt" />
+ <arg value="org.eclipse.e4.ui.workbench3" />
+ <arg value="org.eclipse.emf.common" />
+ <arg value="org.eclipse.emf.ecore" />
+ <arg value="org.eclipse.emf.ecore.change" />
+ <arg value="org.eclipse.emf.ecore.xmi" />
+ <arg value="org.eclipse.equinox.app" />
+ <arg value="org.eclipse.equinox.bidi" />
+ <arg value="org.eclipse.equinox.common" />
+ <arg value="org.eclipse.equinox.p2.artifact.repository" />
+ <arg value="org.eclipse.equinox.p2.core" />
+ <arg value="org.eclipse.equinox.p2.engine" />
+ <arg value="org.eclipse.equinox.p2.jarprocessor" />
+ <arg value="org.eclipse.equinox.p2.metadata" />
+ <arg value="org.eclipse.equinox.p2.metadata.repository" />
+ <arg value="org.eclipse.equinox.p2.repository" />
+ <arg value="org.eclipse.equinox.preferences" />
+ <arg value="org.eclipse.equinox.registry" />
+ <arg value="org.eclipse.equinox.security" />
+ <arg value="org.eclipse.help" />
+ <arg value="org.eclipse.jdt.core" />
+ <arg value="org.eclipse.jdt.core.manipulation" />
+ <arg value="org.eclipse.jdt.debug" />
+ <arg value="org.eclipse.jdt.launching" />
+ <arg value="org.eclipse.jdt.ui" />
+ <arg value="org.eclipse.jface" />
+ <arg value="org.eclipse.jface.databinding" />
+ <arg value="org.eclipse.jface.text" />
+ <arg value="org.eclipse.ltk.core.refactoring" />
+ <arg value="org.eclipse.ltk.ui.refactoring" />
+ <arg value="org.eclipse.osgi" />
+ <arg value="org.eclipse.osgi.services" />
+ <arg value="org.eclipse.osgi.util" />
+ <arg value="org.eclipse.search" />
+ <arg value="org.eclipse.swt" />
+ <arg value="${os.specific.native-swt-lib}" />
+ <arg value="org.eclipse.team.core" />
+ <arg value="org.eclipse.team.ui" />
+ <arg value="org.eclipse.text" />
+ <arg value="org.eclipse.ui" />
+ <arg value="org.eclipse.ui.console" />
+ <arg value="org.eclipse.ui.editors" />
+ <arg value="org.eclipse.ui.forms" />
+ <arg value="org.eclipse.ui.ide" />
+ <arg value="org.eclipse.ui.navigator" />
+ <arg value="org.eclipse.ui.navigator.resources" />
+ <arg value="org.eclipse.ui.views" />
+ <arg value="org.eclipse.ui.views.properties.tabbed" />
+ <arg value="org.eclipse.ui.workbench" />
+ <arg value="org.eclipse.ui.workbench.texteditor" />
+ <arg value="org.eclipse.urischeme" />
+ <arg value="org.tukaani.xz" />
+ <arg value="org.w3c.css.sac" />
+ <arg value="org.w3c.dom.events" />
+ <arg value="org.w3c.dom.smil" />
+ <arg value="org.w3c.dom.svg" />
+ </java>
+ </sequential>
+ </macrodef>
+
<target name="deps" depends="ivy.config, deps.jdk-runtime" description="Downloads all dependencies needed for common tasks">
<ivy:resolve file="buildScripts/ivy.xml" refresh="true" conf="javac6,javac8,ecj8,build,eclipse-oxygen,mapstruct,sources,stripe,buildtools,test" />
<ivy:retrieve symlink="true" />
diff --git a/buildScripts/tests.ant.xml b/buildScripts/tests.ant.xml
index 0191d642..d34e1f82 100644
--- a/buildScripts/tests.ant.xml
+++ b/buildScripts/tests.ant.xml
@@ -1,5 +1,5 @@
<!--
- Copyright (C) 2020-2021 The Project Lombok Authors.
+ Copyright (C) 2020-2023 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
@@ -55,6 +55,24 @@ This buildfile is part of projectlombok.org. It takes care of compiling and runn
</ivy:compile>
</target>
+ <target name="test.eclipse.compile" depends="deps.eclipse.oxygen, compile" description="compiles the eclipse tests" unless="skip.tests">
+ <mkdir dir="build/tests" />
+ <path id="cp.eclipse">
+ <fileset dir="testenv/eclipse-oxygen/plugins">