Skip to content

Commit 0e68cdf

Browse files
committed
Styling
1 parent d5e6c8c commit 0e68cdf

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

java/src/processing/mode/java/pdex/ASTGenerator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public boolean accept(File file) {
342342
}
343343
jdocMap.put(methodName, msg);
344344
}
345-
System.out.println("JDoc loaded " + jdocMap.size());
345+
//System.out.println("JDoc loaded " + jdocMap.size());
346346
}
347347

348348

@@ -1522,7 +1522,7 @@ protected static ASTNode findClosestNode(int lineNumber, ASTNode node) {
15221522
} else if (parent instanceof Block) {
15231523
nodes = ((Block) parent).statements();
15241524
} else {
1525-
System.err.println("findClosestNode() found " + getNodeAsString(parent));
1525+
log("findClosestNode() found " + getNodeAsString(parent));
15261526
return null;
15271527
}
15281528

java/src/processing/mode/java/pdex/ErrorCheckerService.java

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)