summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlen Anderson2013-08-06 15:46:19 (EDT)
committerAndrew Gvozdev2013-08-16 17:42:38 (EDT)
commit191382509c9391907299e03ab4ac14aefd34692f (patch)
tree1584eafc7bbd591454b1346e308fd56517924d4b
parent2e2a26bf4a4e7564b42b65510bc44aac070c5a6d (diff)
downloadorg.eclipse.cdt-191382509c9391907299e03ab4ac14aefd34692f.zip
org.eclipse.cdt-191382509c9391907299e03ab4ac14aefd34692f.tar.gz
org.eclipse.cdt-191382509c9391907299e03ab4ac14aefd34692f.tar.bz2
Fix for Bug 414525 Product preferences ignored in console preferencesrefs/changes/77/15177/3
page Change-Id: I76ada4dcdf1dfd89fe71a854423cfdc0f26bfe6a Signed-off-by: Glen Anderson <glen.anderson@analog.com> Reviewed-on: https://git.eclipse.org/r/15177 Reviewed-by: Andrew Gvozdev <angvoz.dev@gmail.com> IP-Clean: Andrew Gvozdev <angvoz.dev@gmail.com> Tested-by: Andrew Gvozdev <angvoz.dev@gmail.com>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java42
1 files changed, 28 insertions, 14 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java
index 99785e8..45a9dd0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildConsolePreferencePage.java
@@ -159,20 +159,34 @@ public class BuildConsolePreferencePage extends FieldEditorPreferencePage implem
}
public static void initDefaults(IPreferenceStore prefs) {
- prefs.setDefault(PREF_CLEAR_CONSOLE, true);
- prefs.setDefault(PREF_AUTO_OPEN_CONSOLE, true);
- prefs.setDefault(PREF_CONSOLE_ON_TOP, false);
- prefs.setDefault(PREF_BUILDCONSOLE_WRAP_LINES, false);
- prefs.setDefault(PREF_BUILDCONSOLE_LINES, 500);
- prefs.setDefault(PREF_BUILDCONSOLE_TAB_WIDTH, 4);
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_OUTPUT_COLOR, new RGB(0, 0, 0));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_INFO_COLOR, new RGB(0, 0, 255));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_ERROR_COLOR, new RGB(255, 0, 0));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_BACKGROUND_COLOR, new RGB(255, 255, 255));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_BACKGROUND_COLOR, new RGB(254, 231, 224));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_WARNING_BACKGROUND_COLOR, new RGB(254, 243, 218));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_INFO_BACKGROUND_COLOR, new RGB(244, 247, 254));
- PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_HIGHLIGHTED_COLOR, new RGB(255, 0, 0));
+ if(!prefs.contains(PREF_CLEAR_CONSOLE))
+ prefs.setDefault(PREF_CLEAR_CONSOLE, true);
+ if(!prefs.contains(PREF_AUTO_OPEN_CONSOLE))
+ prefs.setDefault(PREF_AUTO_OPEN_CONSOLE, true);
+ if(!prefs.contains(PREF_CONSOLE_ON_TOP))
+ prefs.setDefault(PREF_CONSOLE_ON_TOP, false);
+ if(!prefs.contains(PREF_BUILDCONSOLE_WRAP_LINES))
+ prefs.setDefault(PREF_BUILDCONSOLE_WRAP_LINES, false);
+ if(!prefs.contains(PREF_BUILDCONSOLE_LINES))
+ prefs.setDefault(PREF_BUILDCONSOLE_LINES, 500);
+ if(!prefs.contains(PREF_BUILDCONSOLE_TAB_WIDTH))
+ prefs.setDefault(PREF_BUILDCONSOLE_TAB_WIDTH, 4);
+ if(!prefs.contains(PREF_BUILDCONSOLE_OUTPUT_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_OUTPUT_COLOR, new RGB(0, 0, 0));
+ if(!prefs.contains(PREF_BUILDCONSOLE_INFO_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_INFO_COLOR, new RGB(0, 0, 255));
+ if(!prefs.contains(PREF_BUILDCONSOLE_ERROR_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_ERROR_COLOR, new RGB(255, 0, 0));
+ if(!prefs.contains(PREF_BUILDCONSOLE_BACKGROUND_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_BACKGROUND_COLOR, new RGB(255, 255, 255));
+ if(!prefs.contains(PREF_BUILDCONSOLE_PROBLEM_BACKGROUND_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_BACKGROUND_COLOR, new RGB(254, 231, 224));
+ if(!prefs.contains(PREF_BUILDCONSOLE_PROBLEM_WARNING_BACKGROUND_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_WARNING_BACKGROUND_COLOR, new RGB(254, 243, 218));
+ if(!prefs.contains(PREF_BUILDCONSOLE_PROBLEM_INFO_BACKGROUND_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_INFO_BACKGROUND_COLOR, new RGB(244, 247, 254));
+ if(!prefs.contains(PREF_BUILDCONSOLE_PROBLEM_HIGHLIGHTED_COLOR))
+ PreferenceConverter.setDefault(prefs, PREF_BUILDCONSOLE_PROBLEM_HIGHLIGHTED_COLOR, new RGB(255, 0, 0));
}
}