aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/launch/PatchFixesHider.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/eclipseAgent/lombok/launch/PatchFixesHider.java')
-rwxr-xr-xsrc/eclipseAgent/lombok/launch/PatchFixesHider.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/eclipseAgent/lombok/launch/PatchFixesHider.java b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
index 3741aba8..563beab1 100755
--- a/src/eclipseAgent/lombok/launch/PatchFixesHider.java
+++ b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
@@ -315,7 +315,17 @@ final class PatchFixesHider {
}
return result;
}
-
+
+ public static boolean isGenerated(org.eclipse.jdt.internal.compiler.ast.ASTNode node) {
+ boolean result = false;
+ try {
+ result = node.getClass().getField("$generatedBy").get(node) != null;
+ } catch (Exception e) {
+ // better to assume it isn't generated
+ }
+ return result;
+ }
+
public static boolean isListRewriteOnGeneratedNode(org.eclipse.jdt.core.dom.rewrite.ListRewrite rewrite) {
return isGenerated(rewrite.getParent());
}