Пример #1
0
  @Override
  public void reloadFromSource() {
    assertCanChange();

    if (getSource().getTimestamp() == -1) {
      SModuleBase module = (SModuleBase) getModule();
      if (module != null) {
        module.unregisterModel(this);
      }
      return;
    }

    reloadContents();
    updateTimestamp();
    LOG.assertLog(!needsReloading());
  }
Пример #2
0
 @Override
 public void attach(@NotNull SRepository repository) {
   super.attach(repository);
   if (myDescriptorFile != null) {
     myFileSystem.addListener(this);
   }
   initFacetsAndModels();
 }
Пример #3
0
 @Override
 public void dispose() {
   assertCanChange();
   LOG.trace("Disposing the module " + this);
   myFileSystem.removeListener(this);
   for (ModuleFacetBase f : myFacets) {
     f.dispose();
   }
   myFacets.clear();
   for (ModelRoot m : mySModelRoots) {
     ((ModelRootBase) m).dispose();
   }
   mySModelRoots.clear();
   super.dispose();
 }