| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -342,7 +342,7 @@ public boolean accept(File file) { | |||
| 342 | 342 | } | |
| 343 | 343 | jdocMap.put(methodName, msg); | |
| 344 | 344 | } | |
| 345 | - System.out.println("JDoc loaded " + jdocMap.size()); | ||
| 345 | + //System.out.println("JDoc loaded " + jdocMap.size()); | ||
| 346 | 346 | } | |
| 347 | 347 | ||
| 348 | 348 | ||
@@ -1522,7 +1522,7 @@ protected static ASTNode findClosestNode(int lineNumber, ASTNode node) { | |||
| 1522 | 1522 | } else if (parent instanceof Block) { | |
| 1523 | 1523 | nodes = ((Block) parent).statements(); | |
| 1524 | 1524 | } else { | |
| 1525 | - System.err.println("findClosestNode() found " + getNodeAsString(parent)); | ||
| 1525 | + log("findClosestNode() found " + getNodeAsString(parent)); | ||
| 1526 | 1526 | return null; | |
| 1527 | 1527 | } | |
| 1528 | 1528 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -112,12 +112,12 @@ public class ErrorCheckerService { | |||
| 112 | 112 | /** | |
| 113 | 113 | * URLs of extra imports jar files stored here. | |
| 114 | 114 | */ | |
| 115 | - protected URL[] classPath; | ||
| 115 | + protected URL[] classPath = {}; | ||
| 116 | 116 | ||
| 117 | 117 | /** | |
| 118 | - * Stores all Problems in the sketch | ||
| 118 | + * Class loader used by compiler check and ASTGenerator, based on classPath | ||
| 119 | 119 | */ | |
| 120 | - //public List<Problem> problemsList; | ||
| 120 | + protected URLClassLoader classLoader = new URLClassLoader(classPath); | ||
| 121 | 121 | ||
| 122 | 122 | /** | |
| 123 | 123 | * How many lines are present till the initial class declaration? In static | |
@@ -165,6 +165,11 @@ public class ErrorCheckerService { | |||
| 165 | 165 | */ | |
| 166 | 166 | protected final XQPreprocessor xqpreproc; | |
| 167 | 167 | ||
| 168 | + /** | ||
| 169 | + * ASTGenerator for operations on AST | ||
| 170 | + */ | ||
| 171 | + protected final ASTGenerator astGenerator; | ||
| 172 | + | ||
| 168 | 173 | /** | |
| 169 | 174 | * Regexp for import statements. (Used from Processing source) | |
| 170 | 175 | */ | |
@@ -180,10 +185,11 @@ public ErrorCheckerService(JavaEditor debugEditor) { | |||
| 180 | 185 | ||
| 181 | 186 | /** | |
| 182 | 187 | * Error checking doesn't happen before this interval has ellapsed since the | |
| 183 | - * last runManualErrorCheck() call. | ||
| 188 | + * last request() call. | ||
| 184 | 189 | */ | |
| 185 | 190 | private final static long errorCheckInterval = 650; | |
| 186 | 191 | ||
| 192 | + protected volatile CodeCheckResult lastCodeCheckResult = new CodeCheckResult(); | ||
| 187 | 193 | ||
| 188 | 194 | private Thread errorCheckerThread; | |
| 189 | 195 | private final BlockingQueue<Boolean> requestQueue = new ArrayBlockingQueue<>(1); | |
@@ -286,6 +292,7 @@ public void start() { | |||
| 286 | 292 | errorCheckerThread.start(); | |
| 287 | 293 | } | |
| 288 | 294 | ||
| 295 | + | ||
| 289 | 296 | public void stop() { | |
| 290 | 297 | cancel(); | |
| 291 | 298 | running = false; | |
@@ -332,8 +339,6 @@ protected void checkForMissingImports(CodeCheckResult result) { | |||
| 332 | 339 | } | |
| 333 | 340 | ||
| 334 | 341 | ||
| 335 | - protected final ASTGenerator astGenerator; | ||
| 336 | - | ||
| 337 | 342 | public ASTGenerator getASTGenerator() { | |
| 338 | 343 | return astGenerator; | |
| 339 | 344 | } | |
@@ -488,8 +493,6 @@ protected CodeCheckResult checkCode() { | |||
| 488 | 493 | return result; | |
| 489 | 494 | } | |
| 490 | 495 | ||
| 491 | - protected volatile CodeCheckResult lastCodeCheckResult = new CodeCheckResult(); | ||
| 492 | - | ||
| 493 | 496 | public boolean hasSyntaxErrors(){ | |
| 494 | 497 | return lastCodeCheckResult.syntaxErrors; | |
| 495 | 498 | } | |
@@ -498,8 +501,6 @@ public boolean hasErrors(){ | |||
| 498 | 501 | return lastCodeCheckResult.containsErrors; | |
| 499 | 502 | } | |
| 500 | 503 | ||
| 501 | - protected URLClassLoader classLoader; | ||
| 502 | - | ||
| 503 | 504 | /** | |
| 504 | 505 | * Performs compiler error check. | |
| 505 | 506 | * @param sourceName - name of the class | |
| Back | FazBrowse Home | New Git URL |
0 commit comments