mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
honor test generated sources in refresh (IDEA-158088)
This commit is contained in:
@@ -1523,9 +1523,13 @@ public class BuildManager implements Disposable {
|
||||
final CompilerConfiguration config = CompilerConfiguration.getInstance(project);
|
||||
for (Module module : compileContext.getCompileScope().getAffectedModules()) {
|
||||
if (config.getAnnotationProcessingConfiguration(module).isEnabled()) {
|
||||
final String path = CompilerPaths.getAnnotationProcessorsGenerationPath(module);
|
||||
if (path != null) {
|
||||
candidates.add(path);
|
||||
final String productionPath = CompilerPaths.getAnnotationProcessorsGenerationPath(module, false);
|
||||
if (productionPath != null) {
|
||||
candidates.add(productionPath);
|
||||
}
|
||||
final String testsPath = CompilerPaths.getAnnotationProcessorsGenerationPath(module, true);
|
||||
if (testsPath != null) {
|
||||
candidates.add(testsPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,10 +176,20 @@ public class CompilerPaths {
|
||||
return outPathUrl != null? VirtualFileManager.extractPath(outPathUrl) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return path to annotation-processors generated _production_ sources
|
||||
Use {@link #getAnnotationProcessorsGenerationPath(Module, boolean)}
|
||||
*/
|
||||
@Deprecated
|
||||
@Nullable
|
||||
public static String getAnnotationProcessorsGenerationPath(Module module) {
|
||||
return getAnnotationProcessorsGenerationPath(module, false);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getAnnotationProcessorsGenerationPath(Module module, boolean forTests) {
|
||||
final AnnotationProcessingConfiguration config = CompilerConfiguration.getInstance(module.getProject()).getAnnotationProcessingConfiguration(module);
|
||||
final String sourceDirName = config.getGeneratedSourcesDirectoryName(false);
|
||||
final String sourceDirName = config.getGeneratedSourcesDirectoryName(forTests);
|
||||
if (config.isOutputRelativeToContentRoot()) {
|
||||
final String[] roots = ModuleRootManager.getInstance(module).getContentRootUrls();
|
||||
if (roots.length == 0) {
|
||||
@@ -192,7 +202,7 @@ public class CompilerPaths {
|
||||
}
|
||||
|
||||
|
||||
final String path = getModuleOutputPath(module, false);
|
||||
final String path = getModuleOutputPath(module, forTests);
|
||||
if (path == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user