Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/preferences/DartAnalysisPreferencePage.java

Issue 10829255: Change the text of the "don't use inferred types" preference to "use inferred types" and invert the… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/preferences/DartAnalysisPreferencePage.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/preferences/DartAnalysisPreferencePage.java (revision 10430)
+++ editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/preferences/DartAnalysisPreferencePage.java (working copy)
@@ -28,19 +28,18 @@
import org.eclipse.ui.IWorkbenchPreferencePage;
/**
- * Page for setting general Dart plug-in preferences (the root of all Dart preferences).
+ * Page for setting Dart analysis preferences.
*/
public class DartAnalysisPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
public static final String JAVA_BASE_PREF_PAGE_ID = "com.google.dart.tools.ui.preferences.DartAnalysisPreferencePage"; //$NON-NLS-1$
- private static boolean applyCheck(String key, Button check, boolean def) {
+ private static boolean applyCheck(String key, boolean currentValue, boolean def) {
IEclipsePreferences prefs = DartCore.getPlugin().getPrefs();
if (prefs != null) {
boolean root = prefs.getBoolean(key, def);
- boolean newSuppress = check.getSelection();
- if (newSuppress != root) {
- prefs.putBoolean(key, newSuppress);
+ if (currentValue != root) {
+ prefs.putBoolean(key, currentValue);
return true;
}
}
@@ -54,7 +53,7 @@
return checkBox;
}
- private Button suppressNoMemberWarningForInferredTypes_check;
+ private Button warningForInferredTypes_check;
public DartAnalysisPreferencePage() {
setPreferenceStore(null);
@@ -70,7 +69,7 @@
boolean hasChanges = false;
hasChanges |= applyCheck(
DartCore.SUPPRESS_NO_MEMBER_FOR_INFERRED_TYPES,
- suppressNoMemberWarningForInferredTypes_check,
+ !warningForInferredTypes_check.getSelection(),
true);
if (hasChanges) {
Job job = new CleanLibrariesJob();
@@ -84,7 +83,7 @@
Composite composite = new Composite(parent, SWT.NONE);
GridLayoutFactory.fillDefaults().spacing(0, 8).margins(0, 10).applyTo(composite);
// create UI
- suppressNoMemberWarningForInferredTypes_check = createCheckBox(
+ warningForInferredTypes_check = createCheckBox(
composite,
PreferencesMessages.DartAnalysisPreferencePage_suppressNoMemberWarningForInferredTypes,
null);
@@ -95,7 +94,7 @@
private void initFromPrefs() {
IEclipsePreferences prefs = DartCore.getPlugin().getPrefs();
- suppressNoMemberWarningForInferredTypes_check.setSelection(prefs.getBoolean(
+ warningForInferredTypes_check.setSelection(!prefs.getBoolean(
DartCore.SUPPRESS_NO_MEMBER_FOR_INFERRED_TYPES,
true));
}
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/preferences/PreferencesMessages.properties » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698