Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGoulwen Le Fur2014-05-19 08:42:32 +0000
committerGoulwen Le Fur2014-05-19 08:42:32 +0000
commitdce341ac94d6e35419966e1ee8cd6d4e6f4616b2 (patch)
tree00930579bf98d0de5adbc53ceb4b8823abc8f051 /plugins
parent8f0a9810eee88bbd117ccfe74d21e943aeec3138 (diff)
downloadorg.eclipse.eef-dce341ac94d6e35419966e1ee8cd6d4e6f4616b2.tar.gz
org.eclipse.eef-dce341ac94d6e35419966e1ee8cd6d4e6f4616b2.tar.xz
org.eclipse.eef-dce341ac94d6e35419966e1ee8cd6d4e6f4616b2.zip
UPDATED: RSA for a better brdige with Siriusv1_3_0_BRANCH
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.eef.runtime/src/org/eclipse/emf/eef/runtime/api/notify/ResourceSetAdapter.java24
1 files changed, 18 insertions, 6 deletions
diff --git a/plugins/org.eclipse.emf.eef.runtime/src/org/eclipse/emf/eef/runtime/api/notify/ResourceSetAdapter.java b/plugins/org.eclipse.emf.eef.runtime/src/org/eclipse/emf/eef/runtime/api/notify/ResourceSetAdapter.java
index d6454e848..69bc12ac9 100644
--- a/plugins/org.eclipse.emf.eef.runtime/src/org/eclipse/emf/eef/runtime/api/notify/ResourceSetAdapter.java
+++ b/plugins/org.eclipse.emf.eef.runtime/src/org/eclipse/emf/eef/runtime/api/notify/ResourceSetAdapter.java
@@ -53,6 +53,11 @@ public class ResourceSetAdapter extends EContentAdapter {
eStructuralFeatureListeners = new HashMap<EStructuralFeature, List<PropertiesEditingSemanticListener>>();
}
+ @Override
+ public boolean isAdapterForType(Object type) {
+ return type == ResourceSetAdapter.class || ResourceSetAdapter.class.getName().equals(type);
+ }
+
/**
* Activates the resource set adapter.
*/
@@ -132,10 +137,21 @@ public class ResourceSetAdapter extends EContentAdapter {
* the listener to remove
*/
public void removeEditingSemanticListener(PropertiesEditingSemanticListener listener) {
+ unregisterEditingSemanticListener(listener);
+
+ // if there are no listeners left we remove the adapter
+ if (eClassifierListeners.size() + eStructuralFeatureListeners.size() == 0)
+ deactivate();
+ }
+
+ /**
+ * Unregisters the given listener
+ * @param listener {@link PropertiesEditingSemanticListener} to unregister.
+ */
+ public void unregisterEditingSemanticListener(PropertiesEditingSemanticListener listener) {
for (NotificationFilter filter : listener.getFilters()) {
if (filter instanceof EStructuralFeatureNotificationFilter) {
- for (EStructuralFeature feature : ((EStructuralFeatureNotificationFilter)filter)
- .getFeatures()) {
+ for (EStructuralFeature feature : ((EStructuralFeatureNotificationFilter)filter).getFeatures()) {
removeEditingSemanticListener(feature, listener);
}
} else if (filter instanceof EClassifierNotificationFilter) {
@@ -144,10 +160,6 @@ public class ResourceSetAdapter extends EContentAdapter {
}
}
}
-
- // if there are no listeners left we remove the adapter
- if (eClassifierListeners.size() + eStructuralFeatureListeners.size() == 0)
- deactivate();
}
/**
* Removes the given listener from the registered listeners.

Back to the top