AssertionError when checking if compile scope is up-to-date

Hi,

I'm facing a strange problem : when I run my plugin under the sandbox environment, everything works. But in the real mode, aka when the plugin is deployed through the plugin manager or unzipped into the config/plugins directory, checking if the compilation status is up-to-date throws an error. Here's my snippet :

final CompilerManager compilerManager = CompilerManager.getInstance(project); final VirtualFile[] files = {virtualFile}; final CompileScope compileScope = compilerManager.createFilesCompileScope(files);
if (outputDirectory != null && compilerManager.isUpToDate(compileScope)) {
...
}



It throws the following error when not run in sandbox mode :

null java.lang.AssertionError      at com.intellij.openapi.project.DumbServiceImpl.waitForSmartMode(DumbServiceImpl.java:251)      at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:1863)      at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:1241)      at com.intellij.compiler.impl.CompileDriver.a(CompileDriver.java:751)



The complete source may be found here.

What am I doing wrong ? Dumb mode seems to be when IDEA is indexing files, but that's not the case here.

Thanks !
0
1 comment

Ok, the problem was that the up-to-date check was made from the dispatch thread. Fixed.

0

Please sign in to leave a comment.