mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (dead code; docs; formatting)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -36,14 +36,13 @@ import java.util.*;
|
||||
* Date: 9/30/11
|
||||
*/
|
||||
public class ProjectPaths {
|
||||
private ProjectPaths() {
|
||||
}
|
||||
private ProjectPaths() { }
|
||||
|
||||
@NotNull
|
||||
public static Collection<File> getCompilationClasspathFiles(ModuleChunk chunk,
|
||||
boolean includeTests,
|
||||
final boolean excludeMainModuleOutput,
|
||||
final boolean exportedOnly) {
|
||||
boolean includeTests,
|
||||
boolean excludeMainModuleOutput,
|
||||
boolean exportedOnly) {
|
||||
return getClasspathFiles(chunk, JpsJavaClasspathKind.compile(includeTests), excludeMainModuleOutput, ClasspathPart.WHOLE, exportedOnly);
|
||||
}
|
||||
|
||||
@@ -65,9 +64,10 @@ public class ProjectPaths {
|
||||
|
||||
@NotNull
|
||||
private static Collection<File> getClasspathFiles(ModuleChunk chunk,
|
||||
JpsJavaClasspathKind kind,
|
||||
final boolean excludeMainModuleOutput,
|
||||
ClasspathPart classpathPart, final boolean exportedOnly) {
|
||||
JpsJavaClasspathKind kind,
|
||||
boolean excludeMainModuleOutput,
|
||||
ClasspathPart classpathPart,
|
||||
boolean exportedOnly) {
|
||||
final Set<File> files = new LinkedHashSet<File>();
|
||||
for (JpsModule module : chunk.getModules()) {
|
||||
JpsJavaDependenciesEnumerator enumerator = JpsJavaExtensionService.dependencies(module).includedIn(kind).recursively();
|
||||
@@ -108,9 +108,7 @@ public class ProjectPaths {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param chunk
|
||||
* @return mapping "sourceRoot" -> "package prefix" Package prefix uses slashes instead of dots and ends with trailing slash
|
||||
* Returns a mapping "sourceRoot" -> "package prefix". A package prefix uses slashes instead of dots and ends with a trailing slash.
|
||||
*/
|
||||
@NotNull
|
||||
public static Map<File, String> getSourceRootsWithDependents(ModuleChunk chunk) {
|
||||
@@ -152,10 +150,6 @@ public class ProjectPaths {
|
||||
return sourcePaths;
|
||||
}
|
||||
|
||||
public static Set<JpsModule> getModulesWithDependentsRecursively(final JpsModule module, final boolean includeTests) {
|
||||
return JpsJavaExtensionService.dependencies(module).includedIn(JpsJavaClasspathKind.compile(includeTests)).recursively().getModules();
|
||||
}
|
||||
|
||||
private static void processModulesRecursively(ModuleChunk chunk, JpsJavaClasspathKind kind, Consumer<JpsModule> processor) {
|
||||
JpsJavaExtensionService.getInstance().enumerateDependencies(chunk.getModules()).includedIn(kind).recursively().processModules(processor);
|
||||
}
|
||||
@@ -234,14 +228,11 @@ public class ProjectPaths {
|
||||
}
|
||||
|
||||
private static class ModuleSourceElementsFilter implements Condition<JpsDependencyElement> {
|
||||
|
||||
private ModuleSourceElementsFilter() {
|
||||
}
|
||||
private ModuleSourceElementsFilter() { }
|
||||
|
||||
@Override
|
||||
public boolean value(JpsDependencyElement dependency) {
|
||||
return dependency instanceof JpsModuleDependency || dependency instanceof JpsModuleSourceDependency;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user