public void run() {
final ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel();
final Library library = model.getModuleLibraryTable().createLibrary();
final Library.ModifiableModel libModel = library.getModifiableModel();
libModel.addRoot(root, OrderRootType.CLASSES);
<BUG>libModel.commit();
model.commit();</BUG>
}
});
}

public void run() {
final ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel();
final Library library = model.getModuleLibraryTable().createLibrary();
final Library.ModifiableModel libModel = library.getModifiableModel();
libModel.addRoot(root, OrderRootType.CLASSES);
libModel.commit();
model.getContentEntries()[0].addExcludeFolder(root);
model.commit();
}
});
}
