Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-01-13 17:23:43 +0000
committerEike Stepper2012-01-13 17:23:43 +0000
commit7416443692cdda72d1f704ea4fc5ececcc669df7 (patch)
tree918e3325474084599bdb4ed2ec1d0737d552f033
parent311a7aced7e0dce28df7aa703772c9032ffa1d51 (diff)
downloadcdo-7416443692cdda72d1f704ea4fc5ececcc669df7.tar.gz
cdo-7416443692cdda72d1f704ea4fc5ececcc669df7.tar.xz
cdo-7416443692cdda72d1f704ea4fc5ececcc669df7.zip
[368553] CDOModificationTrackingAdapter should ignore CDOInvalidations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=368553
-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