mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
allow to add directories as library classes in tests
This commit is contained in:
@@ -257,7 +257,12 @@ import java.util.Collection;
|
||||
jar = "/" + jar;
|
||||
}
|
||||
final String path = libPath + jar;
|
||||
final VirtualFile root = JarFileSystem.getInstance().refreshAndFindFileByPath(path + "!/");
|
||||
VirtualFile root;
|
||||
if (path.endsWith(".jar")) {
|
||||
root = JarFileSystem.getInstance().refreshAndFindFileByPath(path + "!/");
|
||||
} else {
|
||||
root = LocalFileSystem.getInstance().refreshAndFindFileByPath(path);
|
||||
}
|
||||
assert root != null : "Library root folder not found: " + path + "!/";
|
||||
libraryModel.addRoot(root, OrderRootType.CLASSES);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user