From 62630487be923bac948e191b9e45693a9817dc38 Mon Sep 17 00:00:00 2001 From: Manindra Moharana Date: Thu, 5 Jun 2014 21:39:47 +0530 Subject: [PATCH] Added a 2nd CU --- .../mode/experimental/ErrorCheckerService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pdex/src/processing/mode/experimental/ErrorCheckerService.java b/pdex/src/processing/mode/experimental/ErrorCheckerService.java index 20ba28a7e..757be96ca 100644 --- a/pdex/src/processing/mode/experimental/ErrorCheckerService.java +++ b/pdex/src/processing/mode/experimental/ErrorCheckerService.java @@ -135,7 +135,7 @@ public class ErrorCheckerService implements Runnable{ /** * Compilation Unit for current sketch */ - protected CompilationUnit cu; + protected CompilationUnit cu, lastCorrectCu; /** * If true, compilation checker will be reloaded with updated classpath @@ -535,10 +535,10 @@ public class ErrorCheckerService implements Runnable{ if (problems.length == 0) { syntaxErrors.set(false); containsErrors.set(false); - //lastCorrectCu = cu; + lastCorrectCu = cu; } else { CompilationUnit cuTemp = null; - //lastCorrectCu = cuTemp; + lastCorrectCu = cuTemp; syntaxErrors.set(true); containsErrors.set(true); } @@ -567,8 +567,8 @@ public class ErrorCheckerService implements Runnable{ cu = (CompilationUnit) parser.createAST(null); else { synchronized (cu) { - //if (!hasSyntaxErrors()) - cu = (CompilationUnit) parser.createAST(null); + if (!hasSyntaxErrors()) + cu = (CompilationUnit) parser.createAST(null); } } compilationUnitState = 2;