aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2021-09-23 06:50:28 +0200
committerRawi01 <Rawi01@users.noreply.github.com>2021-09-28 22:02:16 +0200
commitb50aa64f726952723b1a794538d9bb63fc43832d (patch)
tree032d51e868c61e18af4c022fcf7fd291a741ad1d /src/eclipseAgent/lombok/eclipse
parentba2b47b974304517ef47154a3939056eff13fade (diff)
downloadlombok-b50aa64f726952723b1a794538d9bb63fc43832d.tar.gz
lombok-b50aa64f726952723b1a794538d9bb63fc43832d.tar.bz2
lombok-b50aa64f726952723b1a794538d9bb63fc43832d.zip
[fixes #2950] Patch language server semantic highlighting
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
index 0a11cd7a..05d77b37 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
@@ -87,7 +87,6 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable {
patchHideGeneratedNodes(sm);
patchPostCompileHookEclipse(sm);
patchFixSourceTypeConverter(sm);
- patchDisableLombokForCodeCleanup(sm);
patchListRewriteHandleGeneratedMethods(sm);
patchSyntaxAndOccurrencesHighlighting(sm);
patchSortMembersOperation(sm);
@@ -206,14 +205,6 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable {
.build());
}
- private static void patchDisableLombokForCodeCleanup(ScriptManager sm) {
- sm.addScriptIfWitness(OSGI_TYPES, ScriptBuilder.exitEarly()
- .target(new MethodTarget("org.eclipse.jdt.core.dom.ASTNode", "accept", "void", "org.eclipse.jdt.core.dom.ASTVisitor"))
- .decisionMethod(new Hook("lombok.launch.PatchFixesHider$PatchFixes", "isRefactoringVisitorAndGenerated", "boolean", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.ASTVisitor"))
- .request(StackRequest.THIS, StackRequest.PARAM1)
- .build());
- }
-
private static void patchListRewriteHandleGeneratedMethods(ScriptManager sm) {
sm.addScriptIfWitness(OSGI_TYPES, ScriptBuilder.replaceMethodCall()
.target(new MethodTarget("org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer$ListRewriter", "rewriteList"))
@@ -308,6 +299,12 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable {
"org.eclipse.jdt.core.dom.SimpleName[]"))
.request(StackRequest.RETURN_VALUE).build());
+ sm.addScriptIfWitness(OSGI_TYPES, ScriptBuilder.exitEarly()
+ .target(new MethodTarget("org.eclipse.jdt.core.dom.ASTNode", "accept", "void", "org.eclipse.jdt.core.dom.ASTVisitor"))
+ .decisionMethod(new Hook("lombok.launch.PatchFixesHider$PatchFixes", "isBlockedVisitorAndGenerated", "boolean", "org.eclipse.jdt.core.dom.ASTNode", "org.eclipse.jdt.core.dom.ASTVisitor"))
+ .request(StackRequest.THIS, StackRequest.PARAM1)
+ .build());
+
patchRefactorScripts(sm);
patchFormatters(sm);
}