mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
deprecated methods removed
This commit is contained in:
@@ -8,28 +8,19 @@ import com.intellij.util.PathsList;
|
||||
/**
|
||||
* @author nik
|
||||
*/
|
||||
@SuppressWarnings({"deprecation"})
|
||||
public class OrderEntriesTest extends ModuleRootManagerTestCase {
|
||||
public void testLibrary() throws Exception {
|
||||
ModuleRootModificationUtil.addDependency(myModule, createJDomLibrary());
|
||||
assertOrderFiles(OrderRootType.CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.SOURCES, getJDomSources());
|
||||
assertOrderFiles(OrderRootType.CLASSES_AND_OUTPUT, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.COMPILATION_CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.PRODUCTION_COMPILATION_CLASSES, getRtJar(), getJDomJar());
|
||||
}
|
||||
|
||||
public void testModuleSources() throws Exception {
|
||||
final VirtualFile srcRoot = addSourceRoot(myModule, false);
|
||||
final VirtualFile testRoot = addSourceRoot(myModule, true);
|
||||
final VirtualFile output = setModuleOutput(myModule, false);
|
||||
final VirtualFile testOutput = setModuleOutput(myModule, true);
|
||||
|
||||
assertOrderFiles(OrderRootType.CLASSES, getRtJar());
|
||||
assertOrderFiles(OrderRootType.SOURCES, srcRoot, testRoot);
|
||||
assertOrderFiles(OrderRootType.CLASSES_AND_OUTPUT, getRtJar(), testOutput, output);
|
||||
assertOrderFiles(OrderRootType.COMPILATION_CLASSES, getRtJar(), testOutput, output);
|
||||
assertOrderFiles(OrderRootType.PRODUCTION_COMPILATION_CLASSES, getRtJar(), output);
|
||||
}
|
||||
|
||||
public void testLibraryScope() throws Exception {
|
||||
@@ -37,25 +28,17 @@ public class OrderEntriesTest extends ModuleRootManagerTestCase {
|
||||
|
||||
assertOrderFiles(OrderRootType.CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.SOURCES, getJDomSources());
|
||||
assertOrderFiles(OrderRootType.CLASSES_AND_OUTPUT, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.COMPILATION_CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.PRODUCTION_COMPILATION_CLASSES, getRtJar());
|
||||
}
|
||||
|
||||
public void testModuleDependency() throws Exception {
|
||||
final Module dep = createModule("dep");
|
||||
final VirtualFile srcRoot = addSourceRoot(dep, false);
|
||||
final VirtualFile testRoot = addSourceRoot(dep, true);
|
||||
final VirtualFile output = setModuleOutput(dep, false);
|
||||
final VirtualFile testOutput = setModuleOutput(dep, true);
|
||||
ModuleRootModificationUtil.addDependency(dep, createJDomLibrary(), DependencyScope.COMPILE, true);
|
||||
ModuleRootModificationUtil.addDependency(myModule, dep, DependencyScope.COMPILE, false);
|
||||
|
||||
assertOrderFiles(OrderRootType.CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.SOURCES, srcRoot, testRoot, getJDomSources());
|
||||
assertOrderFiles(OrderRootType.CLASSES_AND_OUTPUT, getRtJar(), testOutput, output, getJDomJar());
|
||||
assertOrderFiles(OrderRootType.COMPILATION_CLASSES, getRtJar(), testOutput, output, getJDomJar());
|
||||
assertOrderFiles(OrderRootType.PRODUCTION_COMPILATION_CLASSES, getRtJar(), output, getJDomJar());
|
||||
}
|
||||
|
||||
public void testModuleDependencyScope() throws Exception {
|
||||
@@ -65,9 +48,6 @@ public class OrderEntriesTest extends ModuleRootManagerTestCase {
|
||||
|
||||
assertOrderFiles(OrderRootType.CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.SOURCES, getJDomSources());
|
||||
assertOrderFiles(OrderRootType.CLASSES_AND_OUTPUT, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.COMPILATION_CLASSES, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.PRODUCTION_COMPILATION_CLASSES, getRtJar());
|
||||
}
|
||||
|
||||
public void testNotExportedLibraryDependency() throws Exception {
|
||||
@@ -77,9 +57,6 @@ public class OrderEntriesTest extends ModuleRootManagerTestCase {
|
||||
|
||||
assertOrderFiles(OrderRootType.CLASSES, getRtJar());
|
||||
assertOrderFiles(OrderRootType.SOURCES);
|
||||
assertOrderFiles(OrderRootType.CLASSES_AND_OUTPUT, getRtJar(), getJDomJar());
|
||||
assertOrderFiles(OrderRootType.COMPILATION_CLASSES, getRtJar());
|
||||
assertOrderFiles(OrderRootType.PRODUCTION_COMPILATION_CLASSES, getRtJar());
|
||||
}
|
||||
|
||||
private void assertOrderFiles(final OrderRootType type, VirtualFile... files) {
|
||||
@@ -88,15 +65,6 @@ public class OrderEntriesTest extends ModuleRootManagerTestCase {
|
||||
|
||||
private PathsList collectByOrderEnumerator(OrderRootType type) {
|
||||
final OrderEnumerator base = OrderEnumerator.orderEntries(myModule);
|
||||
if (type == OrderRootType.CLASSES_AND_OUTPUT) {
|
||||
return base.compileOnly().recursively().getPathsList();
|
||||
}
|
||||
if (type == OrderRootType.COMPILATION_CLASSES) {
|
||||
return base.recursively().exportedOnly().getPathsList();
|
||||
}
|
||||
if (type == OrderRootType.PRODUCTION_COMPILATION_CLASSES) {
|
||||
return base.productionOnly().compileOnly().recursively().exportedOnly().getPathsList();
|
||||
}
|
||||
if (type == OrderRootType.CLASSES) {
|
||||
return base.withoutModuleSourceEntries().recursively().exportedOnly().getPathsList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user