Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOModificationTrackingAdapter.java')
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOModificationTrackingAdapter.java31
1 files changed, 19 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOModificationTrackingAdapter.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOModificationTrackingAdapter.java
index 77156a8c63..5fa463fbb2 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOModificationTrackingAdapter.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/util/CDOModificationTrackingAdapter.java
@@ -10,6 +10,7 @@
*/
package org.eclipse.emf.cdo.util;
+import org.eclipse.emf.cdo.CDONotification;
import org.eclipse.emf.cdo.eresource.CDOResource;
import org.eclipse.emf.cdo.eresource.EresourcePackage;
import org.eclipse.emf.cdo.transaction.CDOCommitContext;
@@ -58,23 +59,29 @@ public class CDOModificationTrackingAdapter extends CDOLazyContentAdapter
@Override
public void notifyChanged(Notification notification)
{
- if (!notification.isTouch())
+ if (notification.isTouch())
{
- Object notifier = notification.getNotifier();
+ return;
+ }
- // Listen to changes on Resources, only if its the Resource when this adapter is installed on
- if (notifier == container)
- {
- // The only attribute that triggers modified = true is "contents". The rest are ignored.
- if (notification.getFeature() == EresourcePackage.Literals.CDO_RESOURCE__CONTENTS)
- {
- container.setModified(true);
- }
- }
- else if (!(notifier instanceof Resource))
+ if (notification instanceof CDONotification)
+ {
+ return;
+ }
+
+ // Listen to changes on Resources, only if its the Resource when this adapter is installed on
+ Object notifier = notification.getNotifier();
+ if (notifier == container)
+ {
+ // The only attribute that triggers modified = true is "contents". The rest are ignored.
+ if (notification.getFeature() == EresourcePackage.Literals.CDO_RESOURCE__CONTENTS)
{
container.setModified(true);
}
}
+ else if (!(notifier instanceof Resource))
+ {
+ container.setModified(true);
+ }
}
}

Back to the top