mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[openapi] format CompilerPaths
GitOrigin-RevId: d2c3f3c31b7770e2792e2b7686c0ceb71f2e3755
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8ed129fde0
commit
8679ed6861
@@ -119,11 +119,13 @@ public class CompilerPaths {
|
||||
outPathUrl = ReadAction.compute(() -> extension.getCompilerOutputUrl());
|
||||
}
|
||||
}
|
||||
return outPathUrl != null? VirtualFileManager.extractPath(outPathUrl) : null;
|
||||
return outPathUrl != null ? VirtualFileManager.extractPath(outPathUrl) : null;
|
||||
}
|
||||
|
||||
public static @Nullable String getAnnotationProcessorsGenerationPath(Module module, boolean forTests) {
|
||||
final AnnotationProcessingConfiguration config = CompilerConfiguration.getInstance(module.getProject()).getAnnotationProcessingConfiguration(module);
|
||||
final AnnotationProcessingConfiguration config = CompilerConfiguration
|
||||
.getInstance(module.getProject())
|
||||
.getAnnotationProcessingConfiguration(module);
|
||||
final String sourceDirName = config.getGeneratedSourcesDirectoryName(forTests);
|
||||
if (config.isOutputRelativeToContentRoot()) {
|
||||
final String[] roots = ModuleRootManager.getInstance(module).getContentRootUrls();
|
||||
@@ -133,7 +135,9 @@ public class CompilerPaths {
|
||||
if (roots.length > 1) {
|
||||
Arrays.sort(roots);
|
||||
}
|
||||
return StringUtil.isEmpty(sourceDirName)? VirtualFileManager.extractPath(roots[0]): VirtualFileManager.extractPath(roots[0]) + "/" + sourceDirName;
|
||||
return StringUtil.isEmpty(sourceDirName)
|
||||
? VirtualFileManager.extractPath(roots[0])
|
||||
: VirtualFileManager.extractPath(roots[0]) + "/" + sourceDirName;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,13 +145,13 @@ public class CompilerPaths {
|
||||
if (path == null) {
|
||||
return null;
|
||||
}
|
||||
return StringUtil.isEmpty(sourceDirName)? path : path + "/" + sourceDirName;
|
||||
return StringUtil.isEmpty(sourceDirName) ? path : path + "/" + sourceDirName;
|
||||
}
|
||||
|
||||
public static String @NotNull [] getOutputPaths(Module @NotNull [] modules) {
|
||||
Set<String> outputPaths = new OrderedSet<>();
|
||||
for (Module module : modules) {
|
||||
CompilerModuleExtension compilerModuleExtension = !module.isDisposed()? CompilerModuleExtension.getInstance(module) : null;
|
||||
CompilerModuleExtension compilerModuleExtension = !module.isDisposed() ? CompilerModuleExtension.getInstance(module) : null;
|
||||
if (compilerModuleExtension == null) continue;
|
||||
|
||||
String outputPathUrl = compilerModuleExtension.getCompilerOutputUrl();
|
||||
@@ -174,4 +178,4 @@ public class CompilerPaths {
|
||||
}
|
||||
return ArrayUtilRt.toStringArray(outputPaths);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user