diff options
author | cdamus | 2013-03-14 19:28:17 +0000 |
---|---|---|
committer | cdamus | 2013-03-14 19:28:17 +0000 |
commit | bbfe5c3b554d6c8212417fa956aa247a0d30d0d6 (patch) | |
tree | a6ff3784f8d0935491d4661ee6e2c2fc3a527af7 | |
parent | e276ca4940d5ec5d14405788eabadebd41db926b (diff) | |
download | org.eclipse.papyrus-bbfe5c3b554d6c8212417fa956aa247a0d30d0d6.tar.gz org.eclipse.papyrus-bbfe5c3b554d6c8212417fa956aa247a0d30d0d6.tar.xz org.eclipse.papyrus-bbfe5c3b554d6c8212417fa956aa247a0d30d0d6.zip |
Do disable context on delete by user, but not on temporary unavailability.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402961
-rw-r--r-- | plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java index 2f0bc1ce8ab..c66902cee93 100644 --- a/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java +++ b/plugins/views/properties/org.eclipse.papyrus.views.properties/src/org/eclipse/papyrus/views/properties/runtime/ConfigurationManager.java @@ -198,7 +198,9 @@ public class ConfigurationManager { public void contextsRemoved(Collection<? extends Context> contexts) {
for(Context next : contexts) {
- deleteContext(next);
+ // don't update the preferences on the expectation that this context
+ // is only temporarily unavailable
+ deleteContext(next, false);
}
}
};
@@ -760,13 +762,17 @@ public class ConfigurationManager { * The context to delete
*/
public void deleteContext(Context context) {
+ deleteContext(context, true);
+ }
+
+ private void deleteContext(Context context, boolean updatePreferences) {
if(!isCustomizable(context)) {
throw new IllegalStateException("Non-customizable contexts cannot be deleted. Trying to delete " + context.getName());
}
Resource resource = context.eResource();
contexts.remove(EcoreUtil.getURI(context));
- disableContext(context, true, false);
+ disableContext(context, true, updatePreferences);
root.getContexts().remove(context);
resource.unload();
|