aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
diff options
context:
space:
mode:
authorjvanderhel <Jappe.vanderhel@gmail.com>2011-11-24 21:01:09 +0100
committerjvanderhel <Jappe.vanderhel@gmail.com>2011-11-24 21:01:09 +0100
commit088f7bfbba75088e59b70f3cb51aae010b1d2893 (patch)
tree4061d2cc358e42fe011a9d750a73bb933a6a3881 /src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
parentef820d8d5ab76c6db8335201da3c7ab9de7cb56a (diff)
downloadlombok-088f7bfbba75088e59b70f3cb51aae010b1d2893.tar.gz
lombok-088f7bfbba75088e59b70f3cb51aae010b1d2893.tar.bz2
lombok-088f7bfbba75088e59b70f3cb51aae010b1d2893.zip
Some more save actions fixed
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
index 69024afa..0fc48807 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
@@ -43,16 +43,22 @@ import org.eclipse.jdt.internal.core.dom.rewrite.RewriteEvent;
import org.eclipse.jdt.internal.core.dom.rewrite.TokenScanner;
public class PatchFixes {
- public static boolean isGenerated(org.eclipse.jdt.core.dom.Statement statement) {
+ public static boolean isGenerated(org.eclipse.jdt.core.dom.ASTNode node) {
boolean result = false;
try {
- result = ((Boolean)statement.getClass().getField("$isGenerated").get(statement)).booleanValue();
+ result = ((Boolean)node.getClass().getField("$isGenerated").get(node)).booleanValue();
+ if (!result && node.getParent() != null && node.getParent() instanceof org.eclipse.jdt.core.dom.QualifiedName)
+ result = isGenerated(node.getParent());
} catch (Exception e) {
// better to assume it isn't generated
}
return result;
}
-
+
+ public static boolean returnFalse(java.lang.Object object) {
+ return false;
+ }
+
public static int fixRetrieveStartingCatchPosition(int original, int start) {
return original == -1 ? start : original;
}
@@ -216,4 +222,4 @@ public class PatchFixes {
return replace;
}
-}
+} \ No newline at end of file