View | Details | Raw Unified | Return to bug 303945
Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.java (+1 lines)
Lines 397-402 Link Here
397
	public static String ProblemSeveritiesConfigurationBlock_pb_unused_local_label;
397
	public static String ProblemSeveritiesConfigurationBlock_pb_unused_local_label;
398
	public static String ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label;
398
	public static String ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label;
399
	public static String ProblemSeveritiesConfigurationBlock_pb_signal_param_in_overriding_label;
399
	public static String ProblemSeveritiesConfigurationBlock_pb_signal_param_in_overriding_label;
400
	public static String ProblemSeveritiesConfigurationBlock_pb_suppress_optional_errors_label;
400
	public static String ProblemSeveritiesConfigurationBlock_pb_unused_private_label;
401
	public static String ProblemSeveritiesConfigurationBlock_pb_unused_private_label;
401
	public static String ProblemSeveritiesConfigurationBlock_pb_non_externalized_strings_label;
402
	public static String ProblemSeveritiesConfigurationBlock_pb_non_externalized_strings_label;
402
	public static String ProblemSeveritiesConfigurationBlock_pb_dead_code;
403
	public static String ProblemSeveritiesConfigurationBlock_pb_dead_code;
(-)ui/org/eclipse/jdt/internal/ui/preferences/PreferencesMessages.properties (-1 / +2 lines)
Lines 351-357 Link Here
351
351
352
JavaBuildConfigurationBlock_needsbuild_title=Building Settings Changed
352
JavaBuildConfigurationBlock_needsbuild_title=Building Settings Changed
353
JavaBuildConfigurationBlock_needsfullbuild_message=The Building settings have changed. A full rebuild is required for changes to take effect. Do the full build now?
353
JavaBuildConfigurationBlock_needsfullbuild_message=The Building settings have changed. A full rebuild is required for changes to take effect. Do the full build now?
354
ProblemSeveritiesConfigurationBlock_treat_optional_as_fatal=Treat errors like &fatal compiler errors (make compiled code not executable)
354
ProblemSeveritiesConfigurationBlock_treat_optional_as_fatal=Treat optional errors like &fatal compiler errors (make compiled code not executable)
355
JavaBuildConfigurationBlock_needsprojectbuild_message=The Building settings have changed. A rebuild of the project is required for changes to take effect. Build the project now?
355
JavaBuildConfigurationBlock_needsprojectbuild_message=The Building settings have changed. A rebuild of the project is required for changes to take effect. Build the project now?
356
356
357
JavaBuildConfigurationBlock_resource_filter_description=Filtered resources are not copied to the output folder during a build. List is comma separated (e.g. '*.doc, plugin.xml, scripts/')
357
JavaBuildConfigurationBlock_resource_filter_description=Filtered resources are not copied to the output folder during a build. List is comma separated (e.g. '*.doc, plugin.xml, scripts/')
Lines 424-429 Link Here
424
ProblemSeveritiesConfigurationBlock_pb_unused_local_label=&Local variable is never read:
424
ProblemSeveritiesConfigurationBlock_pb_unused_local_label=&Local variable is never read:
425
ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label=Parameter is never read:
425
ProblemSeveritiesConfigurationBlock_pb_unused_parameter_label=Parameter is never read:
426
ProblemSeveritiesConfigurationBlock_pb_signal_param_in_overriding_label=Ignore in overriding and implementing methods
426
ProblemSeveritiesConfigurationBlock_pb_signal_param_in_overriding_label=Ignore in overriding and implementing methods
427
ProblemSeveritiesConfigurationBlock_pb_suppress_optional_errors_label=Suppress optional errors with '@SuppressWarnings'
427
ProblemSeveritiesConfigurationBlock_pb_unused_private_label=Unused local or private member:
428
ProblemSeveritiesConfigurationBlock_pb_unused_private_label=Unused local or private member:
428
ProblemSeveritiesConfigurationBlock_pb_parameter_assignment=Parameter assignment:
429
ProblemSeveritiesConfigurationBlock_pb_parameter_assignment=Parameter assignment:
429
ProblemSeveritiesConfigurationBlock_pb_redundant_null_check=Redundant null check:
430
ProblemSeveritiesConfigurationBlock_pb_redundant_null_check=Redundant null check:
(-)ui/org/eclipse/jdt/internal/ui/preferences/ProblemSeveritiesConfigurationBlock.java (-6 / +17 lines)
Lines 103-108 Link Here
103
	private static final Key PREF_15_PB_RAW_TYPE_REFERENCE= getJDTCoreKey(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE);
