Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAli Akar2015-09-04 11:18:31 +0000
committerAli Akar2015-09-04 11:18:31 +0000
commit82c303d9954608a3f463f0b1d72efc353f9f5425 (patch)
tree75da66eda525510197537805ee8ab7392d8ab4ff
parent05b0e96feababd2841c05240915e6d3369e5a3de (diff)
downloadorg.eclipse.amalgam-82c303d9954608a3f463f0b1d72efc353f9f5425.tar.gz
org.eclipse.amalgam-82c303d9954608a3f463f0b1d72efc353f9f5425.tar.xz
org.eclipse.amalgam-82c303d9954608a3f463f0b1d72efc353f9f5425.zip
[476526] [Activity Explorer] Customizable Activity Explorer via
preferences Handled correctly check/uncheck of multiple pages. Bug 476526 Change-Id: I611cf35e8e915958427fb258e0d6f2fccaedc303 Signed-off-by: Ali Akar <ali.akar82@gmail.com>
-rw-r--r--plugins/org.eclipse.amalgam.explorer.activity.ui/src/org/eclipse/amalgam/explorer/activity/ui/internal/preferences/ActivityExplorerSelectionBlock.java30
1 files changed, 17 insertions, 13 deletions
diff --git a/plugins/org.eclipse.amalgam.explorer.activity.ui/src/org/eclipse/amalgam/explorer/activity/ui/internal/preferences/ActivityExplorerSelectionBlock.java b/plugins/org.eclipse.amalgam.explorer.activity.ui/src/org/eclipse/amalgam/explorer/activity/ui/internal/preferences/ActivityExplorerSelectionBlock.java
index d7f97463..2422b241 100644
--- a/plugins/org.eclipse.amalgam.explorer.activity.ui/src/org/eclipse/amalgam/explorer/activity/ui/internal/preferences/ActivityExplorerSelectionBlock.java
+++ b/plugins/org.eclipse.amalgam.explorer.activity.ui/src/org/eclipse/amalgam/explorer/activity/ui/internal/preferences/ActivityExplorerSelectionBlock.java
@@ -12,8 +12,10 @@ package org.eclipse.amalgam.explorer.activity.ui.internal.preferences;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.regex.Pattern;
import org.eclipse.amalgam.explorer.activity.ui.ActivityExplorerActivator;
@@ -104,18 +106,19 @@ public class ActivityExplorerSelectionBlock {
public void performOk() {
// Defer the property page to the end so that all children prefs must be set before.
- String propertyPage = null;
- for (String id : deferredPreferencesValues.keySet()) {
- if(ActivityExplorerExtensionManager.isPage(id)){
- propertyPage = id;
- }else{
- ActivityExplorerActivator.getDefault().getPreferenceStore().setValue(id, deferredPreferencesValues.get(id));
- }
- }
- if(propertyPage != null){
- ActivityExplorerActivator.getDefault().getPreferenceStore().setValue(propertyPage, deferredPreferencesValues.get(propertyPage));
+ Set<String> propertyPages = new HashSet<String>();
+ for (String id : deferredPreferencesValues.keySet()) {
+ if (ActivityExplorerExtensionManager.isPage(id)) {
+ propertyPages.add(id);
+ } else {
+ ActivityExplorerActivator.getDefault().getPreferenceStore().setValue(id, deferredPreferencesValues.get(id));
}
- deferredPreferencesValues.clear();
+ }
+ for (String propertyPage : propertyPages) {
+ ActivityExplorerActivator.getDefault().getPreferenceStore()
+ .setValue(propertyPage, deferredPreferencesValues.get(propertyPage));
+ }
+ deferredPreferencesValues.clear();
}
/**
@@ -446,11 +449,12 @@ public class ActivityExplorerSelectionBlock {
boolean value = false;
IConfigurationElement elt = (IConfigurationElement) element;
String id = ActivityExplorerExtensionManager.getId(elt);
+ if(deferredPreferencesValues.containsKey(id)){
+ return deferredPreferencesValues.get(id);
+ }
IPreferenceStore prefs = ActivityExplorerActivator.getDefault().getPreferenceStore();
value = prefs.getBoolean(id);
return value;
}
-
}
-
}

Back to the top