@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()); }
@Override public void attach(@NotNull SRepository repository) { super.attach(repository); if (myDescriptorFile != null) { myFileSystem.addListener(this); } initFacetsAndModels(); }
@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(); }