mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
JPS dependencies enumerator: convenient method added
This commit is contained in:
@@ -142,7 +142,7 @@ public class FSOperations {
|
||||
}
|
||||
|
||||
private static Set<JpsModule> getDependentModulesRecursively(final JpsModule module, final JpsJavaClasspathKind kind) {
|
||||
return JpsJavaExtensionService.dependencies(module).includedIn(kind).recursively().exportedOnly().getModules();
|
||||
return JpsJavaExtensionService.dependencies(module).includedIn(kind).recursivelyExportedOnly().getModules();
|
||||
}
|
||||
|
||||
public static void processFilesToRecompile(CompileContext context, ModuleChunk chunk, FileProcessor<JavaSourceRootDescriptor, ModuleBuildTarget> processor) throws IOException {
|
||||
|
||||
@@ -36,6 +36,9 @@ public interface JpsJavaDependenciesEnumerator extends JpsDependenciesEnumerator
|
||||
@Override
|
||||
JpsJavaDependenciesEnumerator recursively();
|
||||
|
||||
JpsJavaDependenciesEnumerator recursivelyExportedOnly();
|
||||
|
||||
|
||||
@Override
|
||||
JpsJavaDependenciesEnumerator satisfying(Condition<JpsDependencyElement> condition);
|
||||
|
||||
|
||||
+5
@@ -73,6 +73,11 @@ public class JpsJavaDependenciesEnumeratorImpl extends JpsDependenciesEnumerator
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesEnumerator recursivelyExportedOnly() {
|
||||
return recursively().exportedOnly();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JpsJavaDependenciesEnumerator includedIn(JpsJavaClasspathKind classpathKind) {
|
||||
myClasspathKind = classpathKind;
|
||||
|
||||
@@ -177,7 +177,7 @@ public class JpsDependenciesEnumeratorTest extends JpsJavaModelTestCase {
|
||||
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk(), getAsmJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursively(), getAsmJar(), getJDomJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursively().exportedOnly(), getAsmJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().recursivelyExportedOnly(), getAsmJar());
|
||||
assertClassRoots(orderEntries(myModule).withoutSdk().exportedOnly().recursively());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user