void (final ModifiableRootModel rootModel, final Collection<? super String> unknownLibraries, final boolean exported, final String name, final boolean applicationLevel) { Library lib = findLibraryByName(myProject, name); if (lib != null) { rootModel.addLibraryEntry(lib).setExported(exported); } else { unknownLibraries.add(name); rootModel.addInvalidLibrary(name, applicationLevel ? LibraryTablesRegistrar.APPLICATION_LEVEL : LibraryTablesRegistrar.PROJECT_LEVEL).setExported(exported); } }