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

(-)compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java (+8 lines)
Lines 777-782 Link Here
777
			case MethodCanBeStatic :
777
			case MethodCanBeStatic :
778
			case MethodCanBePotentiallyStatic :
778
			case MethodCanBePotentiallyStatic :
779
				return "static-method"; //$NON-NLS-1$
779
				return "static-method"; //$NON-NLS-1$
780
			case InvalidJavadoc :
781
			case MissingJavadocComments :
782
			case MissingJavadocTags:
783
				return "javadoc"; //$NON-NLS-1$				
780
		}
784
		}
781
		return null;
785
		return null;
782
	}
786
	}
Lines 817-822 Link Here
817
				if ("incomplete-switch".equals(warningToken)) //$NON-NLS-1$
821
				if ("incomplete-switch".equals(warningToken)) //$NON-NLS-1$
818
					return IrritantSet.INCOMPLETE_SWITCH;
822
					return IrritantSet.INCOMPLETE_SWITCH;
819
				break;
823
				break;
824
			case 'j' :
825
				if ("javadoc".equals(warningToken)) //$NON-NLS-1$
826
					return IrritantSet.JAVADOC;
827
				break;
820
			case 'n' :
828
			case 'n' :
821
				if ("nls".equals(warningToken)) //$NON-NLS-1$
829
				if ("nls".equals(warningToken)) //$NON-NLS-1$
822
					return IrritantSet.NLS;
830
					return IrritantSet.NLS;
(-)compiler/org/eclipse/jdt/internal/compiler/impl/IrritantSet.java (-1 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 58-63 Link Here
58
	public static final IrritantSet UNCHECKED = new IrritantSet(CompilerOptions.UncheckedTypeOperation);
58
	public static final IrritantSet UNCHECKED = new IrritantSet(CompilerOptions.UncheckedTypeOperation);
59
	public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet(CompilerOptions.UnqualifiedFieldAccess);
59
	public static final IrritantSet UNQUALIFIED_FIELD_ACCESS = new IrritantSet(CompilerOptions.UnqualifiedFieldAccess);
60
60
61
	public static final IrritantSet JAVADOC = new IrritantSet(CompilerOptions.InvalidJavadoc);
61
	public static final IrritantSet COMPILER_DEFAULT_ERRORS = new IrritantSet(0); // no optional error by default	
62
	public static final IrritantSet COMPILER_DEFAULT_ERRORS = new IrritantSet(0); // no optional error by default	
62
	public static final IrritantSet COMPILER_DEFAULT_WARNINGS = new IrritantSet(0); // see static initializer below
63
	public static final IrritantSet COMPILER_DEFAULT_WARNINGS = new IrritantSet(0); // see static initializer below
63
	static {
64
	static {
Lines 126-131 Link Here
126
		if (suppressRawWhenUnchecked != null && "true".equalsIgnoreCase(suppressRawWhenUnchecked)) { //$NON-NLS-1$
127
		if (suppressRawWhenUnchecked != null && "true".equalsIgnoreCase(suppressRawWhenUnchecked)) { //$NON-NLS-1$
127
			UNCHECKED.set(CompilerOptions.RawTypeReference);
128
			UNCHECKED.set(CompilerOptions.RawTypeReference);
128
		}
129
		}
130
		
131
		JAVADOC
132
			.set(CompilerOptions.MissingJavadocComments)
133
			.set(CompilerOptions.MissingJavadocTags);
129
	}
134
	}
130
135
131
	// Internal state
136
	// Internal state
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-3 / +81 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 46-53 Link Here
46
	// All specified tests which do not belong to the class are skipped...
46
	// All specified tests which do not belong to the class are skipped...
47
	static {
47
	static {
48
//		TESTS_NAMES = new String[] { "test293" };
48
//		TESTS_NAMES = new String[] { "test293" };
49
//		TESTS_NUMBERS = new int[] { 290, 291 };
49
//		TESTS_NUMBERS = new int[] { 294 };
50
//		TESTS_RANGE = new int[] { 249, -1 };
50
//		TESTS_RANGE = new int[] { 294, -1 };
51
	}
51
	}
52
52
53
	String reportMissingJavadocComments = null;
53
	String reportMissingJavadocComments = null;
Lines 9711-9714 Link Here
9711
		"The field X.QUERY is not visible\n" + 
9711
		"The field X.QUERY is not visible\n" + 
9712
		"----------\n");
9712
		"----------\n");
9713
}
9713
}
9714
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=179566
9715
public void test294() {
9716
	Map customOptions = getCompilerOptions();
9717
	customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR);
9718
	customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.ERROR);
9719
	customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocComments, CompilerOptions.ERROR);
9720
	customOptions.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
9721
	String testFiles [] = new String[] {
9722
			"A.java",
9723
			"/** */\n" +
9724
			"public class A {\n" +
9725
			"	@SuppressWarnings(\"javadoc\")\n" +
9726
			"	public int foo(int i) { return 0; }\n" +
9727
			"}\n"
9728
			};
9729
	runConformTest(
9730
			testFiles,
9731
			null,
9732
			null,
9733
			true,
9734
			null,
9735
			customOptions,
9736
			null);
9737
}
9738
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=179566
9739
public void test295() {
9740
	Map customOptions = getCompilerOptions();
9741
	customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR);
9742
	customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.ERROR);
9743
	customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocComments, CompilerOptions.ERROR);
9744
	customOptions.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
9745
	String testFiles [] = new String[] {
9746
			"A.java",
9747
			"/** */\n" +
9748
			"public class A {\n" +
9749
			"	/**\n" +
9750
			"	 * @param j the given param/\n" +
9751
			"	 */\n" +
9752
			"	@SuppressWarnings(\"javadoc\")\n" +
9753
			"	public int foo(int i) { return 0; }\n" +
9754
			"}\n"
9755
			};
9756
	runConformTest(
9757
			testFiles,
9758
			null,
9759
			null,
9760
			true,
9761
			null,
9762
			customOptions,
9763
			null);
9764
}
9765
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=179566
9766
public void test296() {
9767
	Map customOptions = getCompilerOptions();
9768
	customOptions.put(CompilerOptions.OPTION_ReportInvalidJavadoc, CompilerOptions.ERROR);
9769
	customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocTags, CompilerOptions.ERROR);
9770
	customOptions.put(CompilerOptions.OPTION_ReportMissingJavadocComments, CompilerOptions.ERROR);
9771
	customOptions.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
9772
	String testFiles [] = new String[] {
9773
			"A.java",
9774
			"/** */\n" +
9775
			"public class A {\n" +
9776
			"	/**\n" +
9777
			"	 * @param i/\n" +
9778
			"	 */\n" +
9779
			"	@SuppressWarnings(\"javadoc\")\n" +
9780
			"	public int foo(int i) { return 0; }\n" +
9781
			"}\n"
9782
			};
9783
	runConformTest(
9784
			testFiles,
9785
			null,
9786
			null,
9787
			true,
9788
			null,
9789
			customOptions,
9790
			null);
9791
}
9714
}
9792
}

Return to bug 179566