@@ -112,12 +112,12 @@ public class ErrorCheckerService {
112112 /**
113113 * URLs of extra imports jar files stored here.
114114 */
115- protected URL [] classPath ;
115+ protected URL [] classPath = {} ;
116116
117117 /**
118- * Stores all Problems in the sketch
118+ * Class loader used by compiler check and ASTGenerator, based on classPath
119119 */
120- //public List<Problem> problemsList ;
120+ protected URLClassLoader classLoader = new URLClassLoader ( classPath ) ;
121121
122122 /**
123123 * How many lines are present till the initial class declaration? In static
@@ -165,6 +165,11 @@ public class ErrorCheckerService {
165165 */
166166 protected final XQPreprocessor xqpreproc ;
167167
168+ /**
169+ * ASTGenerator for operations on AST
170+ */
171+ protected final ASTGenerator astGenerator ;
172+
168173 /**
169174 * Regexp for import statements. (Used from Processing source)
170175 */
@@ -180,10 +185,11 @@ public ErrorCheckerService(JavaEditor debugEditor) {
180185
181186 /**
182187 * Error checking doesn't happen before this interval has ellapsed since the
183- * last runManualErrorCheck () call.
188+ * last request () call.
184189 */
185190 private final static long errorCheckInterval = 650 ;
186191
192+ protected volatile CodeCheckResult lastCodeCheckResult = new CodeCheckResult ();
187193
188194 private Thread errorCheckerThread ;
189195 private final BlockingQueue <Boolean > requestQueue = new ArrayBlockingQueue <>(1 );
@@ -286,6 +292,7 @@ public void start() {
286292 errorCheckerThread .start ();
287293 }
288294
295+
289296 public void stop () {
290297 cancel ();
291298 running = false ;
@@ -332,8 +339,6 @@ protected void checkForMissingImports(CodeCheckResult result) {
332339 }
333340
334341
335- protected final ASTGenerator astGenerator ;
336-
337342 public ASTGenerator getASTGenerator () {
338343 return astGenerator ;
339344 }
@@ -488,8 +493,6 @@ protected CodeCheckResult checkCode() {
488493 return result ;
489494 }
490495
491- protected volatile CodeCheckResult lastCodeCheckResult = new CodeCheckResult ();
492-
493496 public boolean hasSyntaxErrors (){
494497 return lastCodeCheckResult .syntaxErrors ;
495498 }
@@ -498,8 +501,6 @@ public boolean hasErrors(){
498501 return lastCodeCheckResult .containsErrors ;
499502 }
500503
501- protected URLClassLoader classLoader ;
502-
503504 /**
504505 * Performs compiler error check.
505506 * @param sourceName - name of the class
0 commit comments