mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more reliable GDSL script execution
This commit is contained in:
@@ -237,9 +237,8 @@ public class GroovyDslFileIndex extends ScalarIndexExtension<String> {
|
||||
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<String> {
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean scheduleParsing(final LinkedBlockingQueue<Pair<VirtualFile, GroovyDslExecutor>> queue,
|
||||
private static void scheduleParsing(final LinkedBlockingQueue<Pair<VirtualFile, GroovyDslExecutor>> queue,
|
||||
final Project project,
|
||||
final VirtualFile vfile,
|
||||
final long stamp,
|
||||
@@ -319,10 +318,8 @@ public class GroovyDslFileIndex extends ScalarIndexExtension<String> {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user