void (String path, LibraryEditor libraryEditor) { File lib = new File(path + "/lib"); File[] jars = lib.exists() ? lib.listFiles() : new File[0]; if (jars != null) { for (File file : jars) { if (file.getName().endsWith(".jar")) { libraryEditor.addRoot(VfsUtil.getUrlForLibraryRoot(file), OrderRootType.CLASSES); } } } }