aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse/agent
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2011-08-16 02:04:59 +0200
committerRoel Spilker <r.spilker@gmail.com>2011-08-16 02:04:59 +0200
commit85c90ca606869d42be64d513b2a6f829712dbe27 (patch)
tree80f36ffbff94b292286087d70cb5dbd6a7968fbe /src/eclipseAgent/lombok/eclipse/agent
parent19e6b008856748bc6a9322b1b542e8a2e7f99017 (diff)
downloadlombok-85c90ca606869d42be64d513b2a6f829712dbe27.tar.gz
lombok-85c90ca606869d42be64d513b2a6f829712dbe27.tar.bz2
lombok-85c90ca606869d42be64d513b2a6f829712dbe27.zip
Removed some leftovers from #164 debugging sessions
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse/agent')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java15
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java20
2 files changed, 0 insertions, 35 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
index c49346bc..0ac62c79 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java
@@ -86,7 +86,6 @@ public class EclipsePatcher extends Agent {
patchRetrieveEllipsisStartPosition(sm);
patchSetGeneratedFlag(sm);
patchHideGeneratedNodes(sm);
- patchLiveDebug(sm);
patchPostCompileHookEclipse(sm);
patchFixSourceTypeConverter(sm);
} else {
@@ -236,20 +235,6 @@ public class EclipsePatcher extends Agent {
.transplant().build());
}
- /**
- * XXX LIVE DEBUG
- *
- * Adds patches to improve error reporting in cases of extremely rare bugs that are hard to reproduce. These should be removed
- * once the issue has been solved!
- */
- private static void patchLiveDebug(ScriptManager sm) {
- sm.addScript(ScriptBuilder.exitEarly()
- .target(new MethodTarget(
- "org.eclipse.jdt.internal.compiler.ast.MethodDeclaration", "resolveStatements", "void"))
- .decisionMethod(new Hook("lombok.eclipse.agent.PatchFixes", "debugPrintStateOfScope", "boolean", "java.lang.Object"))
- .request(StackRequest.THIS).build());
- }
-
private static void patchAvoidReparsingGeneratedCode(ScriptManager sm) {
final String PARSER_SIG = "org.eclipse.jdt.internal.compiler.parser.Parser";
sm.addScript(ScriptBuilder.exitEarly()
diff --git a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
index 4c2b088d..949cf711 100644
--- a/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
+++ b/src/eclipseAgent/lombok/eclipse/agent/PatchFixes.java
@@ -58,26 +58,6 @@ public class PatchFixes {
return (bits & ALREADY_PROCESSED_FLAG) != 0;
}
- /**
- * XXX LIVE DEBUG
- *
- * Once in a blue moon eclipse throws a NullPointerException while editing a file. Can't reproduce it while running eclipse in a debugger,
- * but at least this way we patch the problem to be a bit more specific in the error that should then appear.
- */
- public static boolean debugPrintStateOfScope(Object in) throws Exception {
- /* this.scope.enclosingSourceType().sourceName */
- Object scope = in.getClass().getField("scope").get(in);
- String msg = null;
- if (scope == null) msg = "scope itself is null";
- else {
- Object sourceTypeBinding = scope.getClass().getMethod("enclosingSourceType").invoke(scope);
- if (sourceTypeBinding == null) msg = "scope.enclosingSourceType() is null";
- }
-
- if (msg != null) throw new NullPointerException(msg);
- return false;
- }
-
public static boolean skipRewritingGeneratedNodes(org.eclipse.jdt.core.dom.ASTNode node) throws Exception {
return ((Boolean)node.getClass().getField("$isGenerated").get(node)).booleanValue();
}