103
	private static final Key PREF_15_PB_RAW_TYPE_REFERENCE= getJDTCoreKey(JavaCore.COMPILER_PB_RAW_TYPE_REFERENCE);
104
104
105
	private static final Key PREF_PB_SUPPRESS_WARNINGS= getJDTCoreKey(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS);
105
	private static final Key PREF_PB_SUPPRESS_WARNINGS= getJDTCoreKey(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS);
106
	private static final Key PREF_PB_SUPPRESS_OPTIONAL_ERRORS= getJDTCoreKey(JavaCore.COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS);
106
	private static final Key PREF_PB_UNHANDLED_WARNING_TOKEN= getJDTCoreKey(JavaCore.COMPILER_PB_UNHANDLED_WARNING_TOKEN);
107
	private static final Key PREF_PB_UNHANDLED_WARNING_TOKEN= getJDTCoreKey(JavaCore.COMPILER_PB_UNHANDLED_WARNING_TOKEN);
107
	private static final Key PREF_PB_FATAL_OPTIONAL_ERROR= getJDTCoreKey(JavaCore.COMPILER_PB_FATAL_OPTIONAL_ERROR);
108
	private static final Key PREF_PB_FATAL_OPTIONAL_ERROR= getJDTCoreKey(JavaCore.COMPILER_PB_FATAL_OPTIONAL_ERROR);
108
109
Lines 156-162 Link Here
156
				PREF_15_PB_ANNOTATION_SUPER_INTERFACE,
157
				PREF_15_PB_ANNOTATION_SUPER_INTERFACE,
157
				PREF_15_PB_TYPE_PARAMETER_HIDING, PREF_15_PB_INCOMPLETE_ENUM_SWITCH, PREF_PB_MISSING_DEPRECATED_ANNOTATION,
158
				PREF_15_PB_TYPE_PARAMETER_HIDING, PREF_15_PB_INCOMPLETE_ENUM_SWITCH, PREF_PB_MISSING_DEPRECATED_ANNOTATION,
158
				PREF_15_PB_RAW_TYPE_REFERENCE, PREF_PB_FATAL_OPTIONAL_ERROR,
159
				PREF_15_PB_RAW_TYPE_REFERENCE, PREF_PB_FATAL_OPTIONAL_ERROR,
159
				PREF_PB_FORBIDDEN_REFERENCE, PREF_PB_DISCOURRAGED_REFERENCE, PREF_PB_SUPPRESS_WARNINGS, PREF_PB_UNHANDLED_WARNING_TOKEN,
160
				PREF_PB_FORBIDDEN_REFERENCE, PREF_PB_DISCOURRAGED_REFERENCE,
161
				PREF_PB_SUPPRESS_WARNINGS, PREF_PB_SUPPRESS_OPTIONAL_ERRORS,
162
				PREF_PB_UNHANDLED_WARNING_TOKEN,
160
				PREF_PB_COMPARING_IDENTICAL, PREF_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD, PREF_PB_MISSING_HASHCODE_METHOD,
163
				PREF_PB_COMPARING_IDENTICAL, PREF_PB_MISSING_SYNCHRONIZED_ON_INHERITED_METHOD, PREF_PB_MISSING_HASHCODE_METHOD,
161
				PREF_PB_DEAD_CODE, PREF_PB_UNUSED_OBJECT_ALLOCATION
164
				PREF_PB_DEAD_CODE, PREF_PB_UNUSED_OBJECT_ALLOCATION
162
			};
165
			};
Lines 216-222 Link Here
216
		int indentStep=  fPixelConverter.convertWidthInCharsToPixels(1);
219
		int indentStep=  fPixelConverter.convertWidthInCharsToPixels(1);
217
220
218
		int defaultIndent= indentStep * 0;
221
		int defaultIndent= indentStep * 0;
219
		int extraIndent= indentStep * 2;
222
		int extraIndent= indentStep * 3;
220
		String label;
223
		String label;
221
		ExpandableComposite excomposite;
224
		ExpandableComposite excomposite;
222
		Composite inner;
225
		Composite inner;
