Is there a way to add a library to a global or project list from inside a plugin? I've tried to do it by using
Library lib = LibraryTableUtil.getLibraryTable().getModifiableModel().createLibrary("somename");
where vf is the instance of VirtualFile pointing to a class jar.
But this does not seem to work. Anything I am doing wrong?