summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorCamilo Bernal2012-10-24 11:47:21 (EDT)
committer Jeff Johnston2012-10-26 14:03:52 (EDT)
commit239680f2a44bde772ae4d2ce216e3f73053dc65b (patch)
treea8659b540eafd424148894f684d302ac587c0cfb
parentece39a869c46447031b043ba2a8998a1f73ef2ed (diff)
downloadorg.eclipse.linuxtools-239680f2a44bde772ae4d2ce216e3f73053dc65b.zip
org.eclipse.linuxtools-239680f2a44bde772ae4d2ce216e3f73053dc65b.tar.gz
org.eclipse.linuxtools-239680f2a44bde772ae4d2ce216e3f73053dc65b.tar.bz2
Bug 392685: Store unification profiling preferences in a single file.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=392685 Use single node with qualifier being the provider plug-in id. Preference keys are generated by using the profiling type, each referencing the selected profiling type provider. Change-Id: Ib874849e2fa7e6c4d34978109ffb723c5e7aa8a4 Reviewed-on: https://git.eclipse.org/r/8363 Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> IP-Clean: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java13
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java5
2 files changed, 10 insertions, 8 deletions
diff --git a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java
index 743d7ac..b317243 100644
--- a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java
+++ b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/AbstractProviderPreferencesPage.java
@@ -63,7 +63,7 @@ public class AbstractProviderPreferencesPage extends
public void init(IWorkbench workbench) {
final IPreferenceStore store = new ScopedPreferenceStore(
- ConfigurationScope.INSTANCE, type);
+ ConfigurationScope.INSTANCE, ProviderProfileConstants.PLUGIN_ID);
setPreferenceStore(store);
}
@@ -71,8 +71,8 @@ public class AbstractProviderPreferencesPage extends
super.performDefaults();
String providerId = ProfileLaunchShortcut
.getDefaultLaunchShortcutProviderId(type);
- ConfigurationScope.INSTANCE.getNode(type)
- .put(ProviderProfileConstants.PREFS_KEY, providerId);
+ ConfigurationScope.INSTANCE.getNode(ProviderProfileConstants.PLUGIN_ID)
+ .put(ProviderProfileConstants.PREFS_KEY + type, providerId);
}
@@ -80,8 +80,9 @@ public class AbstractProviderPreferencesPage extends
protected void createFieldEditors() {
String providerId = ProfileLaunchShortcut
.getDefaultLaunchShortcutProviderId(type);
-
- getPreferenceStore().setDefault(ProviderProfileConstants.PREFS_KEY, providerId);
+
+ getPreferenceStore().setDefault(
+ ProviderProfileConstants.PREFS_KEY + type, providerId);
HashMap<String, String> map = ProfileLaunchConfigurationTabGroup
.getProviderNamesForType(type);
@@ -106,7 +107,7 @@ public class AbstractProviderPreferencesPage extends
// Create basic field editor.
RadioGroupFieldEditor editor = new RadioGroupFieldEditor(
- ProviderProfileConstants.PREFS_KEY,
+ ProviderProfileConstants.PREFS_KEY + type,
Messages.ProviderPreferencesPage_1, 1, providerList,
getFieldEditorParent(), true);
editor.setPreferenceStore(getPreferenceStore());
diff --git a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java
index a2e83c7..4399a8d 100644
--- a/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java
+++ b/profiling/org.eclipse.linuxtools.profiling.provider/src/org/eclipse/linuxtools/internal/profiling/provider/launch/ProviderLaunchConfigurationDelegate.java
@@ -60,8 +60,9 @@ public class ProviderLaunchConfigurationDelegate extends
*/
public static String getProviderIdToRun(String type) {
// Look in the preferences for a provider
- String providerId = ConfigurationScope.INSTANCE.getNode(type).get(
- ProviderProfileConstants.PREFS_KEY, "");
+ String providerId = ConfigurationScope.INSTANCE.getNode(
+ ProviderProfileConstants.PLUGIN_ID).get(
+ ProviderProfileConstants.PREFS_KEY + type, "");
if (providerId.equals("") || getConfigurationDelegateFromId(providerId) == null) {
// Get highest priority provider
providerId = ProfileLaunchConfigurationTabGroup