private void readProperties(Element element) {
    final String typeId = element.getAttributeValue(LIBRARY_TYPE_ATTR);
    if (typeId == null) return;

    myKind = (PersistentLibraryKind<?>) LibraryKind.findById(typeId);
    if (myKind == null) return;

    myProperties = myKind.createDefaultProperties();
    final Element propertiesElement = element.getChild(PROPERTIES_ELEMENT);
    if (propertiesElement != null) {
      ComponentSerializationUtil.loadComponentState(myProperties, propertiesElement);
    }
  }
 LibraryImpl(LibraryTable table, Element element, ModifiableRootModel rootModel)
     throws InvalidDataException {
   this(
       table,
       rootModel,
       null,
       element.getAttributeValue(LIBRARY_NAME_ATTR),
       (PersistentLibraryKind<?>)
           LibraryKind.findById(element.getAttributeValue(LIBRARY_TYPE_ATTR)));
   readProperties(element);
   myJarDirectories.readExternal(element);
   readRoots(element);
   myRootsWatcher.updateWatchedRoots();
 }
/** Created by IntelliJ IDEA. User: Jon S Akhtar Date: 8/24/12 Time: 6:09 PM */
public interface LuaLibrary {
  String LUA_LIBRARY_TYPE_ID = "Lua";
  String LUA_LIBRARY_CATEGORY_NAME = "Lua";
  String LUA_LIBRARY_KIND_ID = "Lua";
  LibraryKind KIND = LibraryKind.create(LUA_LIBRARY_KIND_ID);
}