From 87b635ba86ff554e9354862a317f8633c7ccac68 Mon Sep 17 00:00:00 2001 From: "peter.gromov" Date: Mon, 8 Nov 2010 17:56:33 +0300 Subject: [PATCH] more reliable GDSL script execution --- .../jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java index 9737415a4445..72386f54f859 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/dsl/GroovyDslFileIndex.java @@ -237,9 +237,8 @@ public class GroovyDslFileIndex extends ScalarIndexExtension { final long stamp = vfile.getModificationStamp(); final GroovyDslExecutor cached = getCachedExecutor(vfile, stamp); if (cached == null) { - if (scheduleParsing(queue, project, vfile, stamp, psiFile.getText())) { - count++; - } + scheduleParsing(queue, project, vfile, stamp, psiFile.getText()); + count++; } else { result.add(new GroovyDslScript(project, vfile, cached)); @@ -281,7 +280,7 @@ public class GroovyDslFileIndex extends ScalarIndexExtension { } } - private static boolean scheduleParsing(final LinkedBlockingQueue> queue, + private static void scheduleParsing(final LinkedBlockingQueue> queue, final Project project, final VirtualFile vfile, final long stamp, @@ -319,10 +318,8 @@ public class GroovyDslFileIndex extends ScalarIndexExtension { if (isNewRequest) { ourPool.execute(parseScript); //todo bring back multithreading when Groovy team fixes http://jira.codehaus.org/browse/GROOVY-4292 //ApplicationManager.getApplication().executeOnPooledThread(parseScript); - return true; } } - return false; } private static volatile boolean stopGdsl = false;