mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
external build: fix CompileScope::isAffected(BuildTarget,File) method for targets which need to be fully compiled
If all files from the passed build target are include into the compilation scope, the method should return 'true' even if the scope includes only some files from some other targets. This is needed to properly implement 'Validate JSP' action when JSP validation is performed as part of the external build process (see IDEA-206443). In that case JspValidationTarget takes output of an ArtifactTarget as its input, so in order to perform validation for selected files we create CompileScope which includes these files in ArtifactTarget and also includes the whole validation target.
This commit is contained in:
@@ -93,10 +93,13 @@ public class CompileScopeImpl extends CompileScope {
|
||||
@Override
|
||||
public boolean isAffected(BuildTarget<?> target, @NotNull File file) {
|
||||
if (myFiles.isEmpty()) {//optimization
|
||||
return isAffected(target);
|
||||
return isWholeTargetAffected(target);
|
||||
}
|
||||
final Set<File> files = myFiles.get(target);
|
||||
return files != null && files.contains(file);
|
||||
if (files == null) {
|
||||
return isWholeTargetAffected(target);
|
||||
}
|
||||
return files.contains(file);
|
||||
}
|
||||
|
||||
private boolean isAffectedByAssociatedModule(BuildTarget<?> target) {
|
||||
|
||||
Reference in New Issue
Block a user