final Set<File> outputs = new HashSet<File>();
final Module[] affectedModules = compileContext.getCompileScope().getAffectedModules();
for (final String path : CompilerPathsEx.getOutputPaths(affectedModules)) {
outputs.add(new File(path));
}
final LocalFileSystem lfs = LocalFileSystem.getInstance();
if (!outputs.isEmpty()) {
final ProgressIndicator indicator = compileContext.getProgressIndicator();
indicator.setText("Synchronizing output directories...");
CompilerUtil.refreshOutputDirectories(outputs, _status == ExitStatus.CANCELLED);
indicator.setText("");
}
if (compileContext.isAnnotationProcessorsEnabled() && !myProject.isDisposed()) {
final Set<File> genSourceRoots = new THashSet<File>(FileUtil.FILE_HASHING_STRATEGY);
final CompilerConfiguration config = CompilerConfiguration.getInstance(myProject);
for (Module module : affectedModules) {
if (config.getAnnotationProcessingConfiguration(module).isEnabled()) {
final String path = CompilerPaths.getAnnotationProcessorsGenerationPath(module);
if (path != null) {
genSourceRoots.add(new File(path));
}
}
}
if (!genSourceRoots.isEmpty()) {
// refresh generates source roots asynchronously; needed for error highlighting update
lfs.refreshIoFiles(genSourceRoots, true, true, null);
}
}
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {