Ejemplo n.º 1
0
  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);
    }
  }
Ejemplo n.º 2
0
 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();
 }