Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-01-13 12:47:45 -0500
committerEike Stepper2012-01-13 12:47:45 -0500
commit8af70034d898742ed2b0764abf559e3a93f15cfa (patch)
treec8bfb148515d1d4d74cab589f260668a7e3abc68
parentb21599771676d6927b2b8555feebda8599491aec (diff)
downloadcdo-8af70034d898742ed2b0764abf559e3a93f15cfa.tar.gz
cdo-8af70034d898742ed2b0764abf559e3a93f15cfa.tar.xz
cdo-8af70034d898742ed2b0764abf559e3a93f15cfa.zip
[368571] CDOModificationTrackingAdapter should ignore CDOInvalidations
https://bugs.eclipse.org/bugs/show_bug.cgi?id=368571
-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 874cf7cf44..eee00160ff 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;
@@ -54,23 +55,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