Пример #1
0
 @Override
 public void readExternal(Element element) throws InvalidDataException {
   readName(element);
   readProperties(element);
   readRoots(element);
   myJarDirectories.readExternal(element);
   myRootsWatcher.updateWatchedRoots();
 }
Пример #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();
 }
Пример #3
0
 private void commit(@NotNull LibraryImpl fromModel) {
   if (myLibraryTable != null) {
     ApplicationManager.getApplication().assertWriteAccessAllowed();
   }
   if (!Comparing.equal(fromModel.myName, myName)) {
     myName = fromModel.myName;
     if (myLibraryTable instanceof LibraryTableBase) {
       ((LibraryTableBase) myLibraryTable).fireLibraryRenamed(this);
     }
   }
   myKind = fromModel.getKind();
   myProperties = fromModel.myProperties;
   if (areRootsChanged(fromModel)) {
     disposeMyPointers();
     copyRootsFrom(fromModel);
     myJarDirectories.copyFrom(fromModel.myJarDirectories);
     myRootsWatcher.updateWatchedRoots();
     myRootProvider.fireRootSetChanged();
   }
 }