Lines 475-486 Link Here
475
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unhandled_surpresswarning_tokens;
478
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_unhandled_surpresswarning_tokens;
476
		addComboBox(inner, label, PREF_PB_UNHANDLED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
479
		addComboBox(inner, label, PREF_PB_UNHANDLED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
477
480
478
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_unused_suppresswarnings_token;
479
		addComboBox(inner, label, PREF_PB_UNUSED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, defaultIndent);
480
481
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_enable_surpresswarning_annotation;
481
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_enable_surpresswarning_annotation;
482
		addCheckBox(inner, label, PREF_PB_SUPPRESS_WARNINGS, enabledDisabled, 0);
482
		addCheckBox(inner, label, PREF_PB_SUPPRESS_WARNINGS, enabledDisabled, 0);
483
483
484
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_unused_suppresswarnings_token;
485
		addComboBox(inner, label, PREF_PB_UNUSED_WARNING_TOKEN, errorWarningIgnore, errorWarningIgnoreLabels, extraIndent);
486
		
487
		label= PreferencesMessages.ProblemSeveritiesConfigurationBlock_pb_suppress_optional_errors_label;
488
		addCheckBox(inner, label, PREF_PB_SUPPRESS_OPTIONAL_ERRORS, enabledDisabled, extraIndent);
489
		
484
		new Label(composite, SWT.NONE);
490
		new Label(composite, SWT.NONE);
485
491
486
		String[] enableDisableValues= new String[] { ENABLED, DISABLED };
492
		String[] enableDisableValues= new String[] { ENABLED, DISABLED };
Lines 508-514 Link Here
508
					PREF_PB_DEPRECATION.equals(changedKey) ||
514
					PREF_PB_DEPRECATION.equals(changedKey) ||
509
					PREF_PB_LOCAL_VARIABLE_HIDING.equals(changedKey) ||
515
					PREF_PB_LOCAL_VARIABLE_HIDING.equals(changedKey) ||
510
					PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION.equals(changedKey) ||
516
					PREF_PB_UNUSED_DECLARED_THROWN_EXCEPTION.equals(changedKey) ||
511
					PREF_15_PB_MISSING_OVERRIDE_ANNOTATION.equals(changedKey)) {
517
					PREF_15_PB_MISSING_OVERRIDE_ANNOTATION.equals(changedKey) ||
518
					PREF_PB_SUPPRESS_WARNINGS.equals(changedKey)) {
512
				updateEnableStates();
519
				updateEnableStates();
513
			} else if (PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING.equals(changedKey)) {
520
			} else if (PREF_PB_SIGNAL_PARAMETER_IN_OVERRIDING.equals(changedKey)) {
514
				// merging the two options
521
				// merging the two options
Lines 541-546 Link Here
541
		
548
		
542
		boolean enablemissingOverrideAnnotation= !checkValue(PREF_15_PB_MISSING_OVERRIDE_ANNOTATION, IGNORE);
549
		boolean enablemissingOverrideAnnotation= !checkValue(PREF_15_PB_MISSING_OVERRIDE_ANNOTATION, IGNORE);
543
		getCheckBox(PREF_16_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION).setEnabled(enablemissingOverrideAnnotation);
550
		getCheckBox(PREF_16_PB_MISSING_OVERRIDE_ANNOTATION_FOR_INTERFACE_METHOD_IMPLEMENTATION).setEnabled(enablemissingOverrideAnnotation);
551
		
552
		boolean enableSuppressWarnings= checkValue(PREF_PB_SUPPRESS_WARNINGS, ENABLED);
553
		getCheckBox(PREF_PB_SUPPRESS_OPTIONAL_ERRORS).setEnabled(enableSuppressWarnings);
554
		setComboEnabled(PREF_PB_UNUSED_WARNING_TOKEN, enableSuppressWarnings);
544
	}
555
	}
545
556
546
	protected String[] getFullBuildDialogStrings(boolean workspaceSettings) {
557
	protected String[] getFullBuildDialogStrings(boolean workspaceSettings) {
(-)ui/org/eclipse/jdt/internal/ui/text/correction/SuppressWarningsSubProcessor.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 84-90 Link Here
84
84
85
85
86
	public static void addSuppressWarningsProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
86
	public static void addSuppressWarningsProposals(IInvocationContext context, IProblemLocation problem, Collection proposals) {
87
		if (problem.isError()) {
87
		if (problem.isError() && ! JavaCore.ENABLED.equals(context.getCompilationUnit().getJavaProject().getOption(JavaCore.COMPILER_PB_SUPPRESS_OPTIONAL_ERRORS, true))) {
88
			return;
88
			return;
89
		}
89
		}
90
		if (JavaCore.DISABLED.equals(context.getCompilationUnit().getJavaProject().getOption(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS, true))) {
90
		if (JavaCore.DISABLED.equals(context.getCompilationUnit().getJavaProject().getOption(JavaCore.COMPILER_PB_SUPPRESS_WARNINGS, true))) {

Return to bug 303945