/** @generated */ public void notifyChanged(Notification notification) { if (notification.getNotifier() instanceof ResourceSet) { super.notifyChanged(notification); } if (!notification.isTouch() && myModifiedFilter.matches(notification)) { if (notification.getNotifier() instanceof Resource) { Resource resource = (Resource) notification.getNotifier(); if (resource.isLoaded()) { boolean modified = false; for (Iterator /*<org.eclipse.emf.ecore.resource.Resource>*/ it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified; ) { Resource nextResource = (Resource) it.next(); if (nextResource.isLoaded()) { modified = nextResource.isModified(); } } boolean dirtyStateChanged = false; synchronized (myInfo) { if (modified != myInfo.fCanBeSaved) { myInfo.fCanBeSaved = modified; dirtyStateChanged = true; } } if (dirtyStateChanged) { fireElementDirtyStateChanged(myInfo.getEditorInput(), modified); if (!modified) { myInfo.setModificationStamp(computeModificationStamp(myInfo)); } } } } } }
public void notifyChanged(Notification notification) { if (diagramResourceModifiedFilter.matches(notification)) { Object value = notification.getNewValue(); if (value instanceof Resource) { ((Resource) value).setTrackingModification(true); } } }