Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-10-29 04:47:20 -0400
committerEike Stepper2008-10-29 04:47:20 -0400
commit39c1a0adce7a5fb9fba6e1b90223c71bed0f987b (patch)
tree592352f041866f671df04eb909af69204b726559
parentd424fb04451de010037852a37b97e88383dff3f0 (diff)
downloadcdo-39c1a0adce7a5fb9fba6e1b90223c71bed0f987b.tar.gz
cdo-39c1a0adce7a5fb9fba6e1b90223c71bed0f987b.tar.xz
cdo-39c1a0adce7a5fb9fba6e1b90223c71bed0f987b.zip
[252242] Resource.setModified() should notify adapters when called
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252242
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
index a1057faf30..ddae623472 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
@@ -285,11 +285,31 @@ public class CDOResourceImpl extends CDOResourceNodeImpl implements CDOResource,
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
- * @generated
+ * @generated NOT
*/
public void setModified(boolean newModified)
{
+ boolean oldIsModified = isModified();
eSet(EresourcePackage.Literals.CDO_RESOURCE__MODIFIED, new Boolean(newModified));
+ if (eNotificationRequired())
+ {
+ Notification notification = new NotificationImpl(Notification.SET, oldIsModified, newModified)
+ {
+ @Override
+ public Object getNotifier()
+ {
+ return CDOResourceImpl.this;
+ }
+
+ @Override
+ public int getFeatureID(Class<?> expectedClass)
+ {
+ return RESOURCE__IS_MODIFIED;
+ }
+ };
+
+ eNotify(notification);
+ }
}
/**
@@ -658,6 +678,7 @@ public class CDOResourceImpl extends CDOResourceNodeImpl implements CDOResource,
{
CDOTransaction transaction = (CDOTransaction)view;
transaction.commit();
+ setModified(false);
}
else
{

Back to the top