Added a 2nd CU

This commit is contained in:
Manindra Moharana
2014-06-05 21:39:47 +05:30
parent f983628f59
commit 62630487be

View File

@@ -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;