Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcdamus2013-03-14 19:28:17 +0000
committercdamus2013-03-14 19:28:17 +0000
commitbbfe5c3b554d6c8212417fa956aa247a0d30d0d6 (patch)
treea6ff3784f8d0935491d4661ee6e2c2fc3a527af7
parente276ca4940d5ec5d14405788eabadebd41db926b (diff)
downloadorg.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.java10
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();

Back to the top