View | Details | Raw Unified | Return to bug 96237 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestOptions.java (-170 / +182 lines)
Lines 44-51 Link Here
44
	private final int DEFAULT_VISIBILITY = 2;
44
	private final int DEFAULT_VISIBILITY = 2;
45
	private final int PRIVATE_VISIBILITY = 3;
45
	private final int PRIVATE_VISIBILITY = 3;
46
46
47
	private static String JavadocWithInvalidReferences = "	/**\n" + 
47
	private static String INVALID_CLASS_JAVADOC_REF = "	/**\n" + 
48
		"	 * @see X.X_dep\n" + 
48
		"	 * @see X_dep\n" + 
49
		"	 * @see X.X_priv\n" + 
49
		"	 * @see X.X_priv\n" + 
50
		"	 * @see X.Unknown\n" + 
50
		"	 * @see X.Unknown\n" + 
51
		"	 * @see X#X(int)\n" + 
51
		"	 * @see X#X(int)\n" + 
Lines 59-65 Link Here
59
		"	 * @see X#foo_dep(String)\n" + 
59
		"	 * @see X#foo_dep(String)\n" + 
60
		"	 * @see X#unknown()\n" + 
60
		"	 * @see X#unknown()\n" + 
61
		"	 */\n";
61
		"	 */\n";
62
	private static String JavadocWithInvalidReferencesForMethod = "	/**\n" + 
62
	private static String INVALID_METHOD_JAVADOC_REF = "	/**\n" + 
63
		"	 * @param str\n" + 
63
		"	 * @param str\n" + 
64
		"	 * @param str\n" + 
64
		"	 * @param str\n" + 
65
		"	 * @param xxx\n" + 
65
		"	 * @param xxx\n" + 
Lines 67-73 Link Here
67
		"	 * @throws IllegalArgumentException\n" + 
67
		"	 * @throws IllegalArgumentException\n" + 
68
		"	 * @throws java.io.IOException\n" + 
68
		"	 * @throws java.io.IOException\n" + 
69
		"	 * @throws Unknown\n" + 
69
		"	 * @throws Unknown\n" + 
70
		"	 * @see X.X_dep\n" + 
70
		"	 * @see X_dep\n" + 
71
		"	 * @see X.X_priv\n" + 
71
		"	 * @see X.X_priv\n" + 
72
		"	 * @see X.Unknown\n" + 
72
		"	 * @see X.Unknown\n" + 
73
		"	 * @see X#X(int)\n" + 
73
		"	 * @see X#X(int)\n" + 
Lines 81-90 Link Here
81
		"	 * @see X#foo_dep(String)\n" + 
81
		"	 * @see X#foo_dep(String)\n" + 
82
		"	 * @see X#unknown()\n" + 
82
		"	 * @see X#unknown()\n" + 
83
		"	 */\n";
83
		"	 */\n";
84
	private static String refClassForInvalidJavadoc =
84
	private static String DEP_CLASS =
85
		"/** @deprecated */\n" + 
86
		"public class X_dep {}\n";
87
	private static String REF_CLASS =
85
		"public class X {\n" + 
88
		"public class X {\n" + 
86
		"	/** @deprecated */\n" + 
89
// Deprecated class must be a top level to avoid visibility issue
87
		"	class X_dep{}\n" + 
90
//		"	/** @deprecated */\n" + 
91
//		"	class X_dep{}\n" + 
88
		"	private class X_priv{}\n" + 
92
		"	private class X_priv{}\n" + 
89
		"	/** @deprecated */\n" + 
93
		"	/** @deprecated */\n" + 
90
		"	int x_dep;\n" + 
94
		"	int x_dep;\n" + 
Lines 96-166 Link Here
96
		"	void foo_dep() {}\n" + 
100
		"	void foo_dep() {}\n" + 
97
		"	private void foo_priv() {}\n" + 
101
		"	private void foo_priv() {}\n" + 
98
		"	}\n";
102
		"	}\n";
99
	private static String[] InvalidReferencesClassJavadocComments = {
103
	private static String[] CLASSES_INVALID_COMMENT = {
100
		"X.java",
104
		"X.java",
101
		refClassForInvalidJavadoc,
105
		REF_CLASS,
106
		"X_dep.java",
107
		DEP_CLASS,
102
		"Y.java",
108
		"Y.java",
103
		"public class Y {\n" + 
109
		"public class Y {\n" + 
104
			JavadocWithInvalidReferences + 
110
			INVALID_CLASS_JAVADOC_REF + 
105
			"	public class X_pub {}\n" + 
111
			"	public class X_pub {}\n" + 
106
			JavadocWithInvalidReferences + 
112
			INVALID_CLASS_JAVADOC_REF + 
107
			"	protected class X_prot {}\n" + 
113
			"	protected class X_prot {}\n" + 
108
			JavadocWithInvalidReferences + 
114
			INVALID_CLASS_JAVADOC_REF + 
109
			"	class X_pack {}\n" + 
115
			"	class X_pack {}\n" + 
110
			JavadocWithInvalidReferences + 
116
			INVALID_CLASS_JAVADOC_REF + 
111
			"	private class X_priv {}\n" + 
117
			"	private class X_priv {}\n" + 
112
			"}\n" + 
118
			"}\n" + 
113
			"\n"
119
			"\n"
114
	};
120
	};
115
	private static String[] InvalidReferencesFieldJavadocComments = {
121
	private static String[] FIELDS_INVALID_COMMENT = {
116
		"X.java",
122
		"X.java",
117
		refClassForInvalidJavadoc,
123
		REF_CLASS,
124
		"X_dep.java",
125
		DEP_CLASS,
118
		"Y.java",
126
		"Y.java",
119
		"public class Y {\n" + 
127
		"public class Y {\n" + 
120
			JavadocWithInvalidReferences + 
128
			INVALID_CLASS_JAVADOC_REF + 
121
			"	public int x_pub;\n" + 
129
			"	public int x_pub;\n" + 
122
			JavadocWithInvalidReferences + 
130
			INVALID_CLASS_JAVADOC_REF + 
123
			"	protected int x_prot;\n" + 
131
			"	protected int x_prot;\n" + 
124
			JavadocWithInvalidReferences + 
132
			INVALID_CLASS_JAVADOC_REF + 
125
			"	int x_pack;\n" + 
133
			"	int x_pack;\n" + 
126
			JavadocWithInvalidReferences+ 
134
			INVALID_CLASS_JAVADOC_REF+ 
127
			"	private int x_priv;\n" + 
135
			"	private int x_priv;\n" + 
128
			"}\n" + 
136
			"}\n" + 
129
			"\n"
137
			"\n"
130
	};
138
	};
131
	private static String[] InvalidReferencesMethodJavadocComments = {
139
	private static String[] METHODS_INVALID_COMMENT = {
132
		"X.java",
140
		"X.java",
133
		refClassForInvalidJavadoc,
141
		REF_CLASS,
142
		"X_dep.java",
143
		DEP_CLASS,
134
		"Y.java",
144
		"Y.java",
135
		"public class Y {\n" + 
145
		"public class Y {\n" + 
136
			JavadocWithInvalidReferencesForMethod + 
146
			INVALID_METHOD_JAVADOC_REF + 
137
			"	public void foo_pub(String str) throws IllegalArgumentException {}\n" +
147
			"	public void foo_pub(String str) throws IllegalArgumentException {}\n" +
138
			JavadocWithInvalidReferencesForMethod + 
148
			INVALID_METHOD_JAVADOC_REF + 
139
			"	protected void foo_pro(String str) throws IllegalArgumentException {}\n" + 
149
			"	protected void foo_pro(String str) throws IllegalArgumentException {}\n" + 
140
			JavadocWithInvalidReferencesForMethod + 
150
			INVALID_METHOD_JAVADOC_REF + 
141
			"	void foo_pack(String str) throws IllegalArgumentException {}\n" + 
151
			"	void foo_pack(String str) throws IllegalArgumentException {}\n" + 
142
			JavadocWithInvalidReferencesForMethod + 
152
			INVALID_METHOD_JAVADOC_REF + 
143
			"	private void foo_priv(String str) throws IllegalArgumentException {}\n" +
153
			"	private void foo_priv(String str) throws IllegalArgumentException {}\n" +
144
			"}\n" + 
154
			"}\n" + 
145
			"\n"
155
			"\n"
146
	};
156
	};
147
	private static String[] InvalidReferencesConstructorJavadocComments = {
157
	private static String[] CONSTRUCTORS_INVALID_COMMENT = {
148
		"X.java",
158
		"X.java",
149
		refClassForInvalidJavadoc,
159
		REF_CLASS,
160
		"X_dep.java",
161
		DEP_CLASS,
150
		"Y.java",
162
		"Y.java",
151
		"public class Y {\n" + 
163
		"public class Y {\n" + 
152
			JavadocWithInvalidReferencesForMethod + 
164
			INVALID_METHOD_JAVADOC_REF + 
153
			"	public Y(int str) {}\n" +
165
			"	public Y(int str) {}\n" +
154
			JavadocWithInvalidReferencesForMethod + 
166
			INVALID_METHOD_JAVADOC_REF + 
155
			"	protected Y(long str) {}\n" + 
167
			"	protected Y(long str) {}\n" + 
156
			JavadocWithInvalidReferencesForMethod + 
168
			INVALID_METHOD_JAVADOC_REF + 
157
			"	Y(float str) {}\n" + 
169
			"	Y(float str) {}\n" + 
158
			JavadocWithInvalidReferencesForMethod + 
170
			INVALID_METHOD_JAVADOC_REF + 
159
			"	private Y(double str) {}\n" +
171
			"	private Y(double str) {}\n" +
160
			"}\n" + 
172
			"}\n" + 
161
			"\n"
173
			"\n"
162
	};
174
	};
163
	private static String[] MissingTags = {
175
	private static String[] MISSING_TAGS = {
164
		"X.java",
176
		"X.java",
165
		"public class X {\n" + 
177
		"public class X {\n" + 
166
			"	// public\n" + 
178
			"	// public\n" + 
Lines 216-222 Link Here
216
			"	private int privateMethod(long l) { return 0;}\n" + 
228
			"	private int privateMethod(long l) { return 0;}\n" + 
217
			"}\n"
229
			"}\n"
218
	};
230
	};
219
	private static String[] MissingComments = {
231
	private static String[] MISSING_COMMENTS = {
220
		"X.java",
232
		"X.java",
221
		"/** */\n" + 
233
		"/** */\n" + 
222
			"public class X {\n" + 
234
			"public class X {\n" + 
Lines 254-264 Link Here
254
			"}\n"
266
			"}\n"
255
	};
267
	};
256
268
257
	private static String[] resultForInvalidTagsClassOrField = {
269
	private static String[] CLASSES_ERRORS = {
258
		"1. ERROR in Y.java (at line 3)\n" + 
270
		"1. ERROR in Y.java (at line 3)\n" + 
259
			"	* @see X.X_dep\n" + 
271
			"	* @see X_dep\n" + 
260
			"	       ^^^^^^^\n" + 
272
			"	       ^^^^^\n" + 
261
			"Javadoc: The type X.X_dep is deprecated\n" + 
273
			"Javadoc: The type X_dep is deprecated\n" + 
262
			"----------\n" + 
274
			"----------\n" + 
263
			"2. ERROR in Y.java (at line 4)\n" + 
275
			"2. ERROR in Y.java (at line 4)\n" + 
264
			"	* @see X.X_priv\n" + 
276
			"	* @see X.X_priv\n" + 
Lines 321-329 Link Here
321
			"Javadoc: The method unknown() is undefined for the type X\n" + 
333
			"Javadoc: The method unknown() is undefined for the type X\n" + 
322
			"----------\n",
334
			"----------\n",
323
		"14. ERROR in Y.java (at line 19)\n" + 
335
		"14. ERROR in Y.java (at line 19)\n" + 
324
			"	* @see X.X_dep\n" + 
336
			"	* @see X_dep\n" + 
325
			"	       ^^^^^^^\n" + 
337
			"	       ^^^^^\n" + 
326
			"Javadoc: The type X.X_dep is deprecated\n" + 
338
			"Javadoc: The type X_dep is deprecated\n" + 
327
			"----------\n" + 
339
			"----------\n" + 
328
			"15. ERROR in Y.java (at line 20)\n" + 
340
			"15. ERROR in Y.java (at line 20)\n" + 
329
			"	* @see X.X_priv\n" + 
341
			"	* @see X.X_priv\n" + 
Lines 386-394 Link Here
386
			"Javadoc: The method unknown() is undefined for the type X\n" + 
398
			"Javadoc: The method unknown() is undefined for the type X\n" + 
387
			"----------\n",
399
			"----------\n",
388
		"27. ERROR in Y.java (at line 35)\n" + 
400
		"27. ERROR in Y.java (at line 35)\n" + 
389
			"	* @see X.X_dep\n" + 
401
			"	* @see X_dep\n" + 
390
			"	       ^^^^^^^\n" + 
402
			"	       ^^^^^\n" + 
391
			"Javadoc: The type X.X_dep is deprecated\n" + 
403
			"Javadoc: The type X_dep is deprecated\n" + 
392
			"----------\n" + 
404
			"----------\n" + 
393
			"28. ERROR in Y.java (at line 36)\n" + 
405
			"28. ERROR in Y.java (at line 36)\n" + 
394
			"	* @see X.X_priv\n" + 
406
			"	* @see X.X_priv\n" + 
Lines 451-459 Link Here
451
			"Javadoc: The method unknown() is undefined for the type X\n" + 
463
			"Javadoc: The method unknown() is undefined for the type X\n" + 
452
			"----------\n",
464
			"----------\n",
453
		"40. ERROR in Y.java (at line 51)\n" + 
465
		"40. ERROR in Y.java (at line 51)\n" + 
454
			"	* @see X.X_dep\n" + 
466
			"	* @see X_dep\n" + 
455
			"	       ^^^^^^^\n" + 
467
			"	       ^^^^^\n" + 
456
			"Javadoc: The type X.X_dep is deprecated\n" + 
468
			"Javadoc: The type X_dep is deprecated\n" + 
457
			"----------\n" + 
469
			"----------\n" + 
458
			"41. ERROR in Y.java (at line 52)\n" + 
470
			"41. ERROR in Y.java (at line 52)\n" + 
459
			"	* @see X.X_priv\n" + 
471
			"	* @see X.X_priv\n" + 
Lines 517-523 Link Here
517
			"----------\n"
529
			"----------\n"
518
	};
530
	};
519
531
520
	private static String[] resultForInvalidTagsMethodOrConstructor = {
532
	private static String[] METHODS_ERRORS = {
521
		"1. ERROR in Y.java (at line 4)\n" + 
533
		"1. ERROR in Y.java (at line 4)\n" + 
522
			"	* @param str\n" + 
534
			"	* @param str\n" + 
523
			"	         ^^^\n" + 
535
			"	         ^^^\n" + 
Lines 539-547 Link Here
539
			"Javadoc: Unknown cannot be resolved to a type\n" + 
551
			"Javadoc: Unknown cannot be resolved to a type\n" + 
540
			"----------\n" + 
552
			"----------\n" + 
541
			"5. ERROR in Y.java (at line 10)\n" + 
553
			"5. ERROR in Y.java (at line 10)\n" + 
542
			"	* @see X.X_dep\n" + 
554
			"	* @see X_dep\n" + 
543
			"	       ^^^^^^^\n" + 
555
			"	       ^^^^^\n" + 
544
			"Javadoc: The type X.X_dep is deprecated\n" + 
556
			"Javadoc: The type X_dep is deprecated\n" + 
545
			"----------\n" + 
557
			"----------\n" + 
546
			"6. ERROR in Y.java (at line 11)\n" + 
558
			"6. ERROR in Y.java (at line 11)\n" + 
547
			"	* @see X.X_priv\n" + 
559
			"	* @see X.X_priv\n" + 
Lines 624-632 Link Here
624
			"Javadoc: Unknown cannot be resolved to a type\n" + 
636
			"Javadoc: Unknown cannot be resolved to a type\n" + 
625
			"----------\n" + 
637
			"----------\n" + 
626
			"22. ERROR in Y.java (at line 33)\n" + 
638
			"22. ERROR in Y.java (at line 33)\n" + 
627
			"	* @see X.X_dep\n" + 
639
			"	* @see X_dep\n" + 
628
			"	       ^^^^^^^\n" + 
640
			"	       ^^^^^\n" + 
629
			"Javadoc: The type X.X_dep is deprecated\n" + 
641
			"Javadoc: The type X_dep is deprecated\n" + 
630
			"----------\n" + 
642
			"----------\n" + 
631
			"23. ERROR in Y.java (at line 34)\n" + 
643
			"23. ERROR in Y.java (at line 34)\n" + 
632
			"	* @see X.X_priv\n" + 
644
			"	* @see X.X_priv\n" + 
Lines 709-717 Link Here
709
			"Javadoc: Unknown cannot be resolved to a type\n" + 
721
			"Javadoc: Unknown cannot be resolved to a type\n" + 
710
			"----------\n" + 
722
			"----------\n" + 
711
			"39. ERROR in Y.java (at line 56)\n" + 
723
			"39. ERROR in Y.java (at line 56)\n" + 
712
			"	* @see X.X_dep\n" + 
724
			"	* @see X_dep\n" + 
713
			"	       ^^^^^^^\n" + 
725
			"	       ^^^^^\n" + 
714
			"Javadoc: The type X.X_dep is deprecated\n" + 
726
			"Javadoc: The type X_dep is deprecated\n" + 
715
			"----------\n" + 
727
			"----------\n" + 
716
			"40. ERROR in Y.java (at line 57)\n" + 
728
			"40. ERROR in Y.java (at line 57)\n" + 
717
			"	* @see X.X_priv\n" + 
729
			"	* @see X.X_priv\n" + 
Lines 794-802 Link Here
794
			"Javadoc: Unknown cannot be resolved to a type\n" + 
806
			"Javadoc: Unknown cannot be resolved to a type\n" + 
795
			"----------\n" + 
807
			"----------\n" + 
796
			"56. ERROR in Y.java (at line 79)\n" + 
808
			"56. ERROR in Y.java (at line 79)\n" + 
797
			"	* @see X.X_dep\n" + 
809
			"	* @see X_dep\n" + 
798
			"	       ^^^^^^^\n" + 
810
			"	       ^^^^^\n" + 
799
			"Javadoc: The type X.X_dep is deprecated\n" + 
811
			"Javadoc: The type X_dep is deprecated\n" + 
800
			"----------\n" + 
812
			"----------\n" + 
801
			"57. ERROR in Y.java (at line 80)\n" + 
813
			"57. ERROR in Y.java (at line 80)\n" + 
802
			"	* @see X.X_priv\n" + 
814
			"	* @see X.X_priv\n" + 
Lines 864-876 Link Here
864
		if (reportInvalidJavadocTagsDeprecatedRef == null && reportInvalidJavadocTagsNotVisibleRef == null) {
876
		if (reportInvalidJavadocTagsDeprecatedRef == null && reportInvalidJavadocTagsNotVisibleRef == null) {
865
			String result = "----------\n";
877
			String result = "----------\n";
866
			for (int i=0; i<=visibility; i++) {
878
			for (int i=0; i<=visibility; i++) {
867
				result += resultForInvalidTagsClassOrField[i];
879
				result += CLASSES_ERRORS[i];
868
			}
880
			}
869
			return result;
881
			return result;
870
		}
882
		}
871
		StringBuffer result = new StringBuffer("----------\n");
883
		StringBuffer result = new StringBuffer("----------\n");
872
		for (int i=0, count=1; i<= visibility; i++) {
884
		for (int i=0, count=1; i<= visibility; i++) {
873
			StringTokenizer tokenizer = new StringTokenizer(resultForInvalidTagsClassOrField[i], "\n");
885
			StringTokenizer tokenizer = new StringTokenizer(CLASSES_ERRORS[i], "\n");
874
			while (tokenizer.hasMoreTokens()) {
886
			while (tokenizer.hasMoreTokens()) {
875
				StringBuffer error = new StringBuffer();
887
				StringBuffer error = new StringBuffer();
876
				boolean add = true;
888
				boolean add = true;
Lines 886-892 Link Here
886
								add = line.indexOf("is deprecated") == -1;
898
								add = line.indexOf("is deprecated") == -1;
887
							}
899
							}
888
							if (add && CompilerOptions.DISABLED.equals(reportInvalidJavadocTagsNotVisibleRef)) {
900
							if (add && CompilerOptions.DISABLED.equals(reportInvalidJavadocTagsNotVisibleRef)) {
889
								add = line.indexOf("is not visible") == -1;
901
								add = line.indexOf("is not visible") == -1 && line.indexOf("in generated documentation") == -1;
890
							}
902
							}
891
						default:
903
						default:
892
							error.append(line);
904
							error.append(line);
Lines 906-918 Link Here
906
		if (reportInvalidJavadocTagsDeprecatedRef == null && reportInvalidJavadocTagsNotVisibleRef == null) {
918
		if (reportInvalidJavadocTagsDeprecatedRef == null && reportInvalidJavadocTagsNotVisibleRef == null) {
907
			String result = "----------\n";
919
			String result = "----------\n";
908
			for (int i=0; i<=visibility; i++) {
920
			for (int i=0; i<=visibility; i++) {
909
				result += resultForInvalidTagsMethodOrConstructor[i];
921
				result += METHODS_ERRORS[i];
910
			}
922
			}
911
			return result;
923
			return result;
912
		}
924
		}
913
		StringBuffer result = new StringBuffer("----------\n");
925
		StringBuffer result = new StringBuffer("----------\n");
914
		for (int i=0, count=1; i<= visibility; i++) {
926
		for (int i=0, count=1; i<= visibility; i++) {
915
			StringTokenizer tokenizer = new StringTokenizer(resultForInvalidTagsMethodOrConstructor[i], "\n");
927
			StringTokenizer tokenizer = new StringTokenizer(METHODS_ERRORS[i], "\n");
916
			while (tokenizer.hasMoreTokens()) {
928
			while (tokenizer.hasMoreTokens()) {
917
				StringBuffer error = new StringBuffer();
929
				StringBuffer error = new StringBuffer();
918
				boolean add = true;
930
				boolean add = true;
Lines 928-934 Link Here
928
								add = line.indexOf("is deprecated") == -1;
940
								add = line.indexOf("is deprecated") == -1;
929
							}
941
							}
930
							if (add && CompilerOptions.DISABLED.equals(reportInvalidJavadocTagsNotVisibleRef)) {
942
							if (add && CompilerOptions.DISABLED.equals(reportInvalidJavadocTagsNotVisibleRef)) {
931
								add = line.indexOf("is not visible") == -1;
943
								add = line.indexOf("is not visible") == -1 && line.indexOf("in generated documentation") == -1;
932
							}
944
							}
933
						default:
945
						default:
934
							error.append(line);
946
							error.append(line);
Lines 1302-1320 Link Here
1302
	 */
1314
	 */
1303
	public void testInvalidTagsClassNoSupport() {
1315
	public void testInvalidTagsClassNoSupport() {
1304
		docCommentSupport = CompilerOptions.DISABLED;
1316
		docCommentSupport = CompilerOptions.DISABLED;
1305
		runConformTest(InvalidReferencesClassJavadocComments);
1317
		runConformTest(CLASSES_INVALID_COMMENT);
1306
	}
1318
	}
1307
	public void testInvalidTagsFieldNoSupport() {
1319
	public void testInvalidTagsFieldNoSupport() {
1308
		docCommentSupport = CompilerOptions.DISABLED;
1320
		docCommentSupport = CompilerOptions.DISABLED;
1309
		runConformTest(InvalidReferencesFieldJavadocComments);
1321
		runConformTest(FIELDS_INVALID_COMMENT);
1310
	}
1322
	}
1311
	public void testInvalidTagsMethodNoSupport() {
1323
	public void testInvalidTagsMethodNoSupport() {
1312
		docCommentSupport = CompilerOptions.DISABLED;
1324
		docCommentSupport = CompilerOptions.DISABLED;
1313
		runConformTest(InvalidReferencesMethodJavadocComments);
1325
		runConformTest(METHODS_INVALID_COMMENT);
1314
	}
1326
	}
1315
	public void testInvalidTagsConstructorNoSupport() {
1327
	public void testInvalidTagsConstructorNoSupport() {
1316
		docCommentSupport = CompilerOptions.DISABLED;
1328
		docCommentSupport = CompilerOptions.DISABLED;
1317
		runConformTest(InvalidReferencesConstructorJavadocComments);
1329
		runConformTest(CONSTRUCTORS_INVALID_COMMENT);
1318
	}
1330
	}
1319
1331
1320
	/*
1332
	/*
Lines 1322-1359 Link Here
1322
	 */
1334
	 */
1323
	// Test default invalid javadoc (means "ignore" with tags"disabled" and visibility "public")
1335
	// Test default invalid javadoc (means "ignore" with tags"disabled" and visibility "public")
1324
	public void testInvalidTagsClassDefaults() {
1336
	public void testInvalidTagsClassDefaults() {
1325
		runConformTest(InvalidReferencesClassJavadocComments);
1337
		runConformTest(CLASSES_INVALID_COMMENT);
1326
	}
1338
	}
1327
	public void testInvalidTagsFieldDefaults() {
1339
	public void testInvalidTagsFieldDefaults() {
1328
		runConformTest(InvalidReferencesFieldJavadocComments);
1340
		runConformTest(FIELDS_INVALID_COMMENT);
1329
	}
1341
	}
1330
	public void testInvalidTagsMethodDefaults() {
1342
	public void testInvalidTagsMethodDefaults() {
1331
		runConformTest(InvalidReferencesMethodJavadocComments);
1343
		runConformTest(METHODS_INVALID_COMMENT);
1332
	}
1344
	}
1333
	public void testInvalidTagsConstructorDefaults() {
1345
	public void testInvalidTagsConstructorDefaults() {
1334
		runConformTest(InvalidReferencesConstructorJavadocComments);
1346
		runConformTest(CONSTRUCTORS_INVALID_COMMENT);
1335
	}
1347
	}
1336
1348
1337
	// Test invalid javadoc "error" + tags "disabled" and visibility "public"
1349
	// Test invalid javadoc "error" + tags "disabled" and visibility "public"
1338
	public void testInvalidTagsClassErrorNotags() {
1350
	public void testInvalidTagsClassErrorNotags() {
1339
		reportInvalidJavadoc = CompilerOptions.ERROR;
1351
		reportInvalidJavadoc = CompilerOptions.ERROR;
1340
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1352
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1341
		runConformTest(InvalidReferencesClassJavadocComments);
1353
		runConformTest(CLASSES_INVALID_COMMENT);
1342
	}
1354
	}
1343
	public void testInvalidTagsFieldErrorNotags() {
1355
	public void testInvalidTagsFieldErrorNotags() {
1344
		reportInvalidJavadoc = CompilerOptions.ERROR;
1356
		reportInvalidJavadoc = CompilerOptions.ERROR;
1345
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1357
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1346
		runConformTest(InvalidReferencesFieldJavadocComments);
1358
		runConformTest(FIELDS_INVALID_COMMENT);
1347
	}
1359
	}
1348
	public void testInvalidTagsMethodErrorNotags() {
1360
	public void testInvalidTagsMethodErrorNotags() {
1349
		reportInvalidJavadoc = CompilerOptions.ERROR;
1361
		reportInvalidJavadoc = CompilerOptions.ERROR;
1350
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1362
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1351
		runConformTest(InvalidReferencesMethodJavadocComments);
1363
		runConformTest(METHODS_INVALID_COMMENT);
1352
	}
1364
	}
1353
	public void testInvalidTagsConstructorErrorNotags() {
1365
	public void testInvalidTagsConstructorErrorNotags() {
1354
		reportInvalidJavadoc = CompilerOptions.ERROR;
1366
		reportInvalidJavadoc = CompilerOptions.ERROR;
1355
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1367
		reportInvalidJavadocTags = CompilerOptions.DISABLED;
1356
		runConformTest(InvalidReferencesConstructorJavadocComments);
1368
		runConformTest(CONSTRUCTORS_INVALID_COMMENT);
1357
	}
1369
	}
1358
1370
1359
	// Test invalid javadoc "error" + tags "enabled" and visibility "public"
1371
	// Test invalid javadoc "error" + tags "enabled" and visibility "public"
Lines 1361-1385 Link Here
1361
		reportInvalidJavadoc = CompilerOptions.ERROR;
1373
		reportInvalidJavadoc = CompilerOptions.ERROR;
1362
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1374
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1363
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1375
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1364
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1376
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1365
	}
1377
	}
1366
	public void testInvalidTagsFieldErrorTagsPublic() {
1378
	public void testInvalidTagsFieldErrorTagsPublic() {
1367
		reportInvalidJavadoc = CompilerOptions.ERROR;
1379
		reportInvalidJavadoc = CompilerOptions.ERROR;
1368
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1380
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1369
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1381
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1370
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1382
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1371
	}
1383
	}
1372
	public void testInvalidTagsMethodErrorTagsPublic() {
1384
	public void testInvalidTagsMethodErrorTagsPublic() {
1373
		reportInvalidJavadoc = CompilerOptions.ERROR;
1385
		reportInvalidJavadoc = CompilerOptions.ERROR;
1374
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1386
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1375
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1387
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1376
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1388
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1377
	}
1389
	}
1378
	public void testInvalidTagsConstructorErrorTagsPublic() {
1390
	public void testInvalidTagsConstructorErrorTagsPublic() {
1379
		reportInvalidJavadoc = CompilerOptions.ERROR;
1391
		reportInvalidJavadoc = CompilerOptions.ERROR;
1380
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1392
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1381
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1393
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1382
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1394
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1383
	}
1395
	}
1384
1396
1385
	// Test invalid javadoc "error" + tags "enabled" and visibility "protected"
1397
	// Test invalid javadoc "error" + tags "enabled" and visibility "protected"
Lines 1387-1411 Link Here
1387
		reportInvalidJavadoc = CompilerOptions.ERROR;
1399
		reportInvalidJavadoc = CompilerOptions.ERROR;
1388
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1400
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1389
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1401
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1390
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1402
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1391
	}
1403
	}
1392
	public void testInvalidTagsFieldErrorTagsProtected() {
1404
	public void testInvalidTagsFieldErrorTagsProtected() {
1393
		reportInvalidJavadoc = CompilerOptions.ERROR;
1405
		reportInvalidJavadoc = CompilerOptions.ERROR;
1394
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1406
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1395
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1407
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1396
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1408
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1397
	}
1409
	}
1398
	public void testInvalidTagsMethodErrorTagsProtected() {
1410
	public void testInvalidTagsMethodErrorTagsProtected() {
1399
		reportInvalidJavadoc = CompilerOptions.ERROR;
1411
		reportInvalidJavadoc = CompilerOptions.ERROR;
1400
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1412
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1401
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1413
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1402
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1414
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1403
	}
1415
	}
1404
	public void testInvalidTagsConstructorErrorTagsProtected() {
1416
	public void testInvalidTagsConstructorErrorTagsProtected() {
1405
		reportInvalidJavadoc = CompilerOptions.ERROR;
1417
		reportInvalidJavadoc = CompilerOptions.ERROR;
1406
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1418
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1407
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1419
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1408
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1420
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1409
	}
1421
	}
1410
1422
1411
	// Test invalid javadoc "error" + tags "enabled" and visibility "default"
1423
	// Test invalid javadoc "error" + tags "enabled" and visibility "default"
Lines 1413-1455 Link Here
1413
		reportInvalidJavadoc = CompilerOptions.ERROR;
1425
		reportInvalidJavadoc = CompilerOptions.ERROR;
1414
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1426
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1415
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1427
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1416
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1428
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1417
	}
1429
	}
1418
	public void testInvalidTagsFieldErrorTagsPackage() {
1430
	public void testInvalidTagsFieldErrorTagsPackage() {
1419
		reportInvalidJavadoc = CompilerOptions.ERROR;
1431
		reportInvalidJavadoc = CompilerOptions.ERROR;
1420
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1432
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1421
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1433
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1422
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1434
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1423
	}
1435
	}
1424
	public void testInvalidTagsMethodErrorTagsPackage() {
1436
	public void testInvalidTagsMethodErrorTagsPackage() {
1425
		reportInvalidJavadoc = CompilerOptions.ERROR;
1437
		reportInvalidJavadoc = CompilerOptions.ERROR;
1426
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1438
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1427
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1439
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1428
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1440
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1429
	}
1441
	}
1430
	public void testInvalidTagsConstructorErrorTagsPackage() {
1442
	public void testInvalidTagsConstructorErrorTagsPackage() {
1431
		reportInvalidJavadoc = CompilerOptions.ERROR;
1443
		reportInvalidJavadoc = CompilerOptions.ERROR;
1432
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1444
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1433
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1445
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1434
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1446
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1435
	}
1447
	}
1436
1448
1437
	// Test invalid javadoc "error" + tags "enabled" and visibility "private"
1449
	// Test invalid javadoc "error" + tags "enabled" and visibility "private"
1438
	public void testInvalidTagsClassErrorTagsPrivate() {
1450
	public void testInvalidTagsClassErrorTagsPrivate() {
1439
		reportInvalidJavadoc = CompilerOptions.ERROR;
1451
		reportInvalidJavadoc = CompilerOptions.ERROR;
1440
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1452
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1441
	}
1453
	}
1442
	public void testInvalidTagsFieldErrorTagsPrivate() {
1454
	public void testInvalidTagsFieldErrorTagsPrivate() {
1443
		reportInvalidJavadoc = CompilerOptions.ERROR;
1455
		reportInvalidJavadoc = CompilerOptions.ERROR;
1444
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1456
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1445
	}
1457
	}
1446
	public void testInvalidTagsMethodErrorTagsPrivate() {
1458
	public void testInvalidTagsMethodErrorTagsPrivate() {
1447
		reportInvalidJavadoc = CompilerOptions.ERROR;
1459
		reportInvalidJavadoc = CompilerOptions.ERROR;
1448
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1460
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1449
	}
1461
	}
1450
	public void testInvalidTagsConstructorErrorTagsPrivate() {
1462
	public void testInvalidTagsConstructorErrorTagsPrivate() {
1451
		reportInvalidJavadoc = CompilerOptions.ERROR;
1463
		reportInvalidJavadoc = CompilerOptions.ERROR;
1452
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1464
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1453
	}
1465
	}
1454
1466
1455
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" and visibility "public"
1467
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" and visibility "public"
Lines 1458-1485 Link Here
1458
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1470
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1459
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1471
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1460
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1472
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1461
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1473
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1462
	}
1474
	}
1463
	public void testInvalidTagsDeprecatedRefFieldErrorTagsPublic() {
1475
	public void testInvalidTagsDeprecatedRefFieldErrorTagsPublic() {
1464
		reportInvalidJavadoc = CompilerOptions.ERROR;
1476
		reportInvalidJavadoc = CompilerOptions.ERROR;
1465
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1477
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1466
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1478
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1467
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1479
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1468
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1480
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1469
	}
1481
	}
1470
	public void testInvalidTagsDeprecatedRefMethodErrorTagsPublic() {
1482
	public void testInvalidTagsDeprecatedRefMethodErrorTagsPublic() {
1471
		reportInvalidJavadoc = CompilerOptions.ERROR;
1483
		reportInvalidJavadoc = CompilerOptions.ERROR;
1472
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1484
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1473
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1485
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1474
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1486
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1475
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1487
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1476
	}
1488
	}
1477
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsPublic() {
1489
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsPublic() {
1478
		reportInvalidJavadoc = CompilerOptions.ERROR;
1490
		reportInvalidJavadoc = CompilerOptions.ERROR;
1479
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1491
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1480
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1492
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1481
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1493
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1482
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1494
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1483
	}
1495
	}
1484
1496
1485
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" visibility "protected"
1497
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" visibility "protected"
Lines 1488-1515 Link Here
1488
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1500
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1489
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1501
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1490
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1502
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1491
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1503
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1492
	}
1504
	}
1493
	public void testInvalidTagsDeprecatedRefFieldErrorTagsProtected() {
1505
	public void testInvalidTagsDeprecatedRefFieldErrorTagsProtected() {
1494
		reportInvalidJavadoc = CompilerOptions.ERROR;
1506
		reportInvalidJavadoc = CompilerOptions.ERROR;
1495
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1507
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1496
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1508
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1497
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1509
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1498
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1510
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1499
	}
1511
	}
1500
	public void testInvalidTagsDeprecatedRefMethodErrorTagsProtected() {
1512
	public void testInvalidTagsDeprecatedRefMethodErrorTagsProtected() {
1501
		reportInvalidJavadoc = CompilerOptions.ERROR;
1513
		reportInvalidJavadoc = CompilerOptions.ERROR;
1502
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1514
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1503
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1515
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1504
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1516
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1505
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1517
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1506
	}
1518
	}
1507
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsProtected() {
1519
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsProtected() {
1508
		reportInvalidJavadoc = CompilerOptions.ERROR;
1520
		reportInvalidJavadoc = CompilerOptions.ERROR;
1509
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1521
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1510
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1522
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1511
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1523
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1512
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1524
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1513
	}
1525
	}
1514
1526
1515
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" and visibility "default"
1527
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" and visibility "default"
Lines 1518-1567 Link Here
1518
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1530
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1519
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1531
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1520
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1532
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1521
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1533
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1522
	}
1534
	}
1523
	public void testInvalidTagsDeprecatedRefFieldErrorTagsPackage() {
1535
	public void testInvalidTagsDeprecatedRefFieldErrorTagsPackage() {
1524
		reportInvalidJavadoc = CompilerOptions.ERROR;
1536
		reportInvalidJavadoc = CompilerOptions.ERROR;
1525
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1537
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1526
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1538
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1527
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1539
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1528
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1540
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1529
	}
1541
	}
1530
	public void testInvalidTagsDeprecatedRefMethodErrorTagsPackage() {
1542
	public void testInvalidTagsDeprecatedRefMethodErrorTagsPackage() {
1531
		reportInvalidJavadoc = CompilerOptions.ERROR;
1543
		reportInvalidJavadoc = CompilerOptions.ERROR;
1532
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1544
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1533
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1545
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1534
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1546
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1535
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1547
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1536
	}
1548
	}
1537
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsPackage() {
1549
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsPackage() {
1538
		reportInvalidJavadoc = CompilerOptions.ERROR;
1550
		reportInvalidJavadoc = CompilerOptions.ERROR;
1539
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1551
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1540
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1552
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1541
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1553
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1542
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1554
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1543
	}
1555
	}
1544
1556
1545
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" and visibility "private"
1557
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated references "disabled" and visibility "private"
1546
	public void testInvalidTagsDeprecatedRefClassErrorTagsPrivate() {
1558
	public void testInvalidTagsDeprecatedRefClassErrorTagsPrivate() {
1547
		reportInvalidJavadoc = CompilerOptions.ERROR;
1559
		reportInvalidJavadoc = CompilerOptions.ERROR;
1548
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1560
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1549
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1561
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1550
	}
1562
	}
1551
	public void testInvalidTagsDeprecatedRefFieldErrorTagsPrivate() {
1563
	public void testInvalidTagsDeprecatedRefFieldErrorTagsPrivate() {
1552
		reportInvalidJavadoc = CompilerOptions.ERROR;
1564
		reportInvalidJavadoc = CompilerOptions.ERROR;
1553
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1565
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1554
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1566
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1555
	}
1567
	}
1556
	public void testInvalidTagsDeprecatedRefMethodErrorTagsPrivate() {
1568
	public void testInvalidTagsDeprecatedRefMethodErrorTagsPrivate() {
1557
		reportInvalidJavadoc = CompilerOptions.ERROR;
1569
		reportInvalidJavadoc = CompilerOptions.ERROR;
1558
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1570
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1559
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1571
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1560
	}
1572
	}
1561
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsPrivate() {
1573
	public void testInvalidTagsDeprecatedRefConstructorErrorTagsPrivate() {
1562
		reportInvalidJavadoc = CompilerOptions.ERROR;
1574
		reportInvalidJavadoc = CompilerOptions.ERROR;
1563
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1575
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1564
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1576
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1565
	}
1577
	}
1566
1578
1567
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" and visibility "public"
1579
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" and visibility "public"
Lines 1570-1597 Link Here
1570
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1582
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1571
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1583
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1572
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1584
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1573
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1585
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1574
	}
1586
	}
1575
	public void testInvalidTagsNotVisibleRefFieldErrorTagsPublic() {
1587
	public void testInvalidTagsNotVisibleRefFieldErrorTagsPublic() {
1576
		reportInvalidJavadoc = CompilerOptions.ERROR;
1588
		reportInvalidJavadoc = CompilerOptions.ERROR;
1577
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1589
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1578
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1590
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1579
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1591
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1580
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1592
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1581
	}
1593
	}
1582
	public void testInvalidTagsNotVisibleRefMethodErrorTagsPublic() {
1594
	public void testInvalidTagsNotVisibleRefMethodErrorTagsPublic() {
1583
		reportInvalidJavadoc = CompilerOptions.ERROR;
1595
		reportInvalidJavadoc = CompilerOptions.ERROR;
1584
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1596
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1585
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1597
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1586
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1598
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1587
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1599
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1588
	}
1600
	}
1589
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsPublic() {
1601
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsPublic() {
1590
		reportInvalidJavadoc = CompilerOptions.ERROR;
1602
		reportInvalidJavadoc = CompilerOptions.ERROR;
1591
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1603
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1592
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1604
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1593
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1605
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1594
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1606
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1595
	}
1607
	}
1596
1608
1597
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" visibility "protected"
1609
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" visibility "protected"
Lines 1600-1627 Link Here
1600
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1612
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1601
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1613
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1602
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1614
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1603
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1615
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1604
	}
1616
	}
1605
	public void testInvalidTagsNotVisibleRefFieldErrorTagsProtected() {
1617
	public void testInvalidTagsNotVisibleRefFieldErrorTagsProtected() {
1606
		reportInvalidJavadoc = CompilerOptions.ERROR;
1618
		reportInvalidJavadoc = CompilerOptions.ERROR;
1607
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1619
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1608
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1620
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1609
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1621
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1610
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1622
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1611
	}
1623
	}
1612
	public void testInvalidTagsNotVisibleRefMethodErrorTagsProtected() {
1624
	public void testInvalidTagsNotVisibleRefMethodErrorTagsProtected() {
1613
		reportInvalidJavadoc = CompilerOptions.ERROR;
1625
		reportInvalidJavadoc = CompilerOptions.ERROR;
1614
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1626
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1615
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1627
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1616
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1628
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1617
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1629
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1618
	}
1630
	}
1619
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsProtected() {
1631
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsProtected() {
1620
		reportInvalidJavadoc = CompilerOptions.ERROR;
1632
		reportInvalidJavadoc = CompilerOptions.ERROR;
1621
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1633
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1622
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1634
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1623
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1635
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1624
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1636
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1625
	}
1637
	}
1626
1638
1627
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" and visibility "default"
1639
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" and visibility "default"
Lines 1630-1679 Link Here
1630
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1642
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1631
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1643
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1632
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1644
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1633
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1645
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1634
	}
1646
	}
1635
	public void testInvalidTagsNotVisibleRefFieldErrorTagsPackage() {
1647
	public void testInvalidTagsNotVisibleRefFieldErrorTagsPackage() {
1636
		reportInvalidJavadoc = CompilerOptions.ERROR;
1648
		reportInvalidJavadoc = CompilerOptions.ERROR;
1637
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1649
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1638
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1650
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1639
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1651
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1640
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1652
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1641
	}
1653
	}
1642
	public void testInvalidTagsNotVisibleRefMethodErrorTagsPackage() {
1654
	public void testInvalidTagsNotVisibleRefMethodErrorTagsPackage() {
1643
		reportInvalidJavadoc = CompilerOptions.ERROR;
1655
		reportInvalidJavadoc = CompilerOptions.ERROR;
1644
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1656
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1645
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1657
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1646
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1658
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1647
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1659
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1648
	}
1660
	}
1649
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsPackage() {
1661
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsPackage() {
1650
		reportInvalidJavadoc = CompilerOptions.ERROR;
1662
		reportInvalidJavadoc = CompilerOptions.ERROR;
1651
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1663
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1652
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1664
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1653
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1665
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1654
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1666
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1655
	}
1667
	}
1656
1668
1657
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" and visibility "private"
1669
	// Test invalid javadoc "error" + tags "enabled" but invalid not visible references "disabled" and visibility "private"
1658
	public void testInvalidTagsNotVisibleRefClassErrorTagsPrivate() {
1670
	public void testInvalidTagsNotVisibleRefClassErrorTagsPrivate() {
1659
		reportInvalidJavadoc = CompilerOptions.ERROR;
1671
		reportInvalidJavadoc = CompilerOptions.ERROR;
1660
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1672
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1661
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1673
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1662
	}
1674
	}
1663
	public void testInvalidTagsNotVisibleRefFieldErrorTagsPrivate() {
1675
	public void testInvalidTagsNotVisibleRefFieldErrorTagsPrivate() {
1664
		reportInvalidJavadoc = CompilerOptions.ERROR;
1676
		reportInvalidJavadoc = CompilerOptions.ERROR;
1665
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1677
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1666
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1678
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1667
	}
1679
	}
1668
	public void testInvalidTagsNotVisibleRefMethodErrorTagsPrivate() {
1680
	public void testInvalidTagsNotVisibleRefMethodErrorTagsPrivate() {
1669
		reportInvalidJavadoc = CompilerOptions.ERROR;
1681
		reportInvalidJavadoc = CompilerOptions.ERROR;
1670
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1682
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1671
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1683
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1672
	}
1684
	}
1673
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsPrivate() {
1685
	public void testInvalidTagsNotVisibleRefConstructorErrorTagsPrivate() {
1674
		reportInvalidJavadoc = CompilerOptions.ERROR;
1686
		reportInvalidJavadoc = CompilerOptions.ERROR;
1675
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1687
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1676
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1688
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1677
	}
1689
	}
1678
1690
1679
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" and visibility "public"
1691
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" and visibility "public"
Lines 1683-1689 Link Here
1683
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1695
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1684
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1696
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1685
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1697
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1686
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1698
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1687
	}
1699
	}
1688
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsPublic() {
1700
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsPublic() {
1689
		reportInvalidJavadoc = CompilerOptions.ERROR;
1701
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1691-1697 Link Here
1691
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1703
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1692
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1704
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1693
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1705
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1694
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1706
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PUBLIC_VISIBILITY));
1695
	}
1707
	}
1696
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsPublic() {
1708
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsPublic() {
1697
		reportInvalidJavadoc = CompilerOptions.ERROR;
1709
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1699-1705 Link Here
1699
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1711
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1700
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1712
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1701
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1713
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1702
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1714
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1703
	}
1715
	}
1704
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsPublic() {
1716
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsPublic() {
1705
		reportInvalidJavadoc = CompilerOptions.ERROR;
1717
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1707-1713 Link Here
1707
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1719
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1708
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1720
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1709
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1721
		reportInvalidJavadocTagsVisibility = CompilerOptions.PUBLIC;
1710
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1722
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PUBLIC_VISIBILITY));
1711
	}
1723
	}
1712
1724
1713
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" visibility "protected"
1725
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" visibility "protected"
Lines 1717-1723 Link Here
1717
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1729
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1718
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1730
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1719
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1731
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1720
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1732
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1721
	}
1733
	}
1722
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsProtected() {
1734
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsProtected() {
1723
		reportInvalidJavadoc = CompilerOptions.ERROR;
1735
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1725-1731 Link Here
1725
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1737
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1726
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1738
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1727
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1739
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1728
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1740
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PROTECTED_VISIBILITY));
1729
	}
1741
	}
1730
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsProtected() {
1742
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsProtected() {
1731
		reportInvalidJavadoc = CompilerOptions.ERROR;
1743
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1733-1739 Link Here
1733
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1745
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1734
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1746
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1735
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1747
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1736
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1748
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1737
	}
1749
	}
1738
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsProtected() {
1750
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsProtected() {
1739
		reportInvalidJavadoc = CompilerOptions.ERROR;
1751
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1741-1747 Link Here
1741
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1753
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1742
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1754
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1743
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1755
		reportInvalidJavadocTagsVisibility = CompilerOptions.PROTECTED;
1744
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1756
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PROTECTED_VISIBILITY));
1745
	}
1757
	}
1746
1758
1747
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" and visibility "default"
1759
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" and visibility "default"
Lines 1751-1757 Link Here
1751
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1763
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1752
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1764
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1753
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1765
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1754
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1766
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1755
	}
1767
	}
1756
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsPackage() {
1768
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsPackage() {
1757
		reportInvalidJavadoc = CompilerOptions.ERROR;
1769
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1759-1765 Link Here
1759
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1771
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1760
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1772
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1761
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1773
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1762
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1774
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(DEFAULT_VISIBILITY));
1763
	}
1775
	}
1764
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsPackage() {
1776
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsPackage() {
1765
		reportInvalidJavadoc = CompilerOptions.ERROR;
1777
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1767-1773 Link Here
1767
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1779
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1768
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1780
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1769
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1781
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1770
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1782
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1771
	}
1783
	}
1772
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsPackage() {
1784
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsPackage() {
1773
		reportInvalidJavadoc = CompilerOptions.ERROR;
1785
		reportInvalidJavadoc = CompilerOptions.ERROR;
Lines 1775-1781 Link Here
1775
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1787
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1776
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1788
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1777
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1789
		reportInvalidJavadocTagsVisibility = CompilerOptions.DEFAULT;
1778
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1790
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(DEFAULT_VISIBILITY));
1779
	}
1791
	}
1780
1792
1781
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" and visibility "private"
1793
	// Test invalid javadoc "error" + tags "enabled" but invalid deprecated or not visible references "disabled" and visibility "private"
Lines 1783-1807 Link Here
1783
		reportInvalidJavadoc = CompilerOptions.ERROR;
1795
		reportInvalidJavadoc = CompilerOptions.ERROR;
1784
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1796
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1785
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1797
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1786
		runNegativeTest(InvalidReferencesClassJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1798
		runNegativeTest(CLASSES_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1787
	}
1799
	}
1788
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsPrivate() {
1800
	public void testInvalidTagsDeprecatedAndNotVisibleRefFieldErrorTagsPrivate() {
1789
		reportInvalidJavadoc = CompilerOptions.ERROR;
1801
		reportInvalidJavadoc = CompilerOptions.ERROR;
1790
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1802
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1791
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1803
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1792
		runNegativeTest(InvalidReferencesFieldJavadocComments, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1804
		runNegativeTest(FIELDS_INVALID_COMMENT, resultForInvalidTagsClassOrField(PRIVATE_VISIBILITY));
1793
	}
1805
	}
1794
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsPrivate() {
1806
	public void testInvalidTagsDeprecatedAndNotVisibleRefMethodErrorTagsPrivate() {
1795
		reportInvalidJavadoc = CompilerOptions.ERROR;
1807
		reportInvalidJavadoc = CompilerOptions.ERROR;
1796
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1808
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1797
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1809
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1798
		runNegativeTest(InvalidReferencesMethodJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1810
		runNegativeTest(METHODS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1799
	}
1811
	}
1800
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsPrivate() {
1812
	public void testInvalidTagsDeprecatedAndNotVisibleRefConstructorErrorTagsPrivate() {
1801
		reportInvalidJavadoc = CompilerOptions.ERROR;
1813
		reportInvalidJavadoc = CompilerOptions.ERROR;
1802
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1814
		reportInvalidJavadocTagsDeprecatedRef = CompilerOptions.DISABLED;
1803
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1815
		reportInvalidJavadocTagsNotVisibleRef = CompilerOptions.DISABLED;
1804
		runNegativeTest(InvalidReferencesConstructorJavadocComments, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1816
		runNegativeTest(CONSTRUCTORS_INVALID_COMMENT, resultForInvalidTagsMethodOrConstructor(PRIVATE_VISIBILITY));
1805
	}
1817
	}
1806
1818
1807
	/*
1819
	/*
Lines 1809-1815 Link Here
1809
	 */
1821
	 */
1810
	// Test default missing javadoc tags (means "ignore" with visibility "public" and overriding="enabled")
1822
	// Test default missing javadoc tags (means "ignore" with visibility "public" and overriding="enabled")
1811
	public void testMissingTagsDefaults() {
1823
	public void testMissingTagsDefaults() {
1812
		runConformTest(MissingTags);
1824
		runConformTest(MISSING_TAGS);
1813
	}
1825
	}
1814
1826
1815
	// Test missing javadoc tags "error" + "public" visibility + "enabled" overriding
1827
	// Test missing javadoc tags "error" + "public" visibility + "enabled" overriding
Lines 1817-1823 Link Here
1817
		reportMissingJavadocTags = CompilerOptions.ERROR;
1829
		reportMissingJavadocTags = CompilerOptions.ERROR;
1818
		reportMissingJavadocTagsVisibility = CompilerOptions.PUBLIC;
1830
		reportMissingJavadocTagsVisibility = CompilerOptions.PUBLIC;
1819
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1831
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1820
		runNegativeTest(MissingTags, resultForMissingTags(PUBLIC_VISIBILITY));
1832
		runNegativeTest(MISSING_TAGS, resultForMissingTags(PUBLIC_VISIBILITY));
1821
	}
1833
	}
1822
1834
1823
	// Test missing javadoc tags "error" + "public" visibility + "disabled" overriding
1835
	// Test missing javadoc tags "error" + "public" visibility + "disabled" overriding
Lines 1825-1831 Link Here
1825
		reportMissingJavadocTags = CompilerOptions.ERROR;
1837
		reportMissingJavadocTags = CompilerOptions.ERROR;
1826
		reportMissingJavadocTagsVisibility = CompilerOptions.PUBLIC;
1838
		reportMissingJavadocTagsVisibility = CompilerOptions.PUBLIC;
1827
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1839
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1828
		runNegativeTest(MissingTags, resultForMissingTags(PUBLIC_VISIBILITY));
1840
		runNegativeTest(MISSING_TAGS, resultForMissingTags(PUBLIC_VISIBILITY));
1829
	}
1841
	}
1830
1842
1831
	// Test missing javadoc tags "error" + "protected" visibility + "enabled" overriding
1843
	// Test missing javadoc tags "error" + "protected" visibility + "enabled" overriding
Lines 1833-1839 Link Here
1833
		reportMissingJavadocTags = CompilerOptions.ERROR;
1845
		reportMissingJavadocTags = CompilerOptions.ERROR;
1834
		reportMissingJavadocTagsVisibility = CompilerOptions.PROTECTED;
1846
		reportMissingJavadocTagsVisibility = CompilerOptions.PROTECTED;
1835
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1847
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1836
		runNegativeTest(MissingTags, resultForMissingTags(PROTECTED_VISIBILITY));
1848
		runNegativeTest(MISSING_TAGS, resultForMissingTags(PROTECTED_VISIBILITY));
1837
	}
1849
	}
1838
1850
1839
	// Test missing javadoc tags "error" + "protected" visibility + "disabled" overriding
1851
	// Test missing javadoc tags "error" + "protected" visibility + "disabled" overriding
Lines 1841-1847 Link Here
1841
		reportMissingJavadocTags = CompilerOptions.ERROR;
1853
		reportMissingJavadocTags = CompilerOptions.ERROR;
1842
		reportMissingJavadocTagsVisibility = CompilerOptions.PROTECTED;
1854
		reportMissingJavadocTagsVisibility = CompilerOptions.PROTECTED;
1843
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1855
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1844
		runNegativeTest(MissingTags, resultForMissingTags(PROTECTED_VISIBILITY));
1856
		runNegativeTest(MISSING_TAGS, resultForMissingTags(PROTECTED_VISIBILITY));
1845
	}
1857
	}
1846
1858
1847
	// Test missing javadoc tags "error" + "default" visibility + "enabled" overriding
1859
	// Test missing javadoc tags "error" + "default" visibility + "enabled" overriding
Lines 1849-1855 Link Here
1849
		reportMissingJavadocTags = CompilerOptions.ERROR;
1861
		reportMissingJavadocTags = CompilerOptions.ERROR;
1850
		reportMissingJavadocTagsVisibility = CompilerOptions.DEFAULT;
1862
		reportMissingJavadocTagsVisibility = CompilerOptions.DEFAULT;
1851
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1863
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1852
		runNegativeTest(MissingTags, resultForMissingTags(DEFAULT_VISIBILITY));
1864
		runNegativeTest(MISSING_TAGS, resultForMissingTags(DEFAULT_VISIBILITY));
1853
	}
1865
	}
1854
1866
1855
	// Test missing javadoc tags "error" + "default" visibility + "disabled" overriding
1867
	// Test missing javadoc tags "error" + "default" visibility + "disabled" overriding
Lines 1857-1863 Link Here
1857
		reportMissingJavadocTags = CompilerOptions.ERROR;
1869
		reportMissingJavadocTags = CompilerOptions.ERROR;
1858
		reportMissingJavadocTagsVisibility = CompilerOptions.DEFAULT;
1870
		reportMissingJavadocTagsVisibility = CompilerOptions.DEFAULT;
1859
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1871
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1860
		runNegativeTest(MissingTags, resultForMissingTags(DEFAULT_VISIBILITY));
1872
		runNegativeTest(MISSING_TAGS, resultForMissingTags(DEFAULT_VISIBILITY));
1861
	}
1873
	}
1862
1874
1863
	// Test missing javadoc tags "error" + "private" visibility + "enabled" overriding
1875
	// Test missing javadoc tags "error" + "private" visibility + "enabled" overriding
Lines 1865-1871 Link Here
1865
		reportMissingJavadocTags = CompilerOptions.ERROR;
1877
		reportMissingJavadocTags = CompilerOptions.ERROR;
1866
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1878
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1867
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1879
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
1868
		runNegativeTest(MissingTags, resultForMissingTags(PRIVATE_VISIBILITY));
1880
		runNegativeTest(MISSING_TAGS, resultForMissingTags(PRIVATE_VISIBILITY));
1869
	}
1881
	}
1870
1882
1871
	// Test missing javadoc tags "error" + "private" visibility + "disabled" overriding
1883
	// Test missing javadoc tags "error" + "private" visibility + "disabled" overriding
Lines 1873-1879 Link Here
1873
		reportMissingJavadocTags = CompilerOptions.ERROR;
1885
		reportMissingJavadocTags = CompilerOptions.ERROR;
1874
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1886
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1875
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1887
		reportMissingJavadocTagsOverriding = CompilerOptions.DISABLED;
1876
		runNegativeTest(MissingTags, resultForMissingTags(PRIVATE_VISIBILITY));
1888
		runNegativeTest(MISSING_TAGS, resultForMissingTags(PRIVATE_VISIBILITY));
1877
	}
1889
	}
1878
1890
1879
	/*
1891
	/*
Lines 1881-1887 Link Here
1881
	 */
1893
	 */
1882
	// Test default missing javadoc comments (means "ignore" with visibility "public" and overriding="enabled")
1894
	// Test default missing javadoc comments (means "ignore" with visibility "public" and overriding="enabled")
1883
	public void testMissingCommentsDefaults() {
1895
	public void testMissingCommentsDefaults() {
1884
		runConformTest(MissingComments);
1896
		runConformTest(MISSING_COMMENTS);
1885
	}
1897
	}
1886
1898
1887
	// Test missing javadoc comments "error" + "public" visibility + "enabled" overriding
1899
	// Test missing javadoc comments "error" + "public" visibility + "enabled" overriding
Lines 1889-1895 Link Here
1889
		reportMissingJavadocComments = CompilerOptions.ERROR;
1901
		reportMissingJavadocComments = CompilerOptions.ERROR;
1890
		reportMissingJavadocCommentsVisibility = CompilerOptions.PUBLIC;
1902
		reportMissingJavadocCommentsVisibility = CompilerOptions.PUBLIC;
1891
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1903
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1892
		runNegativeTest(MissingComments, resultForMissingComments(PUBLIC_VISIBILITY));
1904
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(PUBLIC_VISIBILITY));
1893
	}
1905
	}
1894
1906
1895
	// Test missing javadoc comments "error" + "public" visibility + "disabled" overriding
1907
	// Test missing javadoc comments "error" + "public" visibility + "disabled" overriding
Lines 1897-1903 Link Here
1897
		reportMissingJavadocComments = CompilerOptions.ERROR;
1909
		reportMissingJavadocComments = CompilerOptions.ERROR;
1898
		reportMissingJavadocCommentsVisibility = CompilerOptions.PUBLIC;
1910
		reportMissingJavadocCommentsVisibility = CompilerOptions.PUBLIC;
1899
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1911
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1900
		runNegativeTest(MissingComments, resultForMissingComments(PUBLIC_VISIBILITY));
1912
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(PUBLIC_VISIBILITY));
1901
	}
1913
	}
1902
1914
1903
	// Test missing javadoc comments "error" + "protected" visibility + "enabled" overriding
1915
	// Test missing javadoc comments "error" + "protected" visibility + "enabled" overriding
Lines 1905-1911 Link Here
1905
		reportMissingJavadocComments = CompilerOptions.ERROR;
1917
		reportMissingJavadocComments = CompilerOptions.ERROR;
1906
		reportMissingJavadocCommentsVisibility = CompilerOptions.PROTECTED;
1918
		reportMissingJavadocCommentsVisibility = CompilerOptions.PROTECTED;
1907
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1919
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1908
		runNegativeTest(MissingComments, resultForMissingComments(PROTECTED_VISIBILITY));
1920
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(PROTECTED_VISIBILITY));
1909
	}
1921
	}
1910
1922
1911
	// Test missing javadoc comments "error" + "protected" visibility + "disabled" overriding
1923
	// Test missing javadoc comments "error" + "protected" visibility + "disabled" overriding
Lines 1913-1919 Link Here
1913
		reportMissingJavadocComments = CompilerOptions.ERROR;
1925
		reportMissingJavadocComments = CompilerOptions.ERROR;
1914
		reportMissingJavadocCommentsVisibility = CompilerOptions.PROTECTED;
1926
		reportMissingJavadocCommentsVisibility = CompilerOptions.PROTECTED;
1915
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1927
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1916
		runNegativeTest(MissingComments, resultForMissingComments(PROTECTED_VISIBILITY));
1928
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(PROTECTED_VISIBILITY));
1917
	}
1929
	}
1918
1930
1919
	// Test missing javadoc comments "error" + "default" visibility + "enabled" overriding
1931
	// Test missing javadoc comments "error" + "default" visibility + "enabled" overriding
Lines 1921-1927 Link Here
1921
		reportMissingJavadocComments = CompilerOptions.ERROR;
1933
		reportMissingJavadocComments = CompilerOptions.ERROR;
1922
		reportMissingJavadocCommentsVisibility = CompilerOptions.DEFAULT;
1934
		reportMissingJavadocCommentsVisibility = CompilerOptions.DEFAULT;
1923
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1935
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1924
		runNegativeTest(MissingComments, resultForMissingComments(DEFAULT_VISIBILITY));
1936
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(DEFAULT_VISIBILITY));
1925
	}
1937
	}
1926
1938
1927
	// Test missing javadoc comments "error" + "default" visibility + "disabled" overriding
1939
	// Test missing javadoc comments "error" + "default" visibility + "disabled" overriding
Lines 1929-1935 Link Here
1929
		reportMissingJavadocComments = CompilerOptions.ERROR;
1941
		reportMissingJavadocComments = CompilerOptions.ERROR;
1930
		reportMissingJavadocCommentsVisibility = CompilerOptions.DEFAULT;
1942
		reportMissingJavadocCommentsVisibility = CompilerOptions.DEFAULT;
1931
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1943
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1932
		runNegativeTest(MissingComments, resultForMissingComments(DEFAULT_VISIBILITY));
1944
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(DEFAULT_VISIBILITY));
1933
	}
1945
	}
1934
1946
1935
	// Test missing javadoc comments "error" + "private" visibility + "enabled" overriding
1947
	// Test missing javadoc comments "error" + "private" visibility + "enabled" overriding
Lines 1937-1943 Link Here
1937
		reportMissingJavadocComments = CompilerOptions.ERROR;
1949
		reportMissingJavadocComments = CompilerOptions.ERROR;
1938
		reportMissingJavadocCommentsVisibility = CompilerOptions.PRIVATE;
1950
		reportMissingJavadocCommentsVisibility = CompilerOptions.PRIVATE;
1939
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1951
		reportMissingJavadocCommentsOverriding = CompilerOptions.ENABLED;
1940
		runNegativeTest(MissingComments, resultForMissingComments(PRIVATE_VISIBILITY));
1952
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(PRIVATE_VISIBILITY));
1941
	}
1953
	}
1942
1954
1943
	// Test missing javadoc comments "error" + "private" visibility + "disabled" overriding
1955
	// Test missing javadoc comments "error" + "private" visibility + "disabled" overriding
Lines 1945-1951 Link Here
1945
		reportMissingJavadocComments = CompilerOptions.ERROR;
1957
		reportMissingJavadocComments = CompilerOptions.ERROR;
1946
		reportMissingJavadocCommentsVisibility = CompilerOptions.PRIVATE;
1958
		reportMissingJavadocCommentsVisibility = CompilerOptions.PRIVATE;
1947
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1959
		reportMissingJavadocCommentsOverriding = CompilerOptions.DISABLED;
1948
		runNegativeTest(MissingComments, resultForMissingComments(PRIVATE_VISIBILITY));
1960
		runNegativeTest(MISSING_COMMENTS, resultForMissingComments(PRIVATE_VISIBILITY));
1949
	}
1961
	}
1950
	
1962
	
1951
	/*
1963
	/*
Lines 1954-1981 Link Here
1954
	public void testInvalidTagsClassWithMissingTagsOption() {
1966
	public void testInvalidTagsClassWithMissingTagsOption() {
1955
		reportMissingJavadocTags = CompilerOptions.ERROR;
1967
		reportMissingJavadocTags = CompilerOptions.ERROR;
1956
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1968
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1957
		runConformTest(InvalidReferencesClassJavadocComments);
1969
		runConformTest(CLASSES_INVALID_COMMENT);
1958
	}
1970
	}
1959
	public void testInvalidTagsFieldWithMissingTagsOption() {
1971
	public void testInvalidTagsFieldWithMissingTagsOption() {
1960
		reportMissingJavadocTags = CompilerOptions.ERROR;
1972
		reportMissingJavadocTags = CompilerOptions.ERROR;
1961
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1973
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1962
		runConformTest(InvalidReferencesFieldJavadocComments);
1974
		runConformTest(FIELDS_INVALID_COMMENT);
1963
	}
1975
	}
1964
	public void testInvalidTagsMethodWithMissingTagsOption() {
1976
	public void testInvalidTagsMethodWithMissingTagsOption() {
1965
		reportMissingJavadocTags = CompilerOptions.ERROR;
1977
		reportMissingJavadocTags = CompilerOptions.ERROR;
1966
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1978
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1967
		runConformTest(InvalidReferencesMethodJavadocComments);
1979
		runConformTest(METHODS_INVALID_COMMENT);
1968
	}
1980
	}
1969
	public void testInvalidTagsConstructorWithMissingTagsOption() {
1981
	public void testInvalidTagsConstructorWithMissingTagsOption() {
1970
		reportMissingJavadocTags = CompilerOptions.ERROR;
1982
		reportMissingJavadocTags = CompilerOptions.ERROR;
1971
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1983
		reportMissingJavadocTagsVisibility = CompilerOptions.PRIVATE;
1972
		runConformTest(InvalidReferencesConstructorJavadocComments);
1984
		runConformTest(CONSTRUCTORS_INVALID_COMMENT);
1973
	}
1985
	}
1974
	public void testMissingTagsWithInvalidTagsOption() {
1986
	public void testMissingTagsWithInvalidTagsOption() {
1975
		reportInvalidJavadoc = CompilerOptions.ERROR;
1987
		reportInvalidJavadoc = CompilerOptions.ERROR;
1976
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1988
		reportInvalidJavadocTags = CompilerOptions.ENABLED;
1977
		reportInvalidJavadocTagsVisibility = CompilerOptions.PRIVATE;
1989
		reportInvalidJavadocTagsVisibility = CompilerOptions.PRIVATE;
1978
		runConformTest(MissingTags);
1990
		runConformTest(MISSING_TAGS);
1979
	}
1991
	}
1980
1992
1981
	/**
1993
	/**
Lines 1987-2010 Link Here
1987
		this.docCommentSupport = CompilerOptions.DISABLED;
1999
		this.docCommentSupport = CompilerOptions.DISABLED;
1988
		reportInvalidJavadoc = CompilerOptions.ERROR;
2000
		reportInvalidJavadoc = CompilerOptions.ERROR;
1989
		reportInvalidJavadocTags = CompilerOptions.ERROR;
2001
		reportInvalidJavadocTags = CompilerOptions.ERROR;
1990
		runConformTest(InvalidReferencesClassJavadocComments);
2002
		runConformTest(CLASSES_INVALID_COMMENT);
1991
		runConformTest(InvalidReferencesFieldJavadocComments);
2003
		runConformTest(FIELDS_INVALID_COMMENT);
1992
		runConformTest(InvalidReferencesMethodJavadocComments);
2004
		runConformTest(METHODS_INVALID_COMMENT);
1993
		runConformTest(InvalidReferencesConstructorJavadocComments);
2005
		runConformTest(CONSTRUCTORS_INVALID_COMMENT);
1994
	}
2006
	}
1995
2007
1996
	// Test missing javadoc comments "error" with javadoc comment support disabled
2008
	// Test missing javadoc comments "error" with javadoc comment support disabled
1997
	public void testMissingCommentsJavadocSupportDisabled() {
2009
	public void testMissingCommentsJavadocSupportDisabled() {
1998
		this.docCommentSupport = CompilerOptions.DISABLED;
2010
		this.docCommentSupport = CompilerOptions.DISABLED;
1999
		reportMissingJavadocComments = CompilerOptions.ERROR;
2011
		reportMissingJavadocComments = CompilerOptions.ERROR;
2000
		runConformReferenceTest(MissingComments);
2012
		runConformReferenceTest(MISSING_COMMENTS);
2001
	}
2013
	}
2002
2014
2003
	// Test missing javadoc tags "error" with javadoc comment support disabled
2015
	// Test missing javadoc tags "error" with javadoc comment support disabled
2004
	public void testMissingTagsJavadocSupportDisabled() {
2016
	public void testMissingTagsJavadocSupportDisabled() {
2005
		this.docCommentSupport = CompilerOptions.DISABLED;
2017
		this.docCommentSupport = CompilerOptions.DISABLED;
2006
		reportMissingJavadocTags = CompilerOptions.ERROR;
2018
		reportMissingJavadocTags = CompilerOptions.ERROR;
2007
		runConformReferenceTest(MissingTags);
2019
		runConformReferenceTest(MISSING_TAGS);
2008
	}
2020
	}
2009
2021
2010
}
2022
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java (-261 / +254 lines)
Lines 20-25 Link Here
20
20
21
	String docCommentSupport = CompilerOptions.ENABLED;
21
	String docCommentSupport = CompilerOptions.ENABLED;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
23
	String reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
23
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocComments = null;
25
	String reportMissingJavadocComments = null;
25
	String reportDeprecation = CompilerOptions.ERROR;
26
	String reportDeprecation = CompilerOptions.ERROR;
Lines 36-42 Link Here
36
	// Use this static initializer to specify subset for tests
37
	// Use this static initializer to specify subset for tests
37
	// All specified tests which does not belong to the class are skipped...
38
	// All specified tests which does not belong to the class are skipped...
38
	static {
39
	static {
39
//		TESTS_PREFIX = "testBug83127";
40
//		TESTS_PREFIX = "testBug96237";
40
//		TESTS_NAMES = new String[] { "testBug68017javadocWarning2" };
41
//		TESTS_NAMES = new String[] { "testBug68017javadocWarning2" };
41
//		TESTS_NUMBERS = new int[] { 129241 };
42
//		TESTS_NUMBERS = new int[] { 129241 };
42
//		TESTS_RANGE = new int[] { 21, 50 };
43
//		TESTS_RANGE = new int[] { 21, 50 };
Lines 49-54 Link Here
49
		Map options = super.getCompilerOptions();
50
		Map options = super.getCompilerOptions();
50
		options.put(CompilerOptions.OPTION_DocCommentSupport, docCommentSupport);
51
		options.put(CompilerOptions.OPTION_DocCommentSupport, docCommentSupport);
51
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
52
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
53
		if (!CompilerOptions.IGNORE.equals(reportInvalidJavadoc)) {
54
			options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, this.reportInvalidJavadocVisibility);
55
		}
52
		if (this.reportJavadocDeprecation != null) {
56
		if (this.reportJavadocDeprecation != null) {
53
			options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, reportJavadocDeprecation);
57
			options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, reportJavadocDeprecation);
54
		}
58
		}
Lines 77-82 Link Here
77
		super.setUp();
81
		super.setUp();
78
		docCommentSupport = CompilerOptions.ENABLED;
82
		docCommentSupport = CompilerOptions.ENABLED;
79
		reportInvalidJavadoc = CompilerOptions.ERROR;
83
		reportInvalidJavadoc = CompilerOptions.ERROR;
84
		reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
80
		reportMissingJavadocTags = CompilerOptions.IGNORE;
85
		reportMissingJavadocTags = CompilerOptions.IGNORE;
81
		reportMissingJavadocComments = CompilerOptions.IGNORE;
86
		reportMissingJavadocComments = CompilerOptions.IGNORE;
82
		reportDeprecation = CompilerOptions.ERROR;
87
		reportDeprecation = CompilerOptions.ERROR;
Lines 220-264 Link Here
220
	public void testBug45592() {
225
	public void testBug45592() {
221
		runConformTest(
226
		runConformTest(
222
			new String[] {
227
			new String[] {
223
		"a/Y.java",
228
				"a/Y.java",
224
		"package a;\n" + 
229
				"package a;\n" + 
225
		"\n" + 
230
				"\n" + 
226
		"/** */\n" + 
231
				"/** */\n" + 
227
		"public class Y {\n" + 
232
				"public class Y {\n" + 
228
		"	protected boolean bar(Object obj) {\n" + 
233
				"	protected boolean bar(Object obj) {\n" + 
229
		"		return obj == null;\n" + 
234
				"		return obj == null;\n" + 
230
		"	}\n" + 
235
				"	}\n" + 
231
		"}\n",
236
				"}\n",
232
		"test/X.java",
237
				"test/X.java",
233
		"package test;\n" + 
238
				"package test;\n" + 
234
		"public class X {\n" + 
239
				"public class X {\n" + 
235
		"	public static Boolean valueOf(boolean bool) {\n" + 
240
				"	public static Boolean valueOf(boolean bool) {\n" + 
236
		"		if (bool) {\n" + 
241
				"		if (bool) {\n" + 
237
		"			return Boolean.TRUE;\n" + 
242
				"			return Boolean.TRUE;\n" + 
238
		"		} else {\n" + 
243
				"		} else {\n" + 
239
		"			return Boolean.FALSE;\n" + 
244
				"			return Boolean.FALSE;\n" + 
240
		"		}\n" + 
245
				"		}\n" + 
241
		"	}\n" + 
246
				"	}\n" + 
242
		"}\n",
247
				"}\n",
243
		"test/YY.java",
248
				"test/YY.java",
244
		"package test;\n" + 
249
				"package test;\n" + 
245
		"\n" + 
250
				"\n" + 
246
		"import a.Y;\n" + 
251
				"import a.Y;\n" + 
247
		"\n" + 
252
				"\n" + 
248
		"/** */\n" + 
253
				"/** */\n" + 
249
		"public class YY extends Y {\n" + 
254
				"public class YY extends Y {\n" + 
250
		"	/**\n" + 
255
				"	/**\n" + 
251
		"	 * Returns a Boolean.\n" + 
256
				"	 * Returns a Boolean.\n" + 
252
		"	 * @param key\n" + 
257
				"	 * @param key\n" + 
253
		"	 * @return A Boolean telling whether the key is null or not.\n" + 
258
				"	 * @return A Boolean telling whether the key is null or not.\n" + 
254
		"	 * @see #bar(Object)\n" + 
259
				"	 * @see #bar(Object)\n" + 
255
		"	 */\n" + 
260
				"	 */\n" + 
256
		"	protected Boolean foo(Object key) {\n" + 
261
				"	protected Boolean foo(Object key) {\n" + 
257
		"		return X.valueOf(bar(key));\n" + 
262
				"		return X.valueOf(bar(key));\n" + 
258
		"	}\n" + 
263
				"	}\n" + 
259
		"}\n"
264
				"}\n"
260
		}
265
			}
261
			);
266
		);
262
	}
267
	}
263
268
264
	/**
269
	/**
Lines 690-701 Link Here
690
				"}\n"
695
				"}\n"
691
			},
696
			},
692
			"----------\n" + 
697
			"----------\n" + 
693
			"1. WARNING in X.java (at line 2)\n" + 
698
			"1. ERROR in X.java (at line 5)\n" + 
694
			"	public class X extends RuntimeException {\n" + 
695
			"	             ^\n" + 
696
			"The serializable class X does not declare a static final serialVersionUID field of type long\n" + 
697
			"----------\n" + 
698
			"2. ERROR in X.java (at line 5)\n" + 
699
			"	public X(String message) {\n" + 
699
			"	public X(String message) {\n" + 
700
			"	                ^^^^^^^\n" + 
700
			"	                ^^^^^^^\n" + 
701
			"Javadoc: Missing tag for parameter message\n" + 
701
			"Javadoc: Missing tag for parameter message\n" + 
Lines 2420-2425 Link Here
2420
	}
2420
	}
2421
2421
2422
	/**
2422
	/**
2423
	 * Bug 68726: [Javadoc] Target attribute in @see link triggers warning
2424
	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=68726">68726</a>
2425
	 */
2426
	public void testBug68726conform1() {
2427
		runConformTest(
2428
			new String[] {
2429
				"X.java",
2430
				"public class X {\n" + 
2431
					"	/**\n" + 
2432
					"	 *	@see Object <a href=\"http://www.eclipse.org\" target=\"_top\">Eclipse</a>\n" + 
2433
					"	 */\n" + 
2434
					"	void foo1() {}\n" + 
2435
					"	/**@see Object <a href=\"http://www.eclipse.org\" target=\"_top\" target1=\"_top1\" target2=\"_top2\">Eclipse</a>*/\n" + 
2436
					"	void foo2() {}\n" + 
2437
					"}\n"	
2438
			}
2439
		);
2440
	}
2441
	public void testBug68726conform2() {
2442
		runConformTest(
2443
			new String[] {
2444
				"X.java",
2445
				"/**\n" + 
2446
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page</a>\n" + 
2447
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2448
					"	*          IBM Home Page</a>\n" + 
2449
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2450
					"	*          IBM Home Page\n" + 
2451
					"	* 			</a>\n" + 
2452
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2453
					"	*\n" + 
2454
					"	*          IBM\n" + 
2455
					"	*\n" + 
2456
					"	*          Home Page\n" + 
2457
					"	*\n" + 
2458
					"	*\n" + 
2459
					"	* 			</a>\n" + 
2460
					"	* @see Object\n" + 
2461
					"	*/\n" + 
2462
					"public class X {\n" + 
2463
					"}\n"	
2464
			}
2465
		);
2466
	}
2467
	public void testBug68726negative1() {
2468
		runNegativeTest(
2469
			new String[] {
2470
				"X.java",
2471
				"public class X {\n" + 
2472
					"	/**\n" + 
2473
					"	 * Invalid URL link references\n" + 
2474
					"	 *\n" + 
2475
					"	 * @see <a href=\"invalid\" target\n" + 
2476
					"	 * @see <a href=\"invalid\" target=\n" + 
2477
					"	 * @see <a href=\"invalid\" target=\"\n" + 
2478
					"	 * @see <a href=\"invalid\" target=\"_top\n" + 
2479
					"	 * @see <a href=\"invalid\" target=\"_top\"\n" + 
2480
					"	 * @see <a href=\"invalid\" target=\"_top\">\n" + 
2481
					"	 * @see <a href=\"invalid\" target=\"_top\">\n" + 
2482
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid\n" + 
2483
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid<\n" + 
2484
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid</\n" + 
2485
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + 
2486
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + 
2487
					"	 */\n" + 
2488
					"	void foo() {}\n" + 
2489
					"}\n"	
2490
			},
2491
			"----------\n" + 
2492
				"1. ERROR in X.java (at line 5)\n" + 
2493
				"	* @see <a href=\"invalid\" target\n" + 
2494
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2495
				"Javadoc: Malformed link reference\n" + 
2496
				"----------\n" + 
2497
				"2. ERROR in X.java (at line 6)\n" + 
2498
				"	* @see <a href=\"invalid\" target=\n" + 
2499
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2500
				"Javadoc: Malformed link reference\n" + 
2501
				"----------\n" + 
2502
				"3. ERROR in X.java (at line 7)\n" + 
2503
				"	* @see <a href=\"invalid\" target=\"\n" + 
2504
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2505
				"Javadoc: Malformed link reference\n" + 
2506
				"----------\n" + 
2507
				"4. ERROR in X.java (at line 8)\n" + 
2508
				"	* @see <a href=\"invalid\" target=\"_top\n" + 
2509
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2510
				"Javadoc: Malformed link reference\n" + 
2511
				"----------\n" + 
2512
				"5. ERROR in X.java (at line 9)\n" + 
2513
				"	* @see <a href=\"invalid\" target=\"_top\"\n" + 
2514
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2515
				"Javadoc: Malformed link reference\n" + 
2516
				"----------\n" + 
2517
				"6. ERROR in X.java (at line 10)\n" + 
2518
				"	* @see <a href=\"invalid\" target=\"_top\">\n" + 
2519
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2520
				"Javadoc: Malformed link reference\n" + 
2521
				"----------\n" + 
2522
				"7. ERROR in X.java (at line 11)\n" + 
2523
				"	* @see <a href=\"invalid\" target=\"_top\">\n" + 
2524
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2525
				"Javadoc: Malformed link reference\n" + 
2526
				"----------\n" + 
2527
				"8. ERROR in X.java (at line 12)\n" + 
2528
				"	* @see <a href=\"invalid\" target=\"_top\">invalid\n" + 
2529
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2530
				"Javadoc: Malformed link reference\n" + 
2531
				"----------\n" + 
2532
				"9. ERROR in X.java (at line 13)\n" + 
2533
				"	* @see <a href=\"invalid\" target=\"_top\">invalid<\n" + 
2534
				"	                                              ^\n" + 
2535
				"Javadoc: Malformed link reference\n" + 
2536
				"----------\n" + 
2537
				"10. ERROR in X.java (at line 14)\n" + 
2538
				"	* @see <a href=\"invalid\" target=\"_top\">invalid</\n" + 
2539
				"	                                              ^^\n" + 
2540
				"Javadoc: Malformed link reference\n" + 
2541
				"----------\n" + 
2542
				"11. ERROR in X.java (at line 15)\n" + 
2543
				"	* @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + 
2544
				"	                                              ^^^\n" + 
2545
				"Javadoc: Malformed link reference\n" + 
2546
				"----------\n" + 
2547
				"12. ERROR in X.java (at line 16)\n" + 
2548
				"	* @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + 
2549
				"	                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2550
				"Javadoc: Unexpected text\n" + 
2551
				"----------\n"
2552
		);
2553
	}
2554
	public void testBug68726negative2() {
2555
		runNegativeTest(
2556
			new String[] {
2557
				"X.java",
2558
				"/**\n" + 
2559
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + 
2560
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2561
					"	*          IBM Home Page\n" + 
2562
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2563
					"	*          IBM Home Page<\n" + 
2564
					"	* 			/a>\n" + 
2565
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2566
					"	*\n" + 
2567
					"	*          IBM\n" + 
2568
					"	*\n" + 
2569
					"	*          Home Page\n" + 
2570
					"	*\n" + 
2571
					"	*\n" + 
2572
					"	* 			\n" + 
2573
					"	* @see Unknown\n" + 
2574
					"	*/\n" + 
2575
					"public class X {\n" + 
2576
					"}\n"	
2577
			},
2578
			"----------\n" + 
2579
				"1. ERROR in X.java (at line 2)\n" + 
2580
				"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + 
2581
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2582
				"Javadoc: Malformed link reference\n" + 
2583
				"----------\n" + 
2584
				"2. ERROR in X.java (at line 3)\n" + 
2585
				"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2586
				"	*          IBM Home Page\n" + 
2587
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2588
				"Javadoc: Malformed link reference\n" + 
2589
				"----------\n" + 
2590
				"3. ERROR in X.java (at line 6)\n" + 
2591
				"	*          IBM Home Page<\n" + 
2592
				"	                        ^\n" + 
2593
				"Javadoc: Malformed link reference\n" + 
2594
				"----------\n" + 
2595
				"4. ERROR in X.java (at line 8)\n" + 
2596
				"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2597
				"	*\n" + 
2598
				"	*          IBM\n" + 
2599
				"	*\n" + 
2600
				"	*          Home Page\n" + 
2601
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2602
				"Javadoc: Malformed link reference\n" + 
2603
				"----------\n" + 
2604
				"5. ERROR in X.java (at line 16)\n" + 
2605
				"	* @see Unknown\n" + 
2606
				"	       ^^^^^^^\n" + 
2607
				"Javadoc: Unknown cannot be resolved to a type\n" + 
2608
				"----------\n"
2609
		);
2610
	}
2611
2612
	/**
2423
	 * Bug 69272: [Javadoc] Invalid malformed reference (missing separator)
2613
	 * Bug 69272: [Javadoc] Invalid malformed reference (missing separator)
2424
	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=69272">69272</a>
2614
	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=69272">69272</a>
2425
	 */
2615
	 */
Lines 2709-2904 Link Here
2709
	}
2899
	}
2710
2900
2711
	/**
2901
	/**
2712
	 * Bug 68726: [Javadoc] Target attribute in @see link triggers warning
2713
	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=68726">68726</a>
2714
	 */
2715
	public void testBug68726conform1() {
2716
		runConformTest(
2717
			new String[] {
2718
				"X.java",
2719
				"public class X {\n" + 
2720
					"	/**\n" + 
2721
					"	 *	@see Object <a href=\"http://www.eclipse.org\" target=\"_top\">Eclipse</a>\n" + 
2722
					"	 */\n" + 
2723
					"	void foo1() {}\n" + 
2724
					"	/**@see Object <a href=\"http://www.eclipse.org\" target=\"_top\" target1=\"_top1\" target2=\"_top2\">Eclipse</a>*/\n" + 
2725
					"	void foo2() {}\n" + 
2726
					"}\n"	
2727
			}
2728
		);
2729
	}
2730
	public void testBug68726conform2() {
2731
		runConformTest(
2732
			new String[] {
2733
				"X.java",
2734
				"/**\n" + 
2735
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page</a>\n" + 
2736
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2737
					"	*          IBM Home Page</a>\n" + 
2738
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2739
					"	*          IBM Home Page\n" + 
2740
					"	* 			</a>\n" + 
2741
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2742
					"	*\n" + 
2743
					"	*          IBM\n" + 
2744
					"	*\n" + 
2745
					"	*          Home Page\n" + 
2746
					"	*\n" + 
2747
					"	*\n" + 
2748
					"	* 			</a>\n" + 
2749
					"	* @see Object\n" + 
2750
					"	*/\n" + 
2751
					"public class X {\n" + 
2752
					"}\n"	
2753
			}
2754
		);
2755
	}
2756
	public void testBug68726negative1() {
2757
		runNegativeTest(
2758
			new String[] {
2759
				"X.java",
2760
				"public class X {\n" + 
2761
					"	/**\n" + 
2762
					"	 * Invalid URL link references\n" + 
2763
					"	 *\n" + 
2764
					"	 * @see <a href=\"invalid\" target\n" + 
2765
					"	 * @see <a href=\"invalid\" target=\n" + 
2766
					"	 * @see <a href=\"invalid\" target=\"\n" + 
2767
					"	 * @see <a href=\"invalid\" target=\"_top\n" + 
2768
					"	 * @see <a href=\"invalid\" target=\"_top\"\n" + 
2769
					"	 * @see <a href=\"invalid\" target=\"_top\">\n" + 
2770
					"	 * @see <a href=\"invalid\" target=\"_top\">\n" + 
2771
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid\n" + 
2772
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid<\n" + 
2773
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid</\n" + 
2774
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + 
2775
					"	 * @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + 
2776
					"	 */\n" + 
2777
					"	void foo() {}\n" + 
2778
					"}\n"	
2779
			},
2780
			"----------\n" + 
2781
				"1. ERROR in X.java (at line 5)\n" + 
2782
				"	* @see <a href=\"invalid\" target\n" + 
2783
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2784
				"Javadoc: Malformed link reference\n" + 
2785
				"----------\n" + 
2786
				"2. ERROR in X.java (at line 6)\n" + 
2787
				"	* @see <a href=\"invalid\" target=\n" + 
2788
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2789
				"Javadoc: Malformed link reference\n" + 
2790
				"----------\n" + 
2791
				"3. ERROR in X.java (at line 7)\n" + 
2792
				"	* @see <a href=\"invalid\" target=\"\n" + 
2793
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2794
				"Javadoc: Malformed link reference\n" + 
2795
				"----------\n" + 
2796
				"4. ERROR in X.java (at line 8)\n" + 
2797
				"	* @see <a href=\"invalid\" target=\"_top\n" + 
2798
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2799
				"Javadoc: Malformed link reference\n" + 
2800
				"----------\n" + 
2801
				"5. ERROR in X.java (at line 9)\n" + 
2802
				"	* @see <a href=\"invalid\" target=\"_top\"\n" + 
2803
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2804
				"Javadoc: Malformed link reference\n" + 
2805
				"----------\n" + 
2806
				"6. ERROR in X.java (at line 10)\n" + 
2807
				"	* @see <a href=\"invalid\" target=\"_top\">\n" + 
2808
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2809
				"Javadoc: Malformed link reference\n" + 
2810
				"----------\n" + 
2811
				"7. ERROR in X.java (at line 11)\n" + 
2812
				"	* @see <a href=\"invalid\" target=\"_top\">\n" + 
2813
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2814
				"Javadoc: Malformed link reference\n" + 
2815
				"----------\n" + 
2816
				"8. ERROR in X.java (at line 12)\n" + 
2817
				"	* @see <a href=\"invalid\" target=\"_top\">invalid\n" + 
2818
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2819
				"Javadoc: Malformed link reference\n" + 
2820
				"----------\n" + 
2821
				"9. ERROR in X.java (at line 13)\n" + 
2822
				"	* @see <a href=\"invalid\" target=\"_top\">invalid<\n" + 
2823
				"	                                              ^\n" + 
2824
				"Javadoc: Malformed link reference\n" + 
2825
				"----------\n" + 
2826
				"10. ERROR in X.java (at line 14)\n" + 
2827
				"	* @see <a href=\"invalid\" target=\"_top\">invalid</\n" + 
2828
				"	                                              ^^\n" + 
2829
				"Javadoc: Malformed link reference\n" + 
2830
				"----------\n" + 
2831
				"11. ERROR in X.java (at line 15)\n" + 
2832
				"	* @see <a href=\"invalid\" target=\"_top\">invalid</a\n" + 
2833
				"	                                              ^^^\n" + 
2834
				"Javadoc: Malformed link reference\n" + 
2835
				"----------\n" + 
2836
				"12. ERROR in X.java (at line 16)\n" + 
2837
				"	* @see <a href=\"invalid\" target=\"_top\">invalid</a> no text allowed after the href\n" + 
2838
				"	                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2839
				"Javadoc: Unexpected text\n" + 
2840
				"----------\n"
2841
		);
2842
	}
2843
	public void testBug68726negative2() {
2844
		runNegativeTest(
2845
			new String[] {
2846
				"X.java",
2847
				"/**\n" + 
2848
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + 
2849
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2850
					"	*          IBM Home Page\n" + 
2851
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2852
					"	*          IBM Home Page<\n" + 
2853
					"	* 			/a>\n" + 
2854
					"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2855
					"	*\n" + 
2856
					"	*          IBM\n" + 
2857
					"	*\n" + 
2858
					"	*          Home Page\n" + 
2859
					"	*\n" + 
2860
					"	*\n" + 
2861
					"	* 			\n" + 
2862
					"	* @see Unknown\n" + 
2863
					"	*/\n" + 
2864
					"public class X {\n" + 
2865
					"}\n"	
2866
			},
2867
			"----------\n" + 
2868
				"1. ERROR in X.java (at line 2)\n" + 
2869
				"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">IBM Home Page\n" + 
2870
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2871
				"Javadoc: Malformed link reference\n" + 
2872
				"----------\n" + 
2873
				"2. ERROR in X.java (at line 3)\n" + 
2874
				"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2875
				"	*          IBM Home Page\n" + 
2876
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2877
				"Javadoc: Malformed link reference\n" + 
2878
				"----------\n" + 
2879
				"3. ERROR in X.java (at line 6)\n" + 
2880
				"	*          IBM Home Page<\n" + 
2881
				"	                        ^\n" + 
2882
				"Javadoc: Malformed link reference\n" + 
2883
				"----------\n" + 
2884
				"4. ERROR in X.java (at line 8)\n" + 
2885
				"	* @see <a href=\"http:/www.ibm.com\" target=\"_top\">\n" + 
2886
				"	*\n" + 
2887
				"	*          IBM\n" + 
2888
				"	*\n" + 
2889
				"	*          Home Page\n" + 
2890
				"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2891
				"Javadoc: Malformed link reference\n" + 
2892
				"----------\n" + 
2893
				"5. ERROR in X.java (at line 16)\n" + 
2894
				"	* @see Unknown\n" + 
2895
				"	       ^^^^^^^\n" + 
2896
				"Javadoc: Unknown cannot be resolved to a type\n" + 
2897
				"----------\n"
2898
		);
2899
	}
2900
2901
	/**
2902
	 * Bug 70892: [1.5][Javadoc] Compiler should parse reference for inline tag @value
2902
	 * Bug 70892: [1.5][Javadoc] Compiler should parse reference for inline tag @value
2903
	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=70892">70892</a>
2903
	 * @see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=70892">70892</a>
2904
	 * These two tests should pass whatever the source level...
2904
	 * These two tests should pass whatever the source level...
Lines 3567-3596 Link Here
3567
	/**
3567
	/**
3568
	 * Bug 77602: [javadoc] "Only consider members as visible as" is does not work for syntax error
3568
	 * Bug 77602: [javadoc] "Only consider members as visible as" is does not work for syntax error
3569
	 */
3569
	 */
3570
	public void testBug77602public() {
3570
	public void testBug77602() {
3571
		Map options = getCompilerOptions();
3572
		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, CompilerOptions.PUBLIC);
3573
		runConformTest(
3574
			new String[] {
3575
				"X.java",
3576
				"public class X {\n" + 
3577
					"  /**\n" + 
3578
					"   * @see\n" + 
3579
					"   * @see UnknownClass\n" + 
3580
					"   */\n" + 
3581
					"  protected void foo() {\n" + 
3582
					"  }\n" + 
3583
				"}\n"
3584
			},
3585
			"",
3586
			null,
3587
			true,
3588
			null,
3589
			options,
3590
			null
3591
		);
3592
	}
3593
	public void testBug77602private() {
3594
		runNegativeTest(
3571
		runNegativeTest(
3595
			new String[] {
3572
			new String[] {
3596
				"X.java",
3573
				"X.java",
Lines 3616-3621 Link Here
3616
				"----------\n"
3593
				"----------\n"
3617
		);
3594
		);
3618
	}
3595
	}
3596
	public void testBug77602_Public() {
3597
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
3598
		runConformTest(
3599
			new String[] {
3600
				"X.java",
3601
				"public class X {\n" + 
3602
					"  /**\n" + 
3603
					"   * @see\n" + 
3604
					"   * @see UnknownClass\n" + 
3605
					"   */\n" + 
3606
					"  protected void foo() {\n" + 
3607
					"  }\n" + 
3608
				"}\n"
3609
			}
3610
		);
3611
	}
3619
3612
3620
	/**
3613
	/**
3621
	 * Bug 78091: [1.5][javadoc] Compiler should accept new 1.5 syntax for @param
3614
	 * Bug 78091: [1.5][javadoc] Compiler should accept new 1.5 syntax for @param
Lines 3751-3757 Link Here
3751
				"	class C { \n" + 
3744
				"	class C { \n" + 
3752
				"	    /**\n" + 
3745
				"	    /**\n" + 
3753
				"	     * Link {@link #B(Exception)} OK\n" + 
3746
				"	     * Link {@link #B(Exception)} OK\n" + 
3754
				"	     * Link {@link #C(String)} OK\n" + 
3747
				"	     * Link {@link #B.C(String)} OK\n" + 
3755
				"	     * Link {@link #foo()} OK\n" + 
3748
				"	     * Link {@link #foo()} OK\n" + 
3756
				"	     * Link {@link #bar()} OK\n" + 
3749
				"	     * Link {@link #bar()} OK\n" + 
3757
				"	     */\n" + 
3750
				"	     */\n" + 
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_4.java (-3 / +845 lines)
Lines 20-25 Link Here
20
20
21
	String docCommentSupport = CompilerOptions.ENABLED;
21
	String docCommentSupport = CompilerOptions.ENABLED;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
23
	String reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
23
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocComments = null;
25
	String reportMissingJavadocComments = null;
25
	String reportMissingJavadocCommentsVisibility = null;
26
	String reportMissingJavadocCommentsVisibility = null;
Lines 50-55 Link Here
50
		Map options = super.getCompilerOptions();
51
		Map options = super.getCompilerOptions();
51
		options.put(CompilerOptions.OPTION_DocCommentSupport, this.docCommentSupport);
52
		options.put(CompilerOptions.OPTION_DocCommentSupport, this.docCommentSupport);
52
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
53
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
54
		if (!CompilerOptions.IGNORE.equals(reportInvalidJavadoc)) {
55
			options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, this.reportInvalidJavadocVisibility);
56
		}
53
		if (reportMissingJavadocComments != null) 
57
		if (reportMissingJavadocComments != null) 
54
			options.put(CompilerOptions.OPTION_ReportMissingJavadocComments, reportMissingJavadocComments);
58
			options.put(CompilerOptions.OPTION_ReportMissingJavadocComments, reportMissingJavadocComments);
55
		else
59
		else
Lines 72-80 Link Here
72
	protected void setUp() throws Exception {
76
	protected void setUp() throws Exception {
73
		super.setUp();
77
		super.setUp();
74
		this.docCommentSupport = CompilerOptions.ENABLED;
78
		this.docCommentSupport = CompilerOptions.ENABLED;
75
		reportInvalidJavadoc = CompilerOptions.ERROR;
79
		this.reportInvalidJavadoc = CompilerOptions.ERROR;
76
		reportMissingJavadocTags = CompilerOptions.ERROR;
80
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
77
		reportMissingJavadocComments = CompilerOptions.IGNORE;
81
		this.reportMissingJavadocTags = CompilerOptions.ERROR;
82
		this.reportMissingJavadocComments = CompilerOptions.IGNORE;
78
	}
83
	}
79
84
80
	/**
85
	/**
Lines 2817-2822 Link Here
2817
	}
2822
	}
2818
2823
2819
	/**
2824
	/**
2825
	 * Bug 96237: [javadoc] Inner types must be qualified
2826
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=96237"
2827
	 */
2828
	public void testBug96237_Public01() {
2829
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2830
		runConformTest(
2831
			new String[] {
2832
				"comment6/Valid.java",
2833
				"package comment6;\n" + 
2834
				"public class Valid {\n" + 
2835
				"    /**\n" + 
2836
				"     * @see Valid.Inner\n" + 
2837
				"     */\n" + 
2838
				"    public class Inner { }\n" + 
2839
				"}\n" + 
2840
				"/**\n" + 
2841
				" * See also {@link Valid.Inner}\n" + 
2842
				" */\n" + 
2843
				"class Sub2 extends Valid { }"
2844
			}
2845
		);
2846
	}
2847
	public void testBug96237_Public02() {
2848
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2849
		runNegativeTest(
2850
			new String[] {
2851
				"comment6/Invalid.java",
2852
				"package comment6;\n" + 
2853
				"public class Invalid {\n" + 
2854
				"    /**\n" + 
2855
				"     * @see Inner\n" + 
2856
				"     */\n" + 
2857
				"    public class Inner { }\n" + 
2858
				"}\n" + 
2859
				"/**\n" + 
2860
				" * See also {@link Inner} \n" + 
2861
				" */\n" + 
2862
				"class Sub1 extends Invalid { }\n"
2863
			},
2864
//			comment6\Invalid.java:6: warning - Tag @see: reference not found: Inner
2865
			"----------\n" + 
2866
			"1. ERROR in comment6\\Invalid.java (at line 4)\r\n" + 
2867
			"	* @see Inner\r\n" + 
2868
			"	       ^^^^^\n" + 
2869
			"Javadoc: Not visible reference\n" + 
2870
			"----------\n"
2871
		);
2872
	}
2873
	public void testBug96237_Public03() {
2874
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2875
		runNegativeTest(
2876
			new String[] {
2877
				"comment6a/def/Test.java",
2878
				"package comment6a.def;\n" + 
2879
				"public class Test {\n" + 
2880
				"    /**\n" + 
2881
				"     * @see Inner\n" + 
2882
				"     */\n" + 
2883
				"    public class Inner { }\n" + 
2884
				"}\n",
2885
				"comment6a/test/Invalid.java",
2886
				"package comment6a.test;\n" + 
2887
				"import comment6a.def.Test;\n" + 
2888
				"/**\n" + 
2889
				" * See also {@link Inner}\n" + 
2890
				" */\n" + 
2891
				"public class Invalid extends Test { \n" + 
2892
				"}",
2893
				"comment6a/test/Invalid2.java",
2894
				"package comment6a.test;\n" + 
2895
				"import comment6a.def.Test;\n" + 
2896
				"/**\n" + 
2897
				" * @see Test.Inner\n" + 
2898
				" */\n" + 
2899
				"public class Invalid2 extends Test { \n" + 
2900
				"}"
2901
			},
2902
//			comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
2903
//			comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2904
//			comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner
2905
			"----------\n" + 
2906
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
2907
			"	* @see Inner\n" + 
2908
			"	       ^^^^^\n" + 
2909
			"Javadoc: Not visible reference\n" + 
2910
			"----------\n" + 
2911
			"----------\n" + 
2912
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
2913
			"	* See also {@link Inner}\n" + 
2914
			"	                  ^^^^^\n" + 
2915
			"Javadoc: Not visible reference\n" + 
2916
			"----------\n" + 
2917
			"----------\n" + 
2918
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
2919
			"	* @see Test.Inner\n" + 
2920
			"	       ^^^^^^^^^^\n" + 
2921
			"Javadoc: Not visible reference\n" + 
2922
			"----------\n"
2923
		);
2924
	}
2925
	public void testBug96237_Public04() {
2926
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2927
		runNegativeTest(
2928
			new String[] {
2929
				"comment6b/Invalid.java",
2930
				"package comment6b;\n" + 
2931
				"\n" + 
2932
				"/**\n" + 
2933
				" * @see Inner\n" + 
2934
				" */\n" + 
2935
				"public class Invalid implements Test { \n" + 
2936
				"}",
2937
				"comment6b/Test.java",
2938
				"package comment6b;\n" + 
2939
				"public interface Test {\n" + 
2940
				"    /**\n" + 
2941
				"     * @see Inner\n" + 
2942
				"     */\n" + 
2943
				"    public class Inner { }\n" + 
2944
				"}\n",
2945
				"comment6b/Valid.java",
2946
				"package comment6b;\n" + 
2947
				"\n" + 
2948
				"/**\n" + 
2949
				" * @see Test.Inner\n" + 
2950
				" */\n" + 
2951
				"public class Valid implements Test { \n" + 
2952
				"}"
2953
			},
2954
//			comment6b\Test.java:6: warning - Tag @see: reference not found: Inner
2955
//			comment6b\Invalid.java:6: warning - Tag @see: reference not found: Inner
2956
			"----------\n" + 
2957
			"1. ERROR in comment6b\\Invalid.java (at line 4)\n" + 
2958
			"	* @see Inner\n" + 
2959
			"	       ^^^^^\n" + 
2960
			"Javadoc: Not visible reference\n" + 
2961
			"----------\n" + 
2962
			"----------\n" + 
2963
			"1. ERROR in comment6b\\Test.java (at line 4)\n" + 
2964
			"	* @see Inner\n" + 
2965
			"	       ^^^^^\n" + 
2966
			"Javadoc: Not visible reference\n" + 
2967
			"----------\n"
2968
		);
2969
	}
2970
	public void testBug96237_Public05() {
2971
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2972
		runNegativeTest(
2973
			new String[] {
2974
				"test/a/Test.java",
2975
				"package test.a;\n" + 
2976
				"/**\n" + 
2977
				" * @see Inner\n" + 
2978
				" * @see Test.Inner\n" + 
2979
				" */\n" + 
2980
				"public class Test {\n" + 
2981
				"	class Inner {}\n" + 
2982
				"}\n"
2983
			},
2984
//			test\a\Test.java:6: warning - Tag @see: reference not found: Inner
2985
//			test\a\Test.java:6: warning - Tag @see: reference not found: Test.Inner
2986
			"----------\n" + 
2987
			"1. ERROR in test\\a\\Test.java (at line 3)\n" + 
2988
			"	* @see Inner\n" + 
2989
			"	       ^^^^^\n" + 
2990
			"Javadoc: Not visible reference\n" + 
2991
			"----------\n" + 
2992
			"2. ERROR in test\\a\\Test.java (at line 4)\n" + 
2993
			"	* @see Test.Inner\n" + 
2994
			"	       ^^^^^^^^^^\n" + 
2995
			"Javadoc: Not visible reference\n" + 
2996
			"----------\n"
2997
		);
2998
	}
2999
	public void testBug96237_Public06() {
3000
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
3001
		runNegativeTest(
3002
			new String[] {
3003
				"test/b/Test.java",
3004
				"package test.b;\n" + 
3005
				"/** \n" + 
3006
				" * @see Inner.Level2\n" + 
3007
				" * @see Test.Inner.Level2\n" + 
3008
				" */\n" + 
3009
				"public class Test {\n" + 
3010
				"	/** \n" + 
3011
				"	 * @see Level2\n" + 
3012
				"	 * @see Test.Inner.Level2\n" + 
3013
				"	 */\n" + 
3014
				"	public class Inner {\n" + 
3015
				"		class Level2 {}\n" + 
3016
				"	}\n" + 
3017
				"}\n"
3018
			},
3019
//			test\b\Test.java:6: warning - Tag @see: reference not found: Inner.Level2
3020
//			test\b\Test.java:6: warning - Tag @see: reference not found: Test.Inner.Level2
3021
//			test\b\Test.java:11: warning - Tag @see: reference not found: Level2
3022
//			test\b\Test.java:11: warning - Tag @see: reference not found: Test.Inner.Level2
3023
			"----------\n" + 
3024
			"1. ERROR in test\\b\\Test.java (at line 3)\n" + 
3025
			"	* @see Inner.Level2\n" + 
3026
			"	       ^^^^^^^^^^^^\n" + 
3027
			"Javadoc: Not visible reference\n" + 
3028
			"----------\n" + 
3029
			"2. ERROR in test\\b\\Test.java (at line 4)\n" + 
3030
			"	* @see Test.Inner.Level2\n" + 
3031
			"	       ^^^^^^^^^^^^^^^^^\n" + 
3032
			"Javadoc: Not visible reference\n" + 
3033
			"----------\n" + 
3034
			"3. ERROR in test\\b\\Test.java (at line 8)\n" + 
3035
			"	* @see Level2\n" + 
3036
			"	       ^^^^^^\n" + 
3037
			"Javadoc: Not visible reference\n" + 
3038
			"----------\n" + 
3039
			"4. ERROR in test\\b\\Test.java (at line 9)\n" + 
3040
			"	* @see Test.Inner.Level2\n" + 
3041
			"	       ^^^^^^^^^^^^^^^^^\n" + 
3042
			"Javadoc: Not visible reference\n" + 
3043
			"----------\n"
3044
		);
3045
	}
3046
	public void testBug96237_Public07() {
3047
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
3048
		runNegativeTest(
3049
			new String[] {
3050
				"test/c/Test.java",
3051
				"package test.c;\n" + 
3052
				"/**\n" + 
3053
				" * @see Inner.Level2.Level3\n" + 
3054
				" * @see Test.Inner.Level2.Level3\n" + 
3055
				" */\n" + 
3056
				"public class Test {\n" + 
3057
				"	public class Inner {\n" + 
3058
				"		/**\n" + 
3059
				"		 * @see Level3\n" + 
3060
				"		 * @see Level2.Level3\n" + 
3061
				"		 * @see Inner.Level2.Level3\n" + 
3062
				"		 * @see Test.Inner.Level2.Level3\n" + 
3063
				"		 */\n" + 
3064
				"		public class Level2 {\n" + 
3065
				"			class Level3 {\n" + 
3066
				"			}\n" + 
3067
				"		}\n" + 
3068
				"	}\n" + 
3069
				"}\n"
3070
			},
3071
//			test\c\Test.java:6: warning - Tag @see: reference not found: Inner.Level2.Level3
3072
//			test\c\Test.java:6: warning - Tag @see: reference not found: Test.Inner.Level2.Level3
3073
//			test\c\Test.java:14: warning - Tag @see: reference not found: Level3
3074
//			test\c\Test.java:14: warning - Tag @see: reference not found: Level2.Level3
3075
//			test\c\Test.java:14: warning - Tag @see: reference not found: Inner.Level2.Level3
3076
//			test\c\Test.java:14: warning - Tag @see: reference not found: Test.Inner.Level2.Level3
3077
			"----------\n" + 
3078
			"1. ERROR in test\\c\\Test.java (at line 3)\n" + 
3079
			"	* @see Inner.Level2.Level3\n" + 
3080
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
3081
			"Javadoc: Not visible reference\n" + 
3082
			"----------\n" + 
3083
			"2. ERROR in test\\c\\Test.java (at line 4)\n" + 
3084
			"	* @see Test.Inner.Level2.Level3\n" + 
3085
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3086
			"Javadoc: Not visible reference\n" + 
3087
			"----------\n" + 
3088
			"3. ERROR in test\\c\\Test.java (at line 9)\n" + 
3089
			"	* @see Level3\n" + 
3090
			"	       ^^^^^^\n" + 
3091
			"Javadoc: Not visible reference\n" + 
3092
			"----------\n" + 
3093
			"4. ERROR in test\\c\\Test.java (at line 10)\n" + 
3094
			"	* @see Level2.Level3\n" + 
3095
			"	       ^^^^^^^^^^^^^\n" + 
3096
			"Javadoc: Not visible reference\n" + 
3097
			"----------\n" + 
3098
			"5. ERROR in test\\c\\Test.java (at line 11)\n" + 
3099
			"	* @see Inner.Level2.Level3\n" + 
3100
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
3101
			"Javadoc: Not visible reference\n" + 
3102
			"----------\n" + 
3103
			"6. ERROR in test\\c\\Test.java (at line 12)\n" + 
3104
			"	* @see Test.Inner.Level2.Level3\n" + 
3105
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3106
			"Javadoc: Not visible reference\n" + 
3107
			"----------\n"
3108
		);
3109
	}
3110
	public void testBug96237_Private01() {
3111
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3112
		runConformTest(
3113
			new String[] {
3114
				"comment6/Valid.java",
3115
				"package comment6;\n" + 
3116
				"public class Valid {\n" + 
3117
				"    /**\n" + 
3118
				"     * @see Valid.Inner\n" + 
3119
				"     */\n" + 
3120
				"    public class Inner { }\n" + 
3121
				"}\n" + 
3122
				"/**\n" + 
3123
				" * See also {@link Valid.Inner}\n" + 
3124
				" */\n" + 
3125
				"class Sub2 extends Valid { }"
3126
			}
3127
		);
3128
	}
3129
	public void testBug96237_Private02() {
3130
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3131
		runNegativeTest(
3132
			new String[] {
3133
				"comment6/Invalid.java",
3134
				"package comment6;\n" + 
3135
				"public class Invalid {\n" + 
3136
				"    /**\n" + 
3137
				"     * @see Inner\n" + 
3138
				"     */\n" + 
3139
				"    public class Inner { }\n" + 
3140
				"}\n" + 
3141
				"/**\n" + 
3142
				" * See also {@link Inner} \n" + 
3143
				" */\n" + 
3144
				"class Sub1 extends Invalid { }\n"
3145
			},
3146
//			comment6\Invalid.java:6: warning - Tag @see: reference not found: Inner
3147
//			comment6\Invalid.java:11: warning - Tag @link: reference not found: Inner
3148
			"----------\n" + 
3149
			"1. ERROR in comment6\\Invalid.java (at line 4)\n" + 
3150
			"	* @see Inner\n" + 
3151
			"	       ^^^^^\n" + 
3152
			"Javadoc: Not visible reference\n" + 
3153
			"----------\n" + 
3154
			"2. ERROR in comment6\\Invalid.java (at line 9)\n" + 
3155
			"	* See also {@link Inner} \n" + 
3156
			"	                  ^^^^^\n" + 
3157
			"Javadoc: Not visible reference\n" + 
3158
			"----------\n"
3159
		);
3160
	}
3161
	public void testBug96237_Private03() {
3162
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3163
		runNegativeTest(
3164
			new String[] {
3165
				"comment6a/def/Test.java",
3166
					"package comment6a.def;\n" + 
3167
				"public class Test {\n" + 
3168
				"    /**\n" + 
3169
				"     * @see Inner\n" + 
3170
				"     */\n" + 
3171
				"    public class Inner { }\n" + 
3172
				"}\n",
3173
				"comment6a/test/Invalid.java",
3174
				"package comment6a.test;\n" + 
3175
				"import comment6a.def.Test;\n" + 
3176
				"/**\n" + 
3177
				" * See also {@link Inner}\n" + 
3178
				" */\n" + 
3179
				"public class Invalid extends Test { \n" + 
3180
				"}",
3181
				"comment6a/test/Invalid2.java",
3182
				"package comment6a.test;\n" + 
3183
				"import comment6a.def.Test;\n" + 
3184
				"/**\n" + 
3185
				" * @see Test.Inner\n" + 
3186
				" */\n" + 
3187
				"public class Invalid2 extends Test { \n" + 
3188
				"}"
3189
			},
3190
//			comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
3191
//			comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
3192
//			comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner
3193
			"----------\n" + 
3194
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
3195
			"	* @see Inner\n" + 
3196
			"	       ^^^^^\n" + 
3197
			"Javadoc: Not visible reference\n" + 
3198
			"----------\n" + 
3199
			"----------\n" + 
3200
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
3201
			"	* See also {@link Inner}\n" + 
3202
			"	                  ^^^^^\n" + 
3203
			"Javadoc: Not visible reference\n" + 
3204
			"----------\n" + 
3205
			"----------\n" + 
3206
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
3207
			"	* @see Test.Inner\n" + 
3208
			"	       ^^^^^^^^^^\n" + 
3209
			"Javadoc: Not visible reference\n" + 
3210
			"----------\n"
3211
		);
3212
	}
3213
	public void testBug96237_Private04() {
3214
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3215
		runNegativeTest(
3216
			new String[] {
3217
				"comment6b/Invalid.java",
3218
				"package comment6b;\n" + 
3219
				"\n" + 
3220
				"/**\n" + 
3221
				" * @see Inner\n" + 
3222
				" */\n" + 
3223
				"public class Invalid implements Test { \n" + 
3224
				"}",
3225
				"comment6b/Test.java",
3226
				"package comment6b;\n" + 
3227
				"public interface Test {\n" + 
3228
				"    /**\n" + 
3229
				"     * @see Inner\n" + 
3230
				"     */\n" + 
3231
				"    public class Inner { }\n" + 
3232
				"}\n",
3233
				"comment6b/Valid.java",
3234
				"package comment6b;\n" + 
3235
				"\n" + 
3236
				"/**\n" + 
3237
				" * @see Test.Inner\n" + 
3238
				" */\n" + 
3239
				"public class Valid implements Test { \n" + 
3240
				"}"
3241
			},
3242
//			comment6b\Invalid.java:6: warning - Tag @see: reference not found: Inner
3243
//			comment6b\Test.java:6: warning - Tag @see: reference not found: Inner
3244
			"----------\n" + 
3245
			"1. ERROR in comment6b\\Invalid.java (at line 4)\n" + 
3246
			"	* @see Inner\n" + 
3247
			"	       ^^^^^\n" + 
3248
			"Javadoc: Not visible reference\n" + 
3249
			"----------\n" + 
3250
			"----------\n" + 
3251
			"1. ERROR in comment6b\\Test.java (at line 4)\n" + 
3252
			"	* @see Inner\n" + 
3253
			"	       ^^^^^\n" + 
3254
			"Javadoc: Not visible reference\n" + 
3255
			"----------\n"
3256
		);
3257
	}
3258
	public void testBug96237_Private05() {
3259
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3260
		runConformTest(
3261
			new String[] {
3262
				"test/a/Test.java",
3263
				"package test.a;\n" + 
3264
				"/**\n" + 
3265
				" * @see Inner\n" + 
3266
				" * @see Test.Inner\n" + 
3267
				" */\n" + 
3268
				"public class Test {\n" + 
3269
				"	class Inner {}\n" + 
3270
				"}\n"
3271
			}
3272
		);
3273
	}
3274
	public void testBug96237_Private06() {
3275
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3276
		runConformTest(
3277
			new String[] {
3278
				"test/b/Test.java",
3279
				"package test.b;\n" + 
3280
				"/** \n" + 
3281
				" * @see Inner.Level2\n" + 
3282
				" * @see Test.Inner.Level2\n" + 
3283
				" */\n" + 
3284
				"public class Test {\n" + 
3285
				"	/** \n" + 
3286
				"	 * @see Level2\n" + 
3287
				"	 * @see Test.Inner.Level2\n" + 
3288
				"	 */\n" + 
3289
				"	public class Inner {\n" + 
3290
				"		class Level2 {}\n" + 
3291
				"	}\n" + 
3292
				"}\n"
3293
			}
3294
		);
3295
	}
3296
	public void testBug96237_Private07() {
3297
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3298
		runConformTest(
3299
			new String[] {
3300
				"test/c/Test.java",
3301
				"package test.c;\n" + 
3302
				"/**\n" + 
3303
				" * @see Inner.Level2.Level3\n" + 
3304
				" * @see Test.Inner.Level2.Level3\n" + 
3305
				" */\n" + 
3306
				"public class Test {\n" + 
3307
				"	public class Inner {\n" + 
3308
				"		/**\n" + 
3309
				"		 * @see Level3\n" + 
3310
				"		 * @see Level2.Level3\n" + 
3311
				"		 * @see Inner.Level2.Level3\n" + 
3312
				"		 * @see Test.Inner.Level2.Level3\n" + 
3313
				"		 */\n" + 
3314
				"		public class Level2 {\n" + 
3315
				"			class Level3 {\n" + 
3316
				"			}\n" + 
3317
				"		}\n" + 
3318
				"	}\n" + 
3319
				"}\n"
3320
			}
3321
		);
3322
	}
3323
3324
	/**
2820
	 * Bug 101283: [1.5][javadoc] Javadoc validation raises missing implementation in compiler
3325
	 * Bug 101283: [1.5][javadoc] Javadoc validation raises missing implementation in compiler
2821
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=101283"
3326
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=101283"
2822
	 */
3327
	 */
Lines 3013-3018 Link Here
3013
	}
3518
	}
3014
3519
3015
	/**
3520
	/**
3521
	 * Bug 103304: [Javadoc] Wrong reference proposal for inner classes.
3522
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=103304"
3523
	 */
3524
	public void testBug103304a() {
3525
		runNegativeTest(
3526
			new String[] {
3527
				"boden/IAFAState.java",
3528
				"package boden;\n" + 
3529
				"public interface IAFAState {\n" + 
3530
				"    public class ValidationException extends Exception {\n" + 
3531
				"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
3532
				"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
3533
				"        }\n" + 
3534
				"        public void method() {}\n" + 
3535
				"    }\n" + 
3536
				"    /**\n" + 
3537
				"     * Validates a formula for consistent bindings. Bindings are consistent, when at each point in time,\n" + 
3538
				"     * the set of povided variables can be guaranteed to be a superset of the set of required variables.\n" + 
3539
				"     * @throws ValidationException Thrown if a variable is unbound. \n" + 
3540
				"     * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3541
				"     * @see IAFAState.ValidationException#method()\n" + 
3542
				"     * @see ValidationException\n" + 
3543
				"     * {@link ValidationException}\n" + 
3544
				"     */\n" + 
3545
				"    public void validate() throws ValidationException;\n" + 
3546
				"}\n",
3547
				"boden/TestValid.java",
3548
				"package boden;\n" + 
3549
				"import boden.IAFAState.ValidationException;\n" + 
3550
				"/**\n" + 
3551
				" * @see ValidationException\n" + 
3552
				" * @see IAFAState.ValidationException\n" + 
3553
				" */\n" + 
3554
				"public class TestValid {\n" + 
3555
				"	/**  \n" + 
3556
				"	 * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3557
				"	 */\n" + 
3558
				"	IAFAState.ValidationException valid1;\n" + 
3559
				"	/**\n" + 
3560
				"	 * @see IAFAState.ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3561
				"	 */\n" + 
3562
				"	IAFAState.ValidationException valid2;\n" + 
3563
				"}\n"
3564
			},
3565
//			boden\TestValid.java:8: warning - Tag @see: reference not found: ValidationException
3566
//			boden\TestValid.java:12: warning - Tag @see: reference not found: ValidationException#IAFAState.ValidationException(String, IAFAState)
3567
			"----------\n" + 
3568
			"1. ERROR in boden\\TestValid.java (at line 4)\r\n" + 
3569
			"	* @see ValidationException\r\n" + 
3570
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
3571
			"Javadoc: Not visible reference\n" + 
3572
			"----------\n"
3573
		);
3574
	}
3575
	public void testBug103304b() {
3576
		runNegativeTest(
3577
			new String[] {
3578
				"boden/IAFAState.java",
3579
				"package boden;\n" + 
3580
				"public interface IAFAState {\n" + 
3581
				"    public class ValidationException extends Exception {\n" + 
3582
				"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
3583
				"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
3584
				"        }\n" + 
3585
				"        public void method() {}\n" + 
3586
				"    }\n" + 
3587
				"}\n",
3588
				"boden/TestInvalid1.java",
3589
				"package boden;\n" + 
3590
				"import boden.IAFAState.ValidationException;\n" + 
3591
				"public class TestInvalid1 {\n" + 
3592
				"	/** \n" + 
3593
				"	 * @see ValidationException#ValidationException(String, IAFAState)\n" + 
3594
				"	 */ \n" + 
3595
				"	IAFAState.ValidationException invalid;\n" + 
3596
				"}\n",
3597
				"boden/TestInvalid2.java",
3598
				"package boden;\n" + 
3599
				"import boden.IAFAState.ValidationException;\n" + 
3600
				"public class TestInvalid2 {\n" + 
3601
				"	/**\n" + 
3602
				"	 * @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + 
3603
				"	 */\n" + 
3604
				"	IAFAState.ValidationException invalid;\n" + 
3605
				"}\n",
3606
				"boden/TestInvalid3.java",
3607
				"package boden;\n" + 
3608
				"import boden.IAFAState.ValidationException;\n" + 
3609
				"public class TestInvalid3 {\n" + 
3610
				"	/**\n" + 
3611
				"	 * @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" + 
3612
				"	 */\n" + 
3613
				"	IAFAState.ValidationException invalid;\n" + 
3614
				"}\n",
3615
				"boden/TestInvalid4.java",
3616
				"package boden;\n" + 
3617
				"import boden.IAFAState.ValidationException;\n" + 
3618
				"public class TestInvalid4 {\n" + 
3619
				"	/**\n" + 
3620
				"	 * @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" + 
3621
				"	 */\n" + 
3622
				"	IAFAState.ValidationException invalid;\n" + 
3623
				"}\n"
3624
			},
3625
//			boden\TestInvalid1.java:7: warning - Tag @see: reference not found: ValidationException#ValidationException(String, IAFAState)
3626
//			boden\TestInvalid2.java:6: warning - Tag @see: can't find ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
3627
//			boden\TestInvalid3.java:6: warning - Tag @see: can't find IAFA.State.ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
3628
//			boden\TestInvalid4.java:6: warning - Tag @see: can't find IAFAState in boden.IAFAState.ValidationException
3629
			"----------\n" + 
3630
			"1. ERROR in boden\\TestInvalid1.java (at line 5)\n" + 
3631
			"	* @see ValidationException#ValidationException(String, IAFAState)\n" + 
3632
			"	                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3633
			"Javadoc: Invalid qualification for member type constructor\n" + 
3634
			"----------\n" +
3635
			"----------\n" + 
3636
			"1. ERROR in boden\\TestInvalid2.java (at line 5)\n" + 
3637
			"	* @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + 
3638
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3639
			"Javadoc: Invalid qualification for member type constructor\n" + 
3640
			"----------\n" +
3641
			"----------\n" + 
3642
			"1. ERROR in boden\\TestInvalid3.java (at line 5)\n" + 
3643
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" + 
3644
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3645
			"Javadoc: Invalid qualification for member type constructor\n" + 
3646
			"----------\n" + 
3647
			"----------\n" + 
3648
			"1. ERROR in boden\\TestInvalid4.java (at line 5)\n" + 
3649
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" + 
3650
			"	                                     ^^^^^^^^^\n" + 
3651
			"Javadoc: IAFAState cannot be resolved or is not a field\n" + 
3652
			"----------\n"
3653
		);
3654
	}
3655
	public void testBug103304c() {
3656
		runNegativeTest(
3657
			new String[] {
3658
				"test/Test.java",
3659
				"package test;\n" + 
3660
				"public interface Test {\n" + 
3661
				"	public class Level0 {\n" + 
3662
				"		public Level0() {}\n" + 
3663
				"	}\n" + 
3664
				"	public interface Member {\n" + 
3665
				"		public class Level1 {\n" + 
3666
				"			public Level1() {}\n" + 
3667
				"		}\n" + 
3668
				"	}\n" + 
3669
				"}\n",
3670
				"test/C.java",
3671
				"package test;\n" + 
3672
				"public class C {\n" + 
3673
				"	/**\n" + 
3674
				"	 * @see Test.Level0#Test.Level0()\n" + 
3675
				"	 */\n" + 
3676
				"	Test.Level0 valid = new Test.Level0();\n" + 
3677
				"	/**\n" + 
3678
				"	 * @see Test.Level0#Level0()\n" + 
3679
				"	 */\n" + 
3680
				"	Test.Level0 invalid = new Test.Level0();\n" + 
3681
				"}\n"
3682
			},
3683
//			test\C.java:10: warning - Tag @see: can't find Level0() in test.Test.Level0
3684
			"----------\n" + 
3685
			"1. ERROR in test\\C.java (at line 8)\n" + 
3686
			"	* @see Test.Level0#Level0()\n" + 
3687
			"	                   ^^^^^^^^\n" + 
3688
			"Javadoc: Invalid qualification for member type constructor\n" + 
3689
			"----------\n"
3690
		);
3691
	}
3692
	public void testBug103304d() {
3693
		runNegativeTest(
3694
			new String[] {
3695
				"test/Test.java",
3696
				"package test;\n" + 
3697
				"public interface Test {\n" + 
3698
				"	public class Level0 {\n" + 
3699
				"		public Level0() {}\n" + 
3700
				"	}\n" + 
3701
				"	public interface Member {\n" + 
3702
				"		public class Level1 {\n" + 
3703
				"			public Level1() {}\n" + 
3704
				"		}\n" + 
3705
				"	}\n" + 
3706
				"}\n",
3707
				"test/C2.java",
3708
				"package test;\n" + 
3709
				"public class C2 {\n" + 
3710
				"	/**\n" + 
3711
				"	 * @see Test.Member.Level1#Test.Member.Level1()\n" + 
3712
				"	 */\n" + 
3713
				"	Test.Member.Level1 valid = new Test.Member.Level1();\n" + 
3714
				"	/**\n" + 
3715
				"	 * @see Test.Member.Level1#Level1()\n" + 
3716
				"	 */\n" + 
3717
				"	Test.Member.Level1 invalid = new Test.Member.Level1();\n" + 
3718
				"	/**\n" + 
3719
				"	 * @see Test.Member.Level1#Test.Level1()\n" + 
3720
				"	 */\n" + 
3721
				"	Test.Member.Level1 wrong = new Test.Member.Level1();\n" + 
3722
				"}\n"
3723
			},
3724
//			test\C2.java:10: warning - Tag @see: can't find Level1() in test.Test.Member.Level1
3725
//			test\C2.java:14: warning - Tag @see: can't find Test.Level1() in test.Test.Member.Level1
3726
			"----------\n" + 
3727
			"1. ERROR in test\\C2.java (at line 8)\n" + 
3728
			"	* @see Test.Member.Level1#Level1()\n" + 
3729
			"	                          ^^^^^^^^\n" + 
3730
			"Javadoc: Invalid qualification for member type constructor\n" + 
3731
			"----------\n" + 
3732
			"2. ERROR in test\\C2.java (at line 12)\n" + 
3733
			"	* @see Test.Member.Level1#Test.Level1()\n" + 
3734
			"	                          ^^^^^^^^^^^^^\n" + 
3735
			"Javadoc: Invalid qualification for member type constructor\n" + 
3736
			"----------\n"
3737
		);
3738
	}
3739
	public void testBug103304e() {
3740
		runConformTest(
3741
			new String[] {
3742
				"implicit/Valid.java",
3743
				"package implicit;\n" + 
3744
				"public interface Valid {\n" + 
3745
				"	public class Level0 {\n" + 
3746
				"		/**\n" + 
3747
				"		 * @see #Valid.Level0() Valid\n" + 
3748
				"		 */\n" + 
3749
				"		public Level0() {}\n" + 
3750
				"		/**\n" + 
3751
				"		 * @see #Valid.Level0(String) Valid\n" + 
3752
				"		 */\n" + 
3753
				"		public Level0(String str) {}\n" + 
3754
				"	}\n" + 
3755
				"	public interface Member {\n" + 
3756
				"		public class Level1 {\n" + 
3757
				"			/**\n" + 
3758
				"			 * @see #Valid.Member.Level1() Valid\n" + 
3759
				"			 */\n" + 
3760
				"			public Level1() {}\n" + 
3761
				"			/**\n" + 
3762
				"			 * @see #Valid.Member.Level1(int) Valid\n" + 
3763
				"			 */\n" + 
3764
				"			public Level1(int x) {}\n" + 
3765
				"		}\n" + 
3766
				"	}\n" + 
3767
				"}\n"
3768
			}
3769
		);
3770
	}
3771
	public void testBug103304f() {
3772
		runNegativeTest(
3773
			new String[] {
3774
				"implicit/Invalid.java",
3775
				"package implicit;\n" + 
3776
				"public interface Invalid {\n" + 
3777
				"	public class Level0 {\n" + 
3778
				"		/**\n" + 
3779
				"		 * @see #Level0() Invalid\n" + 
3780
				"		 */\n" + 
3781
				"		public Level0() {}\n" + 
3782
				"		/**\n" + 
3783
				"		 * @see #Level0(String) Invalid\n" + 
3784
				"		 */\n" + 
3785
				"		public Level0(String str) {}\n" + 
3786
				"	}\n" + 
3787
				"	public interface Member {\n" + 
3788
				"		public class Level1 {\n" + 
3789
				"			/**\n" + 
3790
				"			 * @see #Level1() Invalid\n" + 
3791
				"			 * @see #Member.Level1() Invalid\n" + 
3792
				"			 * @see #Invalid.Level1() Invalid\n" + 
3793
				"			 */\n" + 
3794
				"			public Level1() {}\n" + 
3795
				"			/**\n" + 
3796
				"			 * @see #Level1(int) Invalid\n" + 
3797
				"			 * @see #Invalid.Level1(int) Invalid\n" + 
3798
				"			 * @see #Member.Level1(int) Invalid\n" + 
3799
				"			 */\n" + 
3800
				"			public Level1(int x) {}\n" + 
3801
				"		}\n" + 
3802
				"	}\n" + 
3803
				"}\n"
3804
			},
3805
//			implicit\Invalid.java:7: warning - Tag @see: can't find Level0() in implicit.Invalid.Level0
3806
//			implicit\Invalid.java:11: warning - Tag @see: can't find Level0(String) in implicit.Invalid.Level0
3807
//			implicit\Invalid.java:20: warning - Tag @see: can't find Level1() in implicit.Invalid.Member.Level1
3808
//			implicit\Invalid.java:20: warning - Tag @see: can't find Member.Level1() in implicit.Invalid.Member.Level1
3809
//			implicit\Invalid.java:20: warning - Tag @see: can't find Invalid.Level1() in implicit.Invalid.Member.Level1
3810
//			implicit\Invalid.java:26: warning - Tag @see: can't find Level1(int) in implicit.Invalid.Member.Level1
3811
//			implicit\Invalid.java:26: warning - Tag @see: can't find Invalid.Level1(int) in implicit.Invalid.Member.Level1
3812
//			implicit\Invalid.java:26: warning - Tag @see: can't find Member.Level1(int) in implicit.Invalid.Member.Level1
3813
			"----------\n" + 
3814
			"1. ERROR in implicit\\Invalid.java (at line 5)\n" + 
3815
			"	* @see #Level0() Invalid\n" + 
3816
			"	        ^^^^^^^^\n" + 
3817
			"Javadoc: Invalid qualification for member type constructor\n" + 
3818
			"----------\n" + 
3819
			"2. ERROR in implicit\\Invalid.java (at line 9)\n" + 
3820
			"	* @see #Level0(String) Invalid\n" + 
3821
			"	        ^^^^^^^^^^^^^^\n" + 
3822
			"Javadoc: Invalid qualification for member type constructor\n" + 
3823
			"----------\n" + 
3824
			"3. ERROR in implicit\\Invalid.java (at line 16)\n" + 
3825
			"	* @see #Level1() Invalid\n" + 
3826
			"	        ^^^^^^^^\n" + 
3827
			"Javadoc: Invalid qualification for member type constructor\n" + 
3828
			"----------\n" + 
3829
			"4. ERROR in implicit\\Invalid.java (at line 17)\n" + 
3830
			"	* @see #Member.Level1() Invalid\n" + 
3831
			"	        ^^^^^^^^^^^^^^^\n" + 
3832
			"Javadoc: Invalid qualification for member type constructor\n" + 
3833
			"----------\n" + 
3834
			"5. ERROR in implicit\\Invalid.java (at line 18)\n" + 
3835
			"	* @see #Invalid.Level1() Invalid\n" + 
3836
			"	        ^^^^^^^^^^^^^^^^\n" + 
3837
			"Javadoc: Invalid qualification for member type constructor\n" + 
3838
			"----------\n" + 
3839
			"6. ERROR in implicit\\Invalid.java (at line 22)\n" + 
3840
			"	* @see #Level1(int) Invalid\n" + 
3841
			"	        ^^^^^^^^^^^\n" + 
3842
			"Javadoc: Invalid qualification for member type constructor\n" + 
3843
			"----------\n" + 
3844
			"7. ERROR in implicit\\Invalid.java (at line 23)\n" + 
3845
			"	* @see #Invalid.Level1(int) Invalid\n" + 
3846
			"	        ^^^^^^^^^^^^^^^^^^^\n" + 
3847
			"Javadoc: Invalid qualification for member type constructor\n" + 
3848
			"----------\n" + 
3849
			"8. ERROR in implicit\\Invalid.java (at line 24)\n" + 
3850
			"	* @see #Member.Level1(int) Invalid\n" + 
3851
			"	        ^^^^^^^^^^^^^^^^^^\n" + 
3852
			"Javadoc: Invalid qualification for member type constructor\n" + 
3853
			"----------\n"
3854
		);
3855
	}
3856
3857
	/**
3016
	 * Bug 112346: [javadoc] {@inheritedDoc} should be inactive for non-overridden method
3858
	 * Bug 112346: [javadoc] {@inheritedDoc} should be inactive for non-overridden method
3017
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=112346"
3859
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=112346"
3018
	 */
3860
	 */
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java (-23 / +29 lines)
Lines 2018-2035 Link Here
2018
		this.runConformReferenceTest(
2018
		this.runConformReferenceTest(
2019
			new String[] {
2019
			new String[] {
2020
				"test/X.java",
2020
				"test/X.java",
2021
				"package test;\n"
2021
				"package test;\n" +
2022
					+ "import test.copy.*;\n"
2022
				"import test.copy.*;\n" +
2023
					+ "public class X {\n"
2023
				"public class X {\n" +
2024
					+ "	/**\n"
2024
				"	/**\n" +
2025
					+ "	 * Valid external classes references \n"
2025
				"	 * Valid external classes references \n" +
2026
					+ "	 *\n"
2026
				"	 *\n" +
2027
					+ "	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n"
2027
				"	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
2028
					+ "	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
2028
				// Inner classes are not visible in generated documentation
2029
					+ "	 */\n"
2029
				//"	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
2030
					+ "	public void s_foo() {\n"
2030
				"	 */\n" +
2031
					+ "	}\n"
2031
				"	public void s_foo() {\n" +
2032
					+ "}\n" });
2032
				"	}\n" +
2033
				"}\n"
2034
			}
2035
		);
2033
	}
2036
	}
2034
2037
2035
	public void test093() {
2038
	public void test093() {
Lines 2077-2093 Link Here
2077
		this.runConformReferenceTest(
2080
		this.runConformReferenceTest(
2078
			new String[] {
2081
			new String[] {
2079
				"test/X.java",
2082
				"test/X.java",
2080
				"package test;\n"
2083
				"package test;\n" +
2081
					+ "public class X {\n"
2084
				"public class X {\n" +
2082
					+ "	/**\n"
2085
				"	/**\n" +
2083
					+ "	 * Valid external classes references \n"
2086
				"	 * Valid external classes references \n" +
2084
					+ "	 *\n"
2087
				"	 *\n" +
2085
					+ "	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n"
2088
				"	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
2086
					+ "	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
2089
				// Inner classes are not visible in generated documentation
2087
					+ "	 */\n"
2090
				//"	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
2088
					+ "	public void s_foo() {\n"
2091
				"	 */\n" +
2089
					+ "	}\n"
2092
				"	public void s_foo() {\n" +
2090
					+ "}\n" });
2093
				"	}\n" +
2094
				"}\n"
2095
			}
2096
		);
2091
	}
2097
	}
2092
2098
2093
	public void test095() {
2099
	public void test095() {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest.java (-145 / +146 lines)
Lines 100-105 Link Here
100
		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.ENABLED);
100
		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsDeprecatedRef, CompilerOptions.ENABLED);
101
		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.ENABLED);
101
		options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsNotVisibleRef, CompilerOptions.ENABLED);
102
		options.put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.PRIVATE);
102
		options.put(CompilerOptions.OPTION_ReportMissingJavadocTagsVisibility, CompilerOptions.PRIVATE);
103
		options.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.IGNORE);
103
		return options;
104
		return options;
104
	}
105
	}
105
	
106
	
Lines 120-273 Link Here
120
		referencedClasses =
121
		referencedClasses =
121
			new String[] {
122
			new String[] {
122
				"test/AbstractVisibility.java",
123
				"test/AbstractVisibility.java",
123
				"package test;\n"
124
				"package test;\n" +
124
					+ "public abstract class AbstractVisibility {\n"
125
				"public abstract class AbstractVisibility {\n" +
125
					+ "	private class AvcPrivate {\n"
126
				"	private class AvcPrivate {\n" +
126
					+ "		private int avf_private = 10;\n"
127
				"		private int avf_private = 10;\n" +
127
					+ "		public int avf_public = avf_private;\n"
128
				"		public int avf_public = avf_private;\n" +
128
					+ "		private int avm_private() {\n"
129
				"		private int avm_private() {\n" +
129
					+ "			avf_private = (new AvcPrivate()).avf_private;\n"
130
				"			avf_private = (new AvcPrivate()).avf_private;\n" +
130
					+ "			return avf_private;\n"
131
				"			return avf_private;\n" +
131
					+ "		}\n"
132
				"		}\n" +
132
					+ "		public int avm_public() {\n"
133
				"		public int avm_public() {\n" +
133
					+ "			return avm_private();\n"
134
				"			return avm_private();\n" +
134
					+ "		}\n"
135
				"		}\n" +
135
					+ "	}\n"
136
				"	}\n" +
136
					+ "	public class AvcPublic {\n"
137
				"	public class AvcPublic {\n" +
137
					+ "		private int avf_private = 10;\n"
138
				"		private int avf_private = 10;\n" +
138
					+ "		public int avf_public = avf_private;\n"
139
				"		public int avf_public = avf_private;\n" +
139
					+ "		private int avm_private() {\n"
140
				"		private int avm_private() {\n" +
140
					+ "			avf_private = (new AvcPrivate()).avf_private;\n"
141
				"			avf_private = (new AvcPrivate()).avf_private;\n" +
141
					+ "			return avf_private;\n"
142
				"			return avf_private;\n" +
142
					+ "		}\n"
143
				"		}\n" +
143
					+ "		public int avm_public() {\n"
144
				"		public int avm_public() {\n" +
144
					+ "			return avm_private();\n"
145
				"			return avm_private();\n" +
145
					+ "		}\n"
146
				"		}\n" +
146
					+ "	}\n"
147
				"	}\n" +
147
					+ "	private int avf_private = 100;\n"
148
				"	private int avf_private = 100;\n" +
148
					+ "	public int avf_public = avf_private;\n"
149
				"	public int avf_public = avf_private;\n" +
149
					+ "	\n"
150
				"	\n" +
150
					+ "	private int avm_private() {\n"
151
				"	private int avm_private() {\n" +
151
					+ "		avf_private = (new AvcPrivate()).avf_private;\n"
152
				"		avf_private = (new AvcPrivate()).avf_private;\n" +
152
					+ "		return avf_private;\n"
153
				"		return avf_private;\n" +
153
					+ "	}\n"
154
				"	}\n" +
154
					+ "	public int avm_public() {\n"
155
				"	public int avm_public() {\n" +
155
					+ "		return avm_private();\n"
156
				"		return avm_private();\n" +
156
					+ "	}\n"
157
				"	}\n" +
157
					+ "}\n",
158
				"}\n",
158
				"test/Visibility.java",
159
				"test/Visibility.java",
159
				"package test;\n"
160
				"package test;\n" +
160
					+ "public class Visibility extends AbstractVisibility {\n"
161
				"public class Visibility extends AbstractVisibility {\n" +
161
					+ "	private class VcPrivate {\n"
162
				"	private class VcPrivate {\n" +
162
					+ "		private int vf_private = 10;\n"
163
				"		private int vf_private = 10;\n" +
163
					+ "		public int vf_public = vf_private;\n"
164
				"		public int vf_public = vf_private;\n" +
164
					+ "		private int vm_private() {\n"
165
				"		private int vm_private() {\n" +
165
					+ "			vf_private = (new VcPrivate()).vf_private;\n"
166
				"			vf_private = (new VcPrivate()).vf_private;\n" +
166
					+ "			avf_private = vf_private;\n"
167
				"			avf_private = vf_private;\n" +
167
					+ "			return vf_private+avf_private;\n"
168
				"			return vf_private+avf_private;\n" +
168
					+ "		}\n"
169
				"		}\n" +
169
					+ "		public int vm_public() {\n"
170
				"		public int vm_public() {\n" +
170
					+ "			return vm_private();\n"
171
				"			return vm_private();\n" +
171
					+ "		}\n"
172
				"		}\n" +
172
					+ "	};\n"
173
				"	};\n" +
173
					+ "	public class VcPublic {\n"
174
				"	public class VcPublic {\n" +
174
					+ "		private int vf_private = 10;\n"
175
				"		private int vf_private = 10;\n" +
175
					+ "		public int vf_public = vf_private;\n"
176
				"		public int vf_public = vf_private;\n" +
176
					+ "		private int vm_private() {\n"
177
				"		private int vm_private() {\n" +
177
					+ "			vf_private = (new VcPrivate()).vf_private;\n"
178
				"			vf_private = (new VcPrivate()).vf_private;\n" +
178
					+ "			avf_private = vf_private;\n"
179
				"			avf_private = vf_private;\n" +
179
					+ "			return vf_private+avf_private;\n"
180
				"			return vf_private+avf_private;\n" +
180
					+ "		}\n"
181
				"		}\n" +
181
					+ "		public int vm_public() {\n"
182
				"		public int vm_public() {\n" +
182
					+ "			return vm_private();\n"
183
				"			return vm_private();\n" +
183
					+ "		}\n"
184
				"		}\n" +
184
					+ "	};\n"
185
				"	};\n" +
185
					+ "	private int vf_private = 100;\n"
186
				"	private int vf_private = 100;\n" +
186
					+ "	private int avf_private = 100;\n"
187
				"	private int avf_private = 100;\n" +
187
					+ "	public int vf_public = vf_private;\n"
188
				"	public int vf_public = vf_private;\n" +
188
					+ "	public int avf_public = vf_private;\n"
189
				"	public int avf_public = vf_private;\n" +
189
					+ "	\n"
190
				"	\n" +
190
					+ "	private int vm_private() {\n"
191
				"	private int vm_private() {\n" +
191
					+ "		vf_private = (new VcPrivate()).vf_private;\n"
192
				"		vf_private = (new VcPrivate()).vf_private;\n" +
192
					+ "		avf_private = vf_private;\n"
193
				"		avf_private = vf_private;\n" +
193
					+ "		return vf_private+avf_private;\n"
194
				"		return vf_private+avf_private;\n" +
194
					+ "	}\n"
195
				"	}\n" +
195
					+ "	public int vm_public() {\n"
196
				"	public int vm_public() {\n" +
196
					+ "		return vm_private();\n"
197
				"		return vm_private();\n" +
197
					+ "	}\n"
198
				"	}\n" +
198
					+ "}\n",
199
				"}\n",
199
				"test/copy/VisibilityPackage.java",
200
				"test/copy/VisibilityPackage.java",
200
				"package test.copy;\n"
201
				"package test.copy;\n" +
201
					+ "class VisibilityPackage {\n"
202
				"class VisibilityPackage {\n" +
202
					+ "	private class VpPrivate {\n"
203
				"	private class VpPrivate {\n" +
203
					+ "		private int vf_private = 10;\n"
204
				"		private int vf_private = 10;\n" +
204
					+ "		public int vf_public = vf_private;\n"
205
				"		public int vf_public = vf_private;\n" +
205
					+ "		private int vm_private() {\n"
206
				"		private int vm_private() {\n" +
206
					+ "			vf_private = (new VpPrivate()).vf_private;\n"
207
				"			vf_private = (new VpPrivate()).vf_private;\n" +
207
					+ "			return vf_private;\n"
208
				"			return vf_private;\n" +
208
					+ "		}\n"
209
				"		}\n" +
209
					+ "		public int vm_public() {\n"
210
				"		public int vm_public() {\n" +
210
					+ "			return vm_private();\n"
211
				"			return vm_private();\n" +
211
					+ "		}\n"
212
				"		}\n" +
212
					+ "	}\n"
213
				"	}\n" +
213
					+ "	public class VpPublic {\n"
214
				"	public class VpPublic {\n" +
214
					+ "		private int vf_private = 10;\n"
215
				"		private int vf_private = 10;\n" +
215
					+ "		public int vf_public = vf_private;\n"
216
				"		public int vf_public = vf_private;\n" +
216
					+ "		private int vm_private() {\n"
217
				"		private int vm_private() {\n" +
217
					+ "			vf_private = (new VpPrivate()).vf_private;\n"
218
				"			vf_private = (new VpPrivate()).vf_private;\n" +
218
					+ "			return vf_private;\n"
219
				"			return vf_private;\n" +
219
					+ "		}\n"
220
				"		}\n" +
220
					+ "		public int vm_public() {\n"
221
				"		public int vm_public() {\n" +
221
					+ "			return vm_private();\n"
222
				"			return vm_private();\n" +
222
					+ "		}\n"
223
				"		}\n" +
223
					+ "	}\n"
224
				"	}\n" +
224
					+ "	private int vf_private = 100;\n"
225
				"	private int vf_private = 100;\n" +
225
					+ "	public int vf_public = vf_private;\n"
226
				"	public int vf_public = vf_private;\n" +
226
					+ "	\n"
227
				"	\n" +
227
					+ "	private int vm_private() {\n"
228
				"	private int vm_private() {\n" +
228
					+ "		vf_private = (new VpPrivate()).vf_private;\n"
229
				"		vf_private = (new VpPrivate()).vf_private;\n" +
229
					+ "		return vf_private;\n"
230
				"		return vf_private;\n" +
230
					+ "	}\n"
231
				"	}\n" +
231
					+ "	public int vm_public() {\n"
232
				"	public int vm_public() {\n" +
232
					+ "		return vm_private();\n"
233
				"		return vm_private();\n" +
233
					+ "	}\n"
234
				"	}\n" +
234
					+ "}\n",
235
				"}\n",
235
				"test/copy/VisibilityPublic.java",
236
				"test/copy/VisibilityPublic.java",
236
				"package test.copy;\n"
237
				"package test.copy;\n" +
237
					+ "public class VisibilityPublic {\n"
238
				"public class VisibilityPublic {\n" +
238
					+ "	private class VpPrivate {\n"
239
				"	private class VpPrivate {\n" +
239
					+ "		private int vf_private = 10;\n"
240
				"		private int vf_private = 10;\n" +
240
					+ "		public int vf_public = vf_private;\n"
241
				"		public int vf_public = vf_private;\n" +
241
					+ "		private int vm_private() {\n"
242
				"		private int vm_private() {\n" +
242
					+ "			vf_private = (new VpPrivate()).vf_private;\n"
243
				"			vf_private = (new VpPrivate()).vf_private;\n" +
243
					+ "			return vf_private;\n"
244
				"			return vf_private;\n" +
244
					+ "		}\n"
245
				"		}\n" +
245
					+ "		public int vm_public() {\n"
246
				"		public int vm_public() {\n" +
246
					+ "			return vm_private();\n"
247
				"			return vm_private();\n" +
247
					+ "		}\n"
248
				"		}\n" +
248
					+ "	}\n"
249
				"	}\n" +
249
					+ "	public class VpPublic {\n"
250
				"	public class VpPublic {\n" +
250
					+ "		private int vf_private = 10;\n"
251
				"		private int vf_private = 10;\n" +
251
					+ "		public int vf_public = vf_private;\n"
252
				"		public int vf_public = vf_private;\n" +
252
					+ "		private int vm_private() {\n"
253
				"		private int vm_private() {\n" +
253
					+ "			vf_private = (new VpPrivate()).vf_private;\n"
254
				"			vf_private = (new VpPrivate()).vf_private;\n" +
254
					+ "			return vf_private;\n"
255
				"			return vf_private;\n" +
255
					+ "		}\n"
256
				"		}\n" +
256
					+ "		public int vm_public() {\n"
257
				"		public int vm_public() {\n" +
257
					+ "			return vm_private();\n"
258
				"			return vm_private();\n" +
258
					+ "		}\n"
259
				"		}\n" +
259
					+ "	}\n"
260
				"	}\n" +
260
					+ "	private int vf_private = 100;\n"
261
				"	private int vf_private = 100;\n" +
261
					+ "	public int vf_public = vf_private;\n"
262
				"	public int vf_public = vf_private;\n" +
262
					+ "	\n"
263
				"	\n" +
263
					+ "	private int vm_private() {\n"
264
				"	private int vm_private() {\n" +
264
					+ "		vf_private = (new VpPrivate()).vf_private;\n"
265
				"		vf_private = (new VpPrivate()).vf_private;\n" +
265
					+ "		return vf_private;\n"
266
				"		return vf_private;\n" +
266
					+ "	}\n"
267
				"	}\n" +
267
					+ "	public int vm_public() {\n"
268
				"	public int vm_public() {\n" +
268
					+ "		return vm_private();\n"
269
				"		return vm_private();\n" +
269
					+ "	}\n"
270
				"	}\n" +
270
					+ "}\n" };
271
				"}\n" };
271
	}
272
	}
272
	/* (non-Javadoc)
273
	/* (non-Javadoc)
273
	 * @see junit.framework.TestCase#setUp()
274
	 * @see junit.framework.TestCase#setUp()
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java (-23 / +29 lines)
Lines 388-405 Link Here
388
		this.runConformReferenceTest(
388
		this.runConformReferenceTest(
389
			new String[] {
389
			new String[] {
390
				"test/X.java",
390
				"test/X.java",
391
				"package test;\n"
391
				"package test;\n" +
392
					+ "import test.copy.*;\n"
392
				"import test.copy.*;\n" +
393
					+ "	/**\n"
393
				"	/**\n" +
394
					+ "	 * Valid external classes references \n"
394
				"	 * Valid external classes references \n" +
395
					+ "	 *\n"
395
				"	 *\n" +
396
					+ "	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n"
396
				"	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
397
					+ "	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
397
				// Inner classes are not visible in generated documentation
398
					+ "	 */\n"
398
				//"	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
399
					+ "public class X {\n"
399
				"	 */\n" +
400
					+ "	public void s_foo() {\n"
400
				"public class X {\n" +
401
					+ "	}\n"
401
				"	public void s_foo() {\n" +
402
					+ "}\n" });
402
				"	}\n" +
403
				"}\n"
404
			}
405
		);
403
	}
406
	}
404
407
405
	public void test023() {
408
	public void test023() {
Lines 435-451 Link Here
435
		this.runConformReferenceTest(
438
		this.runConformReferenceTest(
436
			new String[] {
439
			new String[] {
437
				"test/X.java",
440
				"test/X.java",
438
				"package test;\n"
441
				"package test;\n" +
439
					+ "	/**\n"
442
				"	/**\n" +
440
					+ "	 * Valid external classes references \n"
443
				"	 * Valid external classes references \n" +
441
					+ "	 *\n"
444
				"	 *\n" +
442
					+ "	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n"
445
				"	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
443
					+ "	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
446
				// Inner classes are not visible in generated documentation
444
					+ "	 */\n"
447
				//"	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
445
					+ "public class X {\n"
448
				"	 */\n" +
446
					+ "	public void s_foo() {\n"
449
				"public class X {\n" +
447
					+ "	}\n"
450
				"	public void s_foo() {\n" +
448
					+ "}\n" });
451
				"	}\n" +
452
				"}\n"
453
				}
454
		);
449
	}
455
	}
450
456
451
	// @see Field references
457
	// @see Field references
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_3.java (-3 / +844 lines)
Lines 20-25 Link Here
20
20
21
	String docCommentSupport = CompilerOptions.ENABLED;
21
	String docCommentSupport = CompilerOptions.ENABLED;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
23
	String reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
23
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocComments = null;
25
	String reportMissingJavadocComments = null;
25
	String reportMissingJavadocCommentsVisibility = null;
26
	String reportMissingJavadocCommentsVisibility = null;
Lines 49-54 Link Here
49
		Map options = super.getCompilerOptions();
50
		Map options = super.getCompilerOptions();
50
		options.put(CompilerOptions.OPTION_DocCommentSupport, this.docCommentSupport);
51
		options.put(CompilerOptions.OPTION_DocCommentSupport, this.docCommentSupport);
51
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
52
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
53
		if (!CompilerOptions.IGNORE.equals(reportInvalidJavadoc)) {
54
			options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, this.reportInvalidJavadocVisibility);
55
		}
52
		if (reportMissingJavadocComments != null) 
56
		if (reportMissingJavadocComments != null) 
53
			options.put(CompilerOptions.OPTION_ReportMissingJavadocComments, reportMissingJavadocComments);
57
			options.put(CompilerOptions.OPTION_ReportMissingJavadocComments, reportMissingJavadocComments);
54
		else
58
		else
Lines 71-79 Link Here
71
	protected void setUp() throws Exception {
75
	protected void setUp() throws Exception {
72
		super.setUp();
76
		super.setUp();
73
		this.docCommentSupport = CompilerOptions.ENABLED;
77
		this.docCommentSupport = CompilerOptions.ENABLED;
74
		reportInvalidJavadoc = CompilerOptions.ERROR;
78
		this.reportInvalidJavadoc = CompilerOptions.ERROR;
75
		reportMissingJavadocTags = CompilerOptions.ERROR;
79
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
76
		reportMissingJavadocComments = CompilerOptions.IGNORE;
80
		this.reportMissingJavadocTags = CompilerOptions.ERROR;
81
		this.reportMissingJavadocComments = CompilerOptions.IGNORE;
77
	}
82
	}
78
83
79
	/**
84
	/**
Lines 2546-2551 Link Here
2546
			""
2551
			""
2547
		);
2552
		);
2548
	}
2553
	}
2554
	/**
2555
	 * Bug 96237: [javadoc] Inner types must be qualified
2556
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=96237"
2557
	 */
2558
	public void testBug96237_Public01() {
2559
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2560
		runConformTest(
2561
			new String[] {
2562
				"comment6/Valid.java",
2563
				"package comment6;\n" + 
2564
				"public class Valid {\n" + 
2565
				"    /**\n" + 
2566
				"     * @see Valid.Inner\n" + 
2567
				"     */\n" + 
2568
				"    public class Inner { }\n" + 
2569
				"}\n" + 
2570
				"/**\n" + 
2571
				" * See also {@link Valid.Inner}\n" + 
2572
				" */\n" + 
2573
				"class Sub2 extends Valid { }"
2574
			}
2575
		);
2576
	}
2577
	public void testBug96237_Public02() {
2578
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2579
		runNegativeTest(
2580
			new String[] {
2581
				"comment6/Invalid.java",
2582
				"package comment6;\n" + 
2583
				"public class Invalid {\n" + 
2584
				"    /**\n" + 
2585
				"     * @see Inner\n" + 
2586
				"     */\n" + 
2587
				"    public class Inner { }\n" + 
2588
				"}\n" + 
2589
				"/**\n" + 
2590
				" * See also {@link Inner} \n" + 
2591
				" */\n" + 
2592
				"class Sub1 extends Invalid { }\n"
2593
			},
2594
//			comment6\Invalid.java:6: warning - Tag @see: reference not found: Inner
2595
			"----------\n" + 
2596
			"1. ERROR in comment6\\Invalid.java (at line 4)\r\n" + 
2597
			"	* @see Inner\r\n" + 
2598
			"	       ^^^^^\n" + 
2599
			"Javadoc: Not visible reference\n" + 
2600
			"----------\n"
2601
		);
2602
	}
2603
	public void testBug96237_Public03() {
2604
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2605
		runNegativeTest(
2606
			new String[] {
2607
				"comment6a/def/Test.java",
2608
				"package comment6a.def;\n" + 
2609
				"public class Test {\n" + 
2610
				"    /**\n" + 
2611
				"     * @see Inner\n" + 
2612
				"     */\n" + 
2613
				"    public class Inner { }\n" + 
2614
				"}\n",
2615
				"comment6a/test/Invalid.java",
2616
				"package comment6a.test;\n" + 
2617
				"import comment6a.def.Test;\n" + 
2618
				"/**\n" + 
2619
				" * See also {@link Inner}\n" + 
2620
				" */\n" + 
2621
				"public class Invalid extends Test { \n" + 
2622
				"}",
2623
				"comment6a/test/Invalid2.java",
2624
				"package comment6a.test;\n" + 
2625
				"import comment6a.def.Test;\n" + 
2626
				"/**\n" + 
2627
				" * @see Test.Inner\n" + 
2628
				" */\n" + 
2629
				"public class Invalid2 extends Test { \n" + 
2630
				"}"
2631
			},
2632
//			comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
2633
//			comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2634
//			comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner
2635
			"----------\n" + 
2636
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
2637
			"	* @see Inner\n" + 
2638
			"	       ^^^^^\n" + 
2639
			"Javadoc: Not visible reference\n" + 
2640
			"----------\n" + 
2641
			"----------\n" + 
2642
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
2643
			"	* See also {@link Inner}\n" + 
2644
			"	                  ^^^^^\n" + 
2645
			"Javadoc: Not visible reference\n" + 
2646
			"----------\n" + 
2647
			"----------\n" + 
2648
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
2649
			"	* @see Test.Inner\n" + 
2650
			"	       ^^^^^^^^^^\n" + 
2651
			"Javadoc: Not visible reference\n" + 
2652
			"----------\n"
2653
		);
2654
	}
2655
	public void testBug96237_Public04() {
2656
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2657
		runNegativeTest(
2658
			new String[] {
2659
				"comment6b/Invalid.java",
2660
				"package comment6b;\n" + 
2661
				"\n" + 
2662
				"/**\n" + 
2663
				" * @see Inner\n" + 
2664
				" */\n" + 
2665
				"public class Invalid implements Test { \n" + 
2666
				"}",
2667
				"comment6b/Test.java",
2668
				"package comment6b;\n" + 
2669
				"public interface Test {\n" + 
2670
				"    /**\n" + 
2671
				"     * @see Inner\n" + 
2672
				"     */\n" + 
2673
				"    public class Inner { }\n" + 
2674
				"}\n",
2675
				"comment6b/Valid.java",
2676
				"package comment6b;\n" + 
2677
				"\n" + 
2678
				"/**\n" + 
2679
				" * @see Test.Inner\n" + 
2680
				" */\n" + 
2681
				"public class Valid implements Test { \n" + 
2682
				"}"
2683
			},
2684
//			comment6b\Test.java:6: warning - Tag @see: reference not found: Inner
2685
//			comment6b\Invalid.java:6: warning - Tag @see: reference not found: Inner
2686
			"----------\n" + 
2687
			"1. ERROR in comment6b\\Invalid.java (at line 4)\n" + 
2688
			"	* @see Inner\n" + 
2689
			"	       ^^^^^\n" + 
2690
			"Javadoc: Not visible reference\n" + 
2691
			"----------\n" + 
2692
			"----------\n" + 
2693
			"1. ERROR in comment6b\\Test.java (at line 4)\n" + 
2694
			"	* @see Inner\n" + 
2695
			"	       ^^^^^\n" + 
2696
			"Javadoc: Not visible reference\n" + 
2697
			"----------\n"
2698
		);
2699
	}
2700
	public void testBug96237_Public05() {
2701
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2702
		runNegativeTest(
2703
			new String[] {
2704
				"test/a/Test.java",
2705
				"package test.a;\n" + 
2706
				"/**\n" + 
2707
				" * @see Inner\n" + 
2708
				" * @see Test.Inner\n" + 
2709
				" */\n" + 
2710
				"public class Test {\n" + 
2711
				"	class Inner {}\n" + 
2712
				"}\n"
2713
			},
2714
//			test\a\Test.java:6: warning - Tag @see: reference not found: Inner
2715
//			test\a\Test.java:6: warning - Tag @see: reference not found: Test.Inner
2716
			"----------\n" + 
2717
			"1. ERROR in test\\a\\Test.java (at line 3)\n" + 
2718
			"	* @see Inner\n" + 
2719
			"	       ^^^^^\n" + 
2720
			"Javadoc: Not visible reference\n" + 
2721
			"----------\n" + 
2722
			"2. ERROR in test\\a\\Test.java (at line 4)\n" + 
2723
			"	* @see Test.Inner\n" + 
2724
			"	       ^^^^^^^^^^\n" + 
2725
			"Javadoc: Not visible reference\n" + 
2726
			"----------\n"
2727
		);
2728
	}
2729
	public void testBug96237_Public06() {
2730
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2731
		runNegativeTest(
2732
			new String[] {
2733
				"test/b/Test.java",
2734
				"package test.b;\n" + 
2735
				"/** \n" + 
2736
				" * @see Inner.Level2\n" + 
2737
				" * @see Test.Inner.Level2\n" + 
2738
				" */\n" + 
2739
				"public class Test {\n" + 
2740
				"	/** \n" + 
2741
				"	 * @see Level2\n" + 
2742
				"	 * @see Test.Inner.Level2\n" + 
2743
				"	 */\n" + 
2744
				"	public class Inner {\n" + 
2745
				"		class Level2 {}\n" + 
2746
				"	}\n" + 
2747
				"}\n"
2748
			},
2749
//			test\b\Test.java:6: warning - Tag @see: reference not found: Inner.Level2
2750
//			test\b\Test.java:6: warning - Tag @see: reference not found: Test.Inner.Level2
2751
//			test\b\Test.java:11: warning - Tag @see: reference not found: Level2
2752
//			test\b\Test.java:11: warning - Tag @see: reference not found: Test.Inner.Level2
2753
			"----------\n" + 
2754
			"1. ERROR in test\\b\\Test.java (at line 3)\n" + 
2755
			"	* @see Inner.Level2\n" + 
2756
			"	       ^^^^^^^^^^^^\n" + 
2757
			"Javadoc: Not visible reference\n" + 
2758
			"----------\n" + 
2759
			"2. ERROR in test\\b\\Test.java (at line 4)\n" + 
2760
			"	* @see Test.Inner.Level2\n" + 
2761
			"	       ^^^^^^^^^^^^^^^^^\n" + 
2762
			"Javadoc: Not visible reference\n" + 
2763
			"----------\n" + 
2764
			"3. ERROR in test\\b\\Test.java (at line 8)\n" + 
2765
			"	* @see Level2\n" + 
2766
			"	       ^^^^^^\n" + 
2767
			"Javadoc: Not visible reference\n" + 
2768
			"----------\n" + 
2769
			"4. ERROR in test\\b\\Test.java (at line 9)\n" + 
2770
			"	* @see Test.Inner.Level2\n" + 
2771
			"	       ^^^^^^^^^^^^^^^^^\n" + 
2772
			"Javadoc: Not visible reference\n" + 
2773
			"----------\n"
2774
		);
2775
	}
2776
	public void testBug96237_Public07() {
2777
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2778
		runNegativeTest(
2779
			new String[] {
2780
				"test/c/Test.java",
2781
				"package test.c;\n" + 
2782
				"/**\n" + 
2783
				" * @see Inner.Level2.Level3\n" + 
2784
				" * @see Test.Inner.Level2.Level3\n" + 
2785
				" */\n" + 
2786
				"public class Test {\n" + 
2787
				"	public class Inner {\n" + 
2788
				"		/**\n" + 
2789
				"		 * @see Level3\n" + 
2790
				"		 * @see Level2.Level3\n" + 
2791
				"		 * @see Inner.Level2.Level3\n" + 
2792
				"		 * @see Test.Inner.Level2.Level3\n" + 
2793
				"		 */\n" + 
2794
				"		public class Level2 {\n" + 
2795
				"			class Level3 {\n" + 
2796
				"			}\n" + 
2797
				"		}\n" + 
2798
				"	}\n" + 
2799
				"}\n"
2800
			},
2801
//			test\c\Test.java:6: warning - Tag @see: reference not found: Inner.Level2.Level3
2802
//			test\c\Test.java:6: warning - Tag @see: reference not found: Test.Inner.Level2.Level3
2803
//			test\c\Test.java:14: warning - Tag @see: reference not found: Level3
2804
//			test\c\Test.java:14: warning - Tag @see: reference not found: Level2.Level3
2805
//			test\c\Test.java:14: warning - Tag @see: reference not found: Inner.Level2.Level3
2806
//			test\c\Test.java:14: warning - Tag @see: reference not found: Test.Inner.Level2.Level3
2807
			"----------\n" + 
2808
			"1. ERROR in test\\c\\Test.java (at line 3)\n" + 
2809
			"	* @see Inner.Level2.Level3\n" + 
2810
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
2811
			"Javadoc: Not visible reference\n" + 
2812
			"----------\n" + 
2813
			"2. ERROR in test\\c\\Test.java (at line 4)\n" + 
2814
			"	* @see Test.Inner.Level2.Level3\n" + 
2815
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2816
			"Javadoc: Not visible reference\n" + 
2817
			"----------\n" + 
2818
			"3. ERROR in test\\c\\Test.java (at line 9)\n" + 
2819
			"	* @see Level3\n" + 
2820
			"	       ^^^^^^\n" + 
2821
			"Javadoc: Not visible reference\n" + 
2822
			"----------\n" + 
2823
			"4. ERROR in test\\c\\Test.java (at line 10)\n" + 
2824
			"	* @see Level2.Level3\n" + 
2825
			"	       ^^^^^^^^^^^^^\n" + 
2826
			"Javadoc: Not visible reference\n" + 
2827
			"----------\n" + 
2828
			"5. ERROR in test\\c\\Test.java (at line 11)\n" + 
2829
			"	* @see Inner.Level2.Level3\n" + 
2830
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
2831
			"Javadoc: Not visible reference\n" + 
2832
			"----------\n" + 
2833
			"6. ERROR in test\\c\\Test.java (at line 12)\n" + 
2834
			"	* @see Test.Inner.Level2.Level3\n" + 
2835
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2836
			"Javadoc: Not visible reference\n" + 
2837
			"----------\n"
2838
		);
2839
	}
2840
	public void testBug96237_Private01() {
2841
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2842
		runConformTest(
2843
			new String[] {
2844
				"comment6/Valid.java",
2845
				"package comment6;\n" + 
2846
				"public class Valid {\n" + 
2847
				"    /**\n" + 
2848
				"     * @see Valid.Inner\n" + 
2849
				"     */\n" + 
2850
				"    public class Inner { }\n" + 
2851
				"}\n" + 
2852
				"/**\n" + 
2853
				" * See also {@link Valid.Inner}\n" + 
2854
				" */\n" + 
2855
				"class Sub2 extends Valid { }"
2856
			}
2857
		);
2858
	}
2859
	public void testBug96237_Private02() {
2860
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2861
		runNegativeTest(
2862
			new String[] {
2863
				"comment6/Invalid.java",
2864
				"package comment6;\n" + 
2865
				"public class Invalid {\n" + 
2866
				"    /**\n" + 
2867
				"     * @see Inner\n" + 
2868
				"     */\n" + 
2869
				"    public class Inner { }\n" + 
2870
				"}\n" + 
2871
				"/**\n" + 
2872
				" * See also {@link Inner} \n" + 
2873
				" */\n" + 
2874
				"class Sub1 extends Invalid { }\n"
2875
			},
2876
//			comment6\Invalid.java:6: warning - Tag @see: reference not found: Inner
2877
//			comment6\Invalid.java:11: warning - Tag @link: reference not found: Inner
2878
			"----------\n" + 
2879
			"1. ERROR in comment6\\Invalid.java (at line 4)\n" + 
2880
			"	* @see Inner\n" + 
2881
			"	       ^^^^^\n" + 
2882
			"Javadoc: Not visible reference\n" + 
2883
			"----------\n" + 
2884
			"2. ERROR in comment6\\Invalid.java (at line 9)\n" + 
2885
			"	* See also {@link Inner} \n" + 
2886
			"	                  ^^^^^\n" + 
2887
			"Javadoc: Not visible reference\n" + 
2888
			"----------\n"
2889
		);
2890
	}
2891
	public void testBug96237_Private03() {
2892
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2893
		runNegativeTest(
2894
			new String[] {
2895
				"comment6a/def/Test.java",
2896
					"package comment6a.def;\n" + 
2897
				"public class Test {\n" + 
2898
				"    /**\n" + 
2899
				"     * @see Inner\n" + 
2900
				"     */\n" + 
2901
				"    public class Inner { }\n" + 
2902
				"}\n",
2903
				"comment6a/test/Invalid.java",
2904
				"package comment6a.test;\n" + 
2905
				"import comment6a.def.Test;\n" + 
2906
				"/**\n" + 
2907
				" * See also {@link Inner}\n" + 
2908
				" */\n" + 
2909
				"public class Invalid extends Test { \n" + 
2910
				"}",
2911
				"comment6a/test/Invalid2.java",
2912
				"package comment6a.test;\n" + 
2913
				"import comment6a.def.Test;\n" + 
2914
				"/**\n" + 
2915
				" * @see Test.Inner\n" + 
2916
				" */\n" + 
2917
				"public class Invalid2 extends Test { \n" + 
2918
				"}"
2919
			},
2920
//			comment6a\def\Test.java:6: warning - Tag @see: reference not found: Inner
2921
//			comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2922
//			comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner
2923
			"----------\n" + 
2924
			"1. ERROR in comment6a\\def\\Test.java (at line 4)\n" + 
2925
			"	* @see Inner\n" + 
2926
			"	       ^^^^^\n" + 
2927
			"Javadoc: Not visible reference\n" + 
2928
			"----------\n" + 
2929
			"----------\n" + 
2930
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
2931
			"	* See also {@link Inner}\n" + 
2932
			"	                  ^^^^^\n" + 
2933
			"Javadoc: Not visible reference\n" + 
2934
			"----------\n" + 
2935
			"----------\n" + 
2936
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
2937
			"	* @see Test.Inner\n" + 
2938
			"	       ^^^^^^^^^^\n" + 
2939
			"Javadoc: Not visible reference\n" + 
2940
			"----------\n"
2941
		);
2942
	}
2943
	public void testBug96237_Private04() {
2944
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2945
		runNegativeTest(
2946
			new String[] {
2947
				"comment6b/Invalid.java",
2948
				"package comment6b;\n" + 
2949
				"\n" + 
2950
				"/**\n" + 
2951
				" * @see Inner\n" + 
2952
				" */\n" + 
2953
				"public class Invalid implements Test { \n" + 
2954
				"}",
2955
				"comment6b/Test.java",
2956
				"package comment6b;\n" + 
2957
				"public interface Test {\n" + 
2958
				"    /**\n" + 
2959
				"     * @see Inner\n" + 
2960
				"     */\n" + 
2961
				"    public class Inner { }\n" + 
2962
				"}\n",
2963
				"comment6b/Valid.java",
2964
				"package comment6b;\n" + 
2965
				"\n" + 
2966
				"/**\n" + 
2967
				" * @see Test.Inner\n" + 
2968
				" */\n" + 
2969
				"public class Valid implements Test { \n" + 
2970
				"}"
2971
			},
2972
//			comment6b\Invalid.java:6: warning - Tag @see: reference not found: Inner
2973
//			comment6b\Test.java:6: warning - Tag @see: reference not found: Inner
2974
			"----------\n" + 
2975
			"1. ERROR in comment6b\\Invalid.java (at line 4)\n" + 
2976
			"	* @see Inner\n" + 
2977
			"	       ^^^^^\n" + 
2978
			"Javadoc: Not visible reference\n" + 
2979
			"----------\n" + 
2980
			"----------\n" + 
2981
			"1. ERROR in comment6b\\Test.java (at line 4)\n" + 
2982
			"	* @see Inner\n" + 
2983
			"	       ^^^^^\n" + 
2984
			"Javadoc: Not visible reference\n" + 
2985
			"----------\n"
2986
		);
2987
	}
2988
	public void testBug96237_Private05() {
2989
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2990
		runConformTest(
2991
			new String[] {
2992
				"test/a/Test.java",
2993
				"package test.a;\n" + 
2994
				"/**\n" + 
2995
				" * @see Inner\n" + 
2996
				" * @see Test.Inner\n" + 
2997
				" */\n" + 
2998
				"public class Test {\n" + 
2999
				"	class Inner {}\n" + 
3000
				"}\n"
3001
			}
3002
		);
3003
	}
3004
	public void testBug96237_Private06() {
3005
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3006
		runConformTest(
3007
			new String[] {
3008
				"test/b/Test.java",
3009
				"package test.b;\n" + 
3010
				"/** \n" + 
3011
				" * @see Inner.Level2\n" + 
3012
				" * @see Test.Inner.Level2\n" + 
3013
				" */\n" + 
3014
				"public class Test {\n" + 
3015
				"	/** \n" + 
3016
				"	 * @see Level2\n" + 
3017
				"	 * @see Test.Inner.Level2\n" + 
3018
				"	 */\n" + 
3019
				"	public class Inner {\n" + 
3020
				"		class Level2 {}\n" + 
3021
				"	}\n" + 
3022
				"}\n"
3023
			}
3024
		);
3025
	}
3026
	public void testBug96237_Private07() {
3027
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
3028
		runConformTest(
3029
			new String[] {
3030
				"test/c/Test.java",
3031
				"package test.c;\n" + 
3032
				"/**\n" + 
3033
				" * @see Inner.Level2.Level3\n" + 
3034
				" * @see Test.Inner.Level2.Level3\n" + 
3035
				" */\n" + 
3036
				"public class Test {\n" + 
3037
				"	public class Inner {\n" + 
3038
				"		/**\n" + 
3039
				"		 * @see Level3\n" + 
3040
				"		 * @see Level2.Level3\n" + 
3041
				"		 * @see Inner.Level2.Level3\n" + 
3042
				"		 * @see Test.Inner.Level2.Level3\n" + 
3043
				"		 */\n" + 
3044
				"		public class Level2 {\n" + 
3045
				"			class Level3 {\n" + 
3046
				"			}\n" + 
3047
				"		}\n" + 
3048
				"	}\n" + 
3049
				"}\n"
3050
			}
3051
		);
3052
	}
2549
3053
2550
	/**
3054
	/**
2551
	 * Bug 95286: [1.5][javadoc] package-info.java incorrectly flags "Missing comment for public declaration"
3055
	 * Bug 95286: [1.5][javadoc] package-info.java incorrectly flags "Missing comment for public declaration"
Lines 3020-3025 Link Here
3020
	}
3524
	}
3021
3525
3022
	/**
3526
	/**
3527
	 * Bug 103304: [Javadoc] Wrong reference proposal for inner classes.
3528
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=103304"
3529
	 */
3530
	public void testBug103304a() {
3531
		runNegativeTest(
3532
			new String[] {
3533
				"boden/IAFAState.java",
3534
				"package boden;\n" + 
3535
				"public interface IAFAState {\n" + 
3536
				"    public class ValidationException extends Exception {\n" + 
3537
				"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
3538
				"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
3539
				"        }\n" + 
3540
				"        public void method() {}\n" + 
3541
				"    }\n" + 
3542
				"    /**\n" + 
3543
				"     * Validates a formula for consistent bindings. Bindings are consistent, when at each point in time,\n" + 
3544
				"     * the set of povided variables can be guaranteed to be a superset of the set of required variables.\n" + 
3545
				"     * @throws ValidationException Thrown if a variable is unbound. \n" + 
3546
				"     * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3547
				"     * @see IAFAState.ValidationException#method()\n" + 
3548
				"     * @see ValidationException\n" + 
3549
				"     * {@link ValidationException}\n" + 
3550
				"     */\n" + 
3551
				"    public void validate() throws ValidationException;\n" + 
3552
				"}\n",
3553
				"boden/TestValid.java",
3554
				"package boden;\n" + 
3555
				"import boden.IAFAState.ValidationException;\n" + 
3556
				"/**\n" + 
3557
				" * @see ValidationException\n" + 
3558
				" * @see IAFAState.ValidationException\n" + 
3559
				" */\n" + 
3560
				"public class TestValid {\n" + 
3561
				"	/**  \n" + 
3562
				"	 * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3563
				"	 */\n" + 
3564
				"	IAFAState.ValidationException valid1;\n" + 
3565
				"	/**\n" + 
3566
				"	 * @see IAFAState.ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3567
				"	 */\n" + 
3568
				"	IAFAState.ValidationException valid2;\n" + 
3569
				"}\n"
3570
			},
3571
//			boden\TestValid.java:8: warning - Tag @see: reference not found: ValidationException
3572
//			boden\TestValid.java:12: warning - Tag @see: reference not found: ValidationException#IAFAState.ValidationException(String, IAFAState)
3573
			"----------\n" + 
3574
			"1. ERROR in boden\\TestValid.java (at line 4)\r\n" + 
3575
			"	* @see ValidationException\r\n" + 
3576
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
3577
			"Javadoc: Not visible reference\n" + 
3578
			"----------\n"
3579
		);
3580
	}
3581
	public void testBug103304b() {
3582
		runNegativeTest(
3583
			new String[] {
3584
				"boden/IAFAState.java",
3585
				"package boden;\n" + 
3586
				"public interface IAFAState {\n" + 
3587
				"    public class ValidationException extends Exception {\n" + 
3588
				"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
3589
				"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
3590
				"        }\n" + 
3591
				"        public void method() {}\n" + 
3592
				"    }\n" + 
3593
				"}\n",
3594
				"boden/TestInvalid1.java",
3595
				"package boden;\n" + 
3596
				"import boden.IAFAState.ValidationException;\n" + 
3597
				"public class TestInvalid1 {\n" + 
3598
				"	/** \n" + 
3599
				"	 * @see ValidationException#ValidationException(String, IAFAState)\n" + 
3600
				"	 */ \n" + 
3601
				"	IAFAState.ValidationException invalid;\n" + 
3602
				"}\n",
3603
				"boden/TestInvalid2.java",
3604
				"package boden;\n" + 
3605
				"import boden.IAFAState.ValidationException;\n" + 
3606
				"public class TestInvalid2 {\n" + 
3607
				"	/**\n" + 
3608
				"	 * @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + 
3609
				"	 */\n" + 
3610
				"	IAFAState.ValidationException invalid;\n" + 
3611
				"}\n",
3612
				"boden/TestInvalid3.java",
3613
				"package boden;\n" + 
3614
				"import boden.IAFAState.ValidationException;\n" + 
3615
				"public class TestInvalid3 {\n" + 
3616
				"	/**\n" + 
3617
				"	 * @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" + 
3618
				"	 */\n" + 
3619
				"	IAFAState.ValidationException invalid;\n" + 
3620
				"}\n",
3621
				"boden/TestInvalid4.java",
3622
				"package boden;\n" + 
3623
				"import boden.IAFAState.ValidationException;\n" + 
3624
				"public class TestInvalid4 {\n" + 
3625
				"	/**\n" + 
3626
				"	 * @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" + 
3627
				"	 */\n" + 
3628
				"	IAFAState.ValidationException invalid;\n" + 
3629
				"}\n"
3630
			},
3631
//			boden\TestInvalid1.java:7: warning - Tag @see: reference not found: ValidationException#ValidationException(String, IAFAState)
3632
//			boden\TestInvalid2.java:6: warning - Tag @see: can't find ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
3633
//			boden\TestInvalid3.java:6: warning - Tag @see: can't find IAFA.State.ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
3634
//			boden\TestInvalid4.java:6: warning - Tag @see: can't find IAFAState in boden.IAFAState.ValidationException
3635
			"----------\n" + 
3636
			"1. ERROR in boden\\TestInvalid1.java (at line 5)\n" + 
3637
			"	* @see ValidationException#ValidationException(String, IAFAState)\n" + 
3638
			"	                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3639
			"Javadoc: Invalid qualification for member type constructor\n" + 
3640
			"----------\n" +
3641
			"----------\n" + 
3642
			"1. ERROR in boden\\TestInvalid2.java (at line 5)\n" + 
3643
			"	* @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + 
3644
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3645
			"Javadoc: Invalid qualification for member type constructor\n" + 
3646
			"----------\n" +
3647
			"----------\n" + 
3648
			"1. ERROR in boden\\TestInvalid3.java (at line 5)\n" + 
3649
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" + 
3650
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
3651
			"Javadoc: Invalid qualification for member type constructor\n" + 
3652
			"----------\n" + 
3653
			"----------\n" + 
3654
			"1. ERROR in boden\\TestInvalid4.java (at line 5)\n" + 
3655
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" + 
3656
			"	                                     ^^^^^^^^^\n" + 
3657
			"Javadoc: IAFAState cannot be resolved or is not a field\n" + 
3658
			"----------\n"
3659
		);
3660
	}
3661
	public void testBug103304c() {
3662
		runNegativeTest(
3663
			new String[] {
3664
				"test/Test.java",
3665
				"package test;\n" + 
3666
				"public interface Test {\n" + 
3667
				"	public class Level0 {\n" + 
3668
				"		public Level0() {}\n" + 
3669
				"	}\n" + 
3670
				"	public interface Member {\n" + 
3671
				"		public class Level1 {\n" + 
3672
				"			public Level1() {}\n" + 
3673
				"		}\n" + 
3674
				"	}\n" + 
3675
				"}\n",
3676
				"test/C.java",
3677
				"package test;\n" + 
3678
				"public class C {\n" + 
3679
				"	/**\n" + 
3680
				"	 * @see Test.Level0#Test.Level0()\n" + 
3681
				"	 */\n" + 
3682
				"	Test.Level0 valid = new Test.Level0();\n" + 
3683
				"	/**\n" + 
3684
				"	 * @see Test.Level0#Level0()\n" + 
3685
				"	 */\n" + 
3686
				"	Test.Level0 invalid = new Test.Level0();\n" + 
3687
				"}\n"
3688
			},
3689
//			test\C.java:10: warning - Tag @see: can't find Level0() in test.Test.Level0
3690
			"----------\n" + 
3691
			"1. ERROR in test\\C.java (at line 8)\n" + 
3692
			"	* @see Test.Level0#Level0()\n" + 
3693
			"	                   ^^^^^^^^\n" + 
3694
			"Javadoc: Invalid qualification for member type constructor\n" + 
3695
			"----------\n"
3696
		);
3697
	}
3698
	public void testBug103304d() {
3699
		runNegativeTest(
3700
			new String[] {
3701
				"test/Test.java",
3702
				"package test;\n" + 
3703
				"public interface Test {\n" + 
3704
				"	public class Level0 {\n" + 
3705
				"		public Level0() {}\n" + 
3706
				"	}\n" + 
3707
				"	public interface Member {\n" + 
3708
				"		public class Level1 {\n" + 
3709
				"			public Level1() {}\n" + 
3710
				"		}\n" + 
3711
				"	}\n" + 
3712
				"}\n",
3713
				"test/C2.java",
3714
				"package test;\n" + 
3715
				"public class C2 {\n" + 
3716
				"	/**\n" + 
3717
				"	 * @see Test.Member.Level1#Test.Member.Level1()\n" + 
3718
				"	 */\n" + 
3719
				"	Test.Member.Level1 valid = new Test.Member.Level1();\n" + 
3720
				"	/**\n" + 
3721
				"	 * @see Test.Member.Level1#Level1()\n" + 
3722
				"	 */\n" + 
3723
				"	Test.Member.Level1 invalid = new Test.Member.Level1();\n" + 
3724
				"	/**\n" + 
3725
				"	 * @see Test.Member.Level1#Test.Level1()\n" + 
3726
				"	 */\n" + 
3727
				"	Test.Member.Level1 wrong = new Test.Member.Level1();\n" + 
3728
				"}\n"
3729
			},
3730
//			test\C2.java:10: warning - Tag @see: can't find Level1() in test.Test.Member.Level1
3731
//			test\C2.java:14: warning - Tag @see: can't find Test.Level1() in test.Test.Member.Level1
3732
			"----------\n" + 
3733
			"1. ERROR in test\\C2.java (at line 8)\n" + 
3734
			"	* @see Test.Member.Level1#Level1()\n" + 
3735
			"	                          ^^^^^^^^\n" + 
3736
			"Javadoc: Invalid qualification for member type constructor\n" + 
3737
			"----------\n" + 
3738
			"2. ERROR in test\\C2.java (at line 12)\n" + 
3739
			"	* @see Test.Member.Level1#Test.Level1()\n" + 
3740
			"	                          ^^^^^^^^^^^^^\n" + 
3741
			"Javadoc: Invalid qualification for member type constructor\n" + 
3742
			"----------\n"
3743
		);
3744
	}
3745
	public void testBug103304e() {
3746
		runConformTest(
3747
			new String[] {
3748
				"implicit/Valid.java",
3749
				"package implicit;\n" + 
3750
				"public interface Valid {\n" + 
3751
				"	public class Level0 {\n" + 
3752
				"		/**\n" + 
3753
				"		 * @see #Valid.Level0() Valid\n" + 
3754
				"		 */\n" + 
3755
				"		public Level0() {}\n" + 
3756
				"		/**\n" + 
3757
				"		 * @see #Valid.Level0(String) Valid\n" + 
3758
				"		 */\n" + 
3759
				"		public Level0(String str) {}\n" + 
3760
				"	}\n" + 
3761
				"	public interface Member {\n" + 
3762
				"		public class Level1 {\n" + 
3763
				"			/**\n" + 
3764
				"			 * @see #Valid.Member.Level1() Valid\n" + 
3765
				"			 */\n" + 
3766
				"			public Level1() {}\n" + 
3767
				"			/**\n" + 
3768
				"			 * @see #Valid.Member.Level1(int) Valid\n" + 
3769
				"			 */\n" + 
3770
				"			public Level1(int x) {}\n" + 
3771
				"		}\n" + 
3772
				"	}\n" + 
3773
				"}\n"
3774
			}
3775
		);
3776
	}
3777
	public void testBug103304f() {
3778
		runNegativeTest(
3779
			new String[] {
3780
				"implicit/Invalid.java",
3781
				"package implicit;\n" + 
3782
				"public interface Invalid {\n" + 
3783
				"	public class Level0 {\n" + 
3784
				"		/**\n" + 
3785
				"		 * @see #Level0() Invalid\n" + 
3786
				"		 */\n" + 
3787
				"		public Level0() {}\n" + 
3788
				"		/**\n" + 
3789
				"		 * @see #Level0(String) Invalid\n" + 
3790
				"		 */\n" + 
3791
				"		public Level0(String str) {}\n" + 
3792
				"	}\n" + 
3793
				"	public interface Member {\n" + 
3794
				"		public class Level1 {\n" + 
3795
				"			/**\n" + 
3796
				"			 * @see #Level1() Invalid\n" + 
3797
				"			 * @see #Member.Level1() Invalid\n" + 
3798
				"			 * @see #Invalid.Level1() Invalid\n" + 
3799
				"			 */\n" + 
3800
				"			public Level1() {}\n" + 
3801
				"			/**\n" + 
3802
				"			 * @see #Level1(int) Invalid\n" + 
3803
				"			 * @see #Invalid.Level1(int) Invalid\n" + 
3804
				"			 * @see #Member.Level1(int) Invalid\n" + 
3805
				"			 */\n" + 
3806
				"			public Level1(int x) {}\n" + 
3807
				"		}\n" + 
3808
				"	}\n" + 
3809
				"}\n"
3810
			},
3811
//			implicit\Invalid.java:7: warning - Tag @see: can't find Level0() in implicit.Invalid.Level0
3812
//			implicit\Invalid.java:11: warning - Tag @see: can't find Level0(String) in implicit.Invalid.Level0
3813
//			implicit\Invalid.java:20: warning - Tag @see: can't find Level1() in implicit.Invalid.Member.Level1
3814
//			implicit\Invalid.java:20: warning - Tag @see: can't find Member.Level1() in implicit.Invalid.Member.Level1
3815
//			implicit\Invalid.java:20: warning - Tag @see: can't find Invalid.Level1() in implicit.Invalid.Member.Level1
3816
//			implicit\Invalid.java:26: warning - Tag @see: can't find Level1(int) in implicit.Invalid.Member.Level1
3817
//			implicit\Invalid.java:26: warning - Tag @see: can't find Invalid.Level1(int) in implicit.Invalid.Member.Level1
3818
//			implicit\Invalid.java:26: warning - Tag @see: can't find Member.Level1(int) in implicit.Invalid.Member.Level1
3819
			"----------\n" + 
3820
			"1. ERROR in implicit\\Invalid.java (at line 5)\n" + 
3821
			"	* @see #Level0() Invalid\n" + 
3822
			"	        ^^^^^^^^\n" + 
3823
			"Javadoc: Invalid qualification for member type constructor\n" + 
3824
			"----------\n" + 
3825
			"2. ERROR in implicit\\Invalid.java (at line 9)\n" + 
3826
			"	* @see #Level0(String) Invalid\n" + 
3827
			"	        ^^^^^^^^^^^^^^\n" + 
3828
			"Javadoc: Invalid qualification for member type constructor\n" + 
3829
			"----------\n" + 
3830
			"3. ERROR in implicit\\Invalid.java (at line 16)\n" + 
3831
			"	* @see #Level1() Invalid\n" + 
3832
			"	        ^^^^^^^^\n" + 
3833
			"Javadoc: Invalid qualification for member type constructor\n" + 
3834
			"----------\n" + 
3835
			"4. ERROR in implicit\\Invalid.java (at line 17)\n" + 
3836
			"	* @see #Member.Level1() Invalid\n" + 
3837
			"	        ^^^^^^^^^^^^^^^\n" + 
3838
			"Javadoc: Invalid qualification for member type constructor\n" + 
3839
			"----------\n" + 
3840
			"5. ERROR in implicit\\Invalid.java (at line 18)\n" + 
3841
			"	* @see #Invalid.Level1() Invalid\n" + 
3842
			"	        ^^^^^^^^^^^^^^^^\n" + 
3843
			"Javadoc: Invalid qualification for member type constructor\n" + 
3844
			"----------\n" + 
3845
			"6. ERROR in implicit\\Invalid.java (at line 22)\n" + 
3846
			"	* @see #Level1(int) Invalid\n" + 
3847
			"	        ^^^^^^^^^^^\n" + 
3848
			"Javadoc: Invalid qualification for member type constructor\n" + 
3849
			"----------\n" + 
3850
			"7. ERROR in implicit\\Invalid.java (at line 23)\n" + 
3851
			"	* @see #Invalid.Level1(int) Invalid\n" + 
3852
			"	        ^^^^^^^^^^^^^^^^^^^\n" + 
3853
			"Javadoc: Invalid qualification for member type constructor\n" + 
3854
			"----------\n" + 
3855
			"8. ERROR in implicit\\Invalid.java (at line 24)\n" + 
3856
			"	* @see #Member.Level1(int) Invalid\n" + 
3857
			"	        ^^^^^^^^^^^^^^^^^^\n" + 
3858
			"Javadoc: Invalid qualification for member type constructor\n" + 
3859
			"----------\n"
3860
		);
3861
	}
3862
3863
	/**
3023
	 * Bug 112346: [javadoc] {@inheritedDoc} should be inactive for non-overridden method
3864
	 * Bug 112346: [javadoc] {@inheritedDoc} should be inactive for non-overridden method
3024
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=112346"
3865
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=112346"
3025
	 */
3866
	 */
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTest_1_5.java (-4 / +804 lines)
Lines 20-25 Link Here
20
20
21
	String docCommentSupport = CompilerOptions.ENABLED;
21
	String docCommentSupport = CompilerOptions.ENABLED;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
22
	String reportInvalidJavadoc = CompilerOptions.ERROR;
23
	String reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
23
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocTags = CompilerOptions.ERROR;
24
	String reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
25
	String reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
25
	String reportMissingJavadocComments = null;
26
	String reportMissingJavadocComments = null;
Lines 49-54 Link Here
49
		Map options = super.getCompilerOptions();
50
		Map options = super.getCompilerOptions();
50
		options.put(CompilerOptions.OPTION_DocCommentSupport, this.docCommentSupport);
51
		options.put(CompilerOptions.OPTION_DocCommentSupport, this.docCommentSupport);
51
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
52
		options.put(CompilerOptions.OPTION_ReportInvalidJavadoc, reportInvalidJavadoc);
53
		if (!CompilerOptions.IGNORE.equals(reportInvalidJavadoc)) {
54
			options.put(CompilerOptions.OPTION_ReportInvalidJavadocTagsVisibility, this.reportInvalidJavadocVisibility);
55
		}
52
		if (reportMissingJavadocComments != null) 
56
		if (reportMissingJavadocComments != null) 
53
			options.put(CompilerOptions.OPTION_ReportMissingJavadocComments, reportMissingJavadocComments);
57
			options.put(CompilerOptions.OPTION_ReportMissingJavadocComments, reportMissingJavadocComments);
54
		else
58
		else
Lines 75-84 Link Here
75
	protected void setUp() throws Exception {
79
	protected void setUp() throws Exception {
76
		super.setUp();
80
		super.setUp();
77
		this.docCommentSupport = CompilerOptions.ENABLED;
81
		this.docCommentSupport = CompilerOptions.ENABLED;
78
		reportInvalidJavadoc = CompilerOptions.ERROR;
82
		this.reportInvalidJavadoc = CompilerOptions.ERROR;
79
		reportMissingJavadocTags = CompilerOptions.ERROR;
83
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
80
		reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
84
		this.reportMissingJavadocTags = CompilerOptions.ERROR;
81
		reportMissingJavadocComments = CompilerOptions.IGNORE;
85
		this.reportMissingJavadocTagsOverriding = CompilerOptions.ENABLED;
86
		this.reportMissingJavadocComments = CompilerOptions.IGNORE;
82
	}
87
	}
83
88
84
	/**
89
	/**
Lines 1899-1904 Link Here
1899
	}
1904
	}
1900
1905
1901
	/**
1906
	/**
1907
	 * Bug 96237: [javadoc] Inner types must be qualified
1908
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=96237"
1909
	 */
1910
	public void testBug96237_Public01() {
1911
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
1912
		runConformTest(
1913
			new String[] {
1914
				"comment6/Valid.java",
1915
				"package comment6;\n" + 
1916
				"public class Valid {\n" + 
1917
				"    /**\n" + 
1918
				"     * @see Valid.Inner\n" + 
1919
				"     */\n" + 
1920
				"    public class Inner { }\n" + 
1921
				"}\n" + 
1922
				"/**\n" + 
1923
				" * See also {@link Valid.Inner}\n" + 
1924
				" */\n" + 
1925
				"class Sub2 extends Valid { }"
1926
			}
1927
		);
1928
	}
1929
	public void testBug96237_Public02() {
1930
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
1931
		runConformTest(
1932
			new String[] {
1933
				"comment6/Invalid.java",
1934
				"package comment6;\n" + 
1935
				"public class Invalid {\n" + 
1936
				"    /**\n" + 
1937
				"     * @see Inner\n" + 
1938
				"     */\n" + 
1939
				"    public class Inner { }\n" + 
1940
				"}\n" + 
1941
				"/**\n" + 
1942
				" * See also {@link Inner} \n" + 
1943
				" */\n" + 
1944
				"class Sub1 extends Invalid { }\n"
1945
			}
1946
		);
1947
	}
1948
	public void testBug96237_Public03() {
1949
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
1950
		runNegativeTest(
1951
			new String[] {
1952
				"comment6a/def/Test.java",
1953
				"package comment6a.def;\n" + 
1954
				"public class Test {\n" + 
1955
				"    /**\n" + 
1956
				"     * @see Inner\n" + 
1957
				"     */\n" + 
1958
				"    public class Inner { }\n" + 
1959
				"}\n",
1960
				"comment6a/test/Invalid.java",
1961
				"package comment6a.test;\n" + 
1962
				"import comment6a.def.Test;\n" + 
1963
				"/**\n" + 
1964
				" * See also {@link Inner}\n" + 
1965
				" */\n" + 
1966
				"public class Invalid extends Test { \n" + 
1967
				"}",
1968
				"comment6a/test/Invalid2.java",
1969
				"package comment6a.test;\n" + 
1970
				"import comment6a.def.Test;\n" + 
1971
				"/**\n" + 
1972
				" * @see Test.Inner\n" + 
1973
				" */\n" + 
1974
				"public class Invalid2 extends Test { \n" + 
1975
				"}"
1976
			},
1977
//			comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
1978
//			comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner
1979
			"----------\n" + 
1980
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
1981
			"	* See also {@link Inner}\n" + 
1982
			"	                  ^^^^^\n" + 
1983
			"Javadoc: Not visible reference\n" + 
1984
			"----------\n" + 
1985
			"----------\n" + 
1986
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
1987
			"	* @see Test.Inner\n" + 
1988
			"	       ^^^^^^^^^^\n" + 
1989
			"Javadoc: Not visible reference\n" + 
1990
			"----------\n"
1991
		);
1992
	}
1993
	public void testBug96237_Public04() {
1994
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
1995
		runNegativeTest(
1996
			new String[] {
1997
				"comment6b/Invalid.java",
1998
				"package comment6b;\n" + 
1999
				"\n" + 
2000
				"/**\n" + 
2001
				" * @see Inner\n" + 
2002
				" */\n" + 
2003
				"public class Invalid implements Test { \n" + 
2004
				"}",
2005
				"comment6b/Test.java",
2006
				"package comment6b;\n" + 
2007
				"public interface Test {\n" + 
2008
				"    /**\n" + 
2009
				"     * @see Inner\n" + 
2010
				"     */\n" + 
2011
				"    public class Inner { }\n" + 
2012
				"}\n",
2013
				"comment6b/Valid.java",
2014
				"package comment6b;\n" + 
2015
				"\n" + 
2016
				"/**\n" + 
2017
				" * @see Test.Inner\n" + 
2018
				" */\n" + 
2019
				"public class Valid implements Test { \n" + 
2020
				"}"
2021
			},
2022
//			comment6b\Invalid.java:6: warning - Tag @see: reference not found: Inner
2023
			"----------\n" + 
2024
			"1. ERROR in comment6b\\Invalid.java (at line 4)\n" + 
2025
			"	* @see Inner\n" + 
2026
			"	       ^^^^^\n" + 
2027
			"Javadoc: Not visible reference\n" + 
2028
			"----------\n"
2029
		);
2030
	}
2031
	public void testBug96237_Public05() {
2032
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2033
		runNegativeTest(
2034
			new String[] {
2035
				"test/a/Test.java",
2036
				"package test.a;\n" + 
2037
				"/**\n" + 
2038
				" * @see Inner\n" + 
2039
				" * @see Test.Inner\n" + 
2040
				" */\n" + 
2041
				"public class Test {\n" + 
2042
				"	class Inner {}\n" + 
2043
				"}\n"
2044
			},
2045
//			test\a\Test.java:6: warning - Tag @see: reference not found: Inner
2046
//			test\a\Test.java:6: warning - Tag @see: reference not found: Test.Inner
2047
			"----------\n" + 
2048
			"1. ERROR in test\\a\\Test.java (at line 3)\n" + 
2049
			"	* @see Inner\n" + 
2050
			"	       ^^^^^\n" + 
2051
			"Javadoc: Not visible reference\n" + 
2052
			"----------\n" + 
2053
			"2. ERROR in test\\a\\Test.java (at line 4)\n" + 
2054
			"	* @see Test.Inner\n" + 
2055
			"	       ^^^^^^^^^^\n" + 
2056
			"Javadoc: Not visible reference\n" + 
2057
			"----------\n"
2058
		);
2059
	}
2060
	public void testBug96237_Public06() {
2061
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2062
		runNegativeTest(
2063
			new String[] {
2064
				"test/b/Test.java",
2065
				"package test.b;\n" + 
2066
				"/** \n" + 
2067
				" * @see Inner.Level2\n" + 
2068
				" * @see Test.Inner.Level2\n" + 
2069
				" */\n" + 
2070
				"public class Test {\n" + 
2071
				"	/** \n" + 
2072
				"	 * @see Level2\n" + 
2073
				"	 * @see Test.Inner.Level2\n" + 
2074
				"	 */\n" + 
2075
				"	public class Inner {\n" + 
2076
				"		class Level2 {}\n" + 
2077
				"	}\n" + 
2078
				"}\n"
2079
			},
2080
//			test\b\Test.java:6: warning - Tag @see: reference not found: Inner.Level2
2081
//			test\b\Test.java:6: warning - Tag @see: reference not found: Test.Inner.Level2
2082
//			test\b\Test.java:11: warning - Tag @see: reference not found: Level2
2083
//			test\b\Test.java:11: warning - Tag @see: reference not found: Test.Inner.Level2
2084
			"----------\n" + 
2085
			"1. ERROR in test\\b\\Test.java (at line 3)\n" + 
2086
			"	* @see Inner.Level2\n" + 
2087
			"	       ^^^^^^^^^^^^\n" + 
2088
			"Javadoc: Not visible reference\n" + 
2089
			"----------\n" + 
2090
			"2. ERROR in test\\b\\Test.java (at line 4)\n" + 
2091
			"	* @see Test.Inner.Level2\n" + 
2092
			"	       ^^^^^^^^^^^^^^^^^\n" + 
2093
			"Javadoc: Not visible reference\n" + 
2094
			"----------\n" + 
2095
			"3. ERROR in test\\b\\Test.java (at line 8)\n" + 
2096
			"	* @see Level2\n" + 
2097
			"	       ^^^^^^\n" + 
2098
			"Javadoc: Not visible reference\n" + 
2099
			"----------\n" + 
2100
			"4. ERROR in test\\b\\Test.java (at line 9)\n" + 
2101
			"	* @see Test.Inner.Level2\n" + 
2102
			"	       ^^^^^^^^^^^^^^^^^\n" + 
2103
			"Javadoc: Not visible reference\n" + 
2104
			"----------\n"
2105
		);
2106
	}
2107
	public void testBug96237_Public07() {
2108
		this.reportInvalidJavadocVisibility = CompilerOptions.PUBLIC;
2109
		runNegativeTest(
2110
			new String[] {
2111
				"test/c/Test.java",
2112
				"package test.c;\n" + 
2113
				"/**\n" + 
2114
				" * @see Inner.Level2.Level3\n" + 
2115
				" * @see Test.Inner.Level2.Level3\n" + 
2116
				" */\n" + 
2117
				"public class Test {\n" + 
2118
				"	public class Inner {\n" + 
2119
				"		/**\n" + 
2120
				"		 * @see Level3\n" + 
2121
				"		 * @see Level2.Level3\n" + 
2122
				"		 * @see Inner.Level2.Level3\n" + 
2123
				"		 * @see Test.Inner.Level2.Level3\n" + 
2124
				"		 */\n" + 
2125
				"		public class Level2 {\n" + 
2126
				"			class Level3 {\n" + 
2127
				"			}\n" + 
2128
				"		}\n" + 
2129
				"	}\n" + 
2130
				"}\n"
2131
			},
2132
//			test\c\Test.java:6: warning - Tag @see: reference not found: Inner.Level2.Level3
2133
//			test\c\Test.java:6: warning - Tag @see: reference not found: Test.Inner.Level2.Level3
2134
//			test\c\Test.java:14: warning - Tag @see: reference not found: Level3
2135
//			test\c\Test.java:14: warning - Tag @see: reference not found: Level2.Level3
2136
//			test\c\Test.java:14: warning - Tag @see: reference not found: Inner.Level2.Level3
2137
//			test\c\Test.java:14: warning - Tag @see: reference not found: Test.Inner.Level2.Level3
2138
			"----------\n" + 
2139
			"1. ERROR in test\\c\\Test.java (at line 3)\n" + 
2140
			"	* @see Inner.Level2.Level3\n" + 
2141
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
2142
			"Javadoc: Not visible reference\n" + 
2143
			"----------\n" + 
2144
			"2. ERROR in test\\c\\Test.java (at line 4)\n" + 
2145
			"	* @see Test.Inner.Level2.Level3\n" + 
2146
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2147
			"Javadoc: Not visible reference\n" + 
2148
			"----------\n" + 
2149
			"3. ERROR in test\\c\\Test.java (at line 9)\n" + 
2150
			"	* @see Level3\n" + 
2151
			"	       ^^^^^^\n" + 
2152
			"Javadoc: Not visible reference\n" + 
2153
			"----------\n" + 
2154
			"4. ERROR in test\\c\\Test.java (at line 10)\n" + 
2155
			"	* @see Level2.Level3\n" + 
2156
			"	       ^^^^^^^^^^^^^\n" + 
2157
			"Javadoc: Not visible reference\n" + 
2158
			"----------\n" + 
2159
			"5. ERROR in test\\c\\Test.java (at line 11)\n" + 
2160
			"	* @see Inner.Level2.Level3\n" + 
2161
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
2162
			"Javadoc: Not visible reference\n" + 
2163
			"----------\n" + 
2164
			"6. ERROR in test\\c\\Test.java (at line 12)\n" + 
2165
			"	* @see Test.Inner.Level2.Level3\n" + 
2166
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2167
			"Javadoc: Not visible reference\n" + 
2168
			"----------\n"
2169
		);
2170
	}
2171
	public void testBug96237_Private01() {
2172
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2173
		runConformTest(
2174
			new String[] {
2175
				"comment6/Valid.java",
2176
				"package comment6;\n" + 
2177
				"public class Valid {\n" + 
2178
				"    /**\n" + 
2179
				"     * @see Valid.Inner\n" + 
2180
				"     */\n" + 
2181
				"    public class Inner { }\n" + 
2182
				"}\n" + 
2183
				"/**\n" + 
2184
				" * See also {@link Valid.Inner}\n" + 
2185
				" */\n" + 
2186
				"class Sub2 extends Valid { }"
2187
			}
2188
		);
2189
	}
2190
	public void testBug96237_Private02() {
2191
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2192
		runNegativeTest(
2193
			new String[] {
2194
				"comment6/Invalid.java",
2195
				"package comment6;\n" + 
2196
				"public class Invalid {\n" + 
2197
				"    /**\n" + 
2198
				"     * @see Inner\n" + 
2199
				"     */\n" + 
2200
				"    public class Inner { }\n" + 
2201
				"}\n" + 
2202
				"/**\n" + 
2203
				" * See also {@link Inner} \n" + 
2204
				" */\n" + 
2205
				"class Sub1 extends Invalid { }\n"
2206
			},
2207
//			comment6\Invalid.java:11: warning - Tag @link: reference not found: Inner
2208
			"----------\n" + 
2209
			"1. ERROR in comment6\\Invalid.java (at line 9)\n" + 
2210
			"	* See also {@link Inner} \n" + 
2211
			"	                  ^^^^^\n" + 
2212
			"Javadoc: Not visible reference\n" + 
2213
			"----------\n"
2214
		);
2215
	}
2216
	public void testBug96237_Private03() {
2217
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2218
		runNegativeTest(
2219
			new String[] {
2220
				"comment6a/def/Test.java",
2221
				"package comment6a.def;\n" + 
2222
				"public class Test {\n" + 
2223
				"    /**\n" + 
2224
				"     * @see Inner\n" + 
2225
				"     */\n" + 
2226
				"    public class Inner { }\n" + 
2227
				"}\n",
2228
				"comment6a/test/Invalid.java",
2229
				"package comment6a.test;\n" + 
2230
				"import comment6a.def.Test;\n" + 
2231
				"/**\n" + 
2232
				" * See also {@link Inner}\n" + 
2233
				" */\n" + 
2234
				"public class Invalid extends Test { \n" + 
2235
				"}",
2236
				"comment6a/test/Invalid2.java",
2237
				"package comment6a.test;\n" + 
2238
				"import comment6a.def.Test;\n" + 
2239
				"/**\n" + 
2240
				" * @see Test.Inner\n" + 
2241
				" */\n" + 
2242
				"public class Invalid2 extends Test { \n" + 
2243
				"}"
2244
			},
2245
//			comment6a\test\Invalid.java:8: warning - Tag @link: reference not found: Inner
2246
//			comment6a\test\Invalid2.java:8: warning - Tag @see: reference not found: Test.Inner
2247
			"----------\n" + 
2248
			"1. ERROR in comment6a\\test\\Invalid.java (at line 4)\n" + 
2249
			"	* See also {@link Inner}\n" + 
2250
			"	                  ^^^^^\n" + 
2251
			"Javadoc: Not visible reference\n" + 
2252
			"----------\n" + 
2253
			"----------\n" + 
2254
			"1. ERROR in comment6a\\test\\Invalid2.java (at line 4)\n" + 
2255
			"	* @see Test.Inner\n" + 
2256
			"	       ^^^^^^^^^^\n" + 
2257
			"Javadoc: Not visible reference\n" + 
2258
			"----------\n"
2259
		);
2260
	}
2261
	public void testBug96237_Private04() {
2262
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2263
		runNegativeTest(
2264
			new String[] {
2265
				"comment6b/Invalid.java",
2266
				"package comment6b;\n" + 
2267
				"\n" + 
2268
				"/**\n" + 
2269
				" * @see Inner\n" + 
2270
				" */\n" + 
2271
				"public class Invalid implements Test { \n" + 
2272
				"}",
2273
				"comment6b/Test.java",
2274
				"package comment6b;\n" + 
2275
				"public interface Test {\n" + 
2276
				"    /**\n" + 
2277
				"     * @see Inner\n" + 
2278
				"     */\n" + 
2279
				"    public class Inner { }\n" + 
2280
				"}\n",
2281
				"comment6b/Valid.java",
2282
				"package comment6b;\n" + 
2283
				"\n" + 
2284
				"/**\n" + 
2285
				" * @see Test.Inner\n" + 
2286
				" */\n" + 
2287
				"public class Valid implements Test { \n" + 
2288
				"}"
2289
			},
2290
//			comment6b\Invalid.java:6: warning - Tag @see: reference not found: Inner
2291
			"----------\n" + 
2292
			"1. ERROR in comment6b\\Invalid.java (at line 4)\n" + 
2293
			"	* @see Inner\n" + 
2294
			"	       ^^^^^\n" + 
2295
			"Javadoc: Not visible reference\n" + 
2296
			"----------\n"
2297
		);
2298
	}
2299
	public void testBug96237_Private05() {
2300
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2301
		runConformTest(
2302
			new String[] {
2303
				"test/a/Test.java",
2304
				"package test.a;\n" + 
2305
				"/**\n" + 
2306
				" * @see Inner\n" + 
2307
				" * @see Test.Inner\n" + 
2308
				" */\n" + 
2309
				"public class Test {\n" + 
2310
				"	class Inner {}\n" + 
2311
				"}\n"
2312
			}
2313
		);
2314
	}
2315
	public void testBug96237_Private06() {
2316
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2317
		runConformTest(
2318
			new String[] {
2319
				"test/b/Test.java",
2320
				"package test.b;\n" + 
2321
				"/** \n" + 
2322
				" * @see Inner.Level2\n" + 
2323
				" * @see Test.Inner.Level2\n" + 
2324
				" */\n" + 
2325
				"public class Test {\n" + 
2326
				"	/** \n" + 
2327
				"	 * @see Level2\n" + 
2328
				"	 * @see Test.Inner.Level2\n" + 
2329
				"	 */\n" + 
2330
				"	public class Inner {\n" + 
2331
				"		class Level2 {}\n" + 
2332
				"	}\n" + 
2333
				"}\n"
2334
			}
2335
		);
2336
	}
2337
	public void testBug96237_Private07() {
2338
		this.reportInvalidJavadocVisibility = CompilerOptions.PRIVATE;
2339
		runConformTest(
2340
			new String[] {
2341
				"test/c/Test.java",
2342
				"package test.c;\n" + 
2343
				"/**\n" + 
2344
				" * @see Inner.Level2.Level3\n" + 
2345
				" * @see Test.Inner.Level2.Level3\n" + 
2346
				" */\n" + 
2347
				"public class Test {\n" + 
2348
				"	public class Inner {\n" + 
2349
				"		/**\n" + 
2350
				"		 * @see Level3\n" + 
2351
				"		 * @see Level2.Level3\n" + 
2352
				"		 * @see Inner.Level2.Level3\n" + 
2353
				"		 * @see Test.Inner.Level2.Level3\n" + 
2354
				"		 */\n" + 
2355
				"		public class Level2 {\n" + 
2356
				"			class Level3 {\n" + 
2357
				"			}\n" + 
2358
				"		}\n" + 
2359
				"	}\n" + 
2360
				"}\n"
2361
			}
2362
		);
2363
	}
2364
2365
	/**
1902
	 * Bug 101283: [1.5][javadoc] Javadoc validation raises missing implementation in compiler
2366
	 * Bug 101283: [1.5][javadoc] Javadoc validation raises missing implementation in compiler
1903
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=101283"
2367
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=101283"
1904
	 */
2368
	 */
Lines 2150-2155 Link Here
2150
	}
2614
	}
2151
2615
2152
	/**
2616
	/**
2617
	 * Bug 103304: [Javadoc] Wrong reference proposal for inner classes.
2618
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=103304"
2619
	 */
2620
	public void testBug103304a() {
2621
		runNegativeTest(
2622
			new String[] {
2623
				"boden/IAFAState.java",
2624
				"package boden;\n" + 
2625
				"public interface IAFAState {\n" + 
2626
				"    public class ValidationException extends Exception {\n" + 
2627
				"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
2628
				"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
2629
				"        }\n" + 
2630
				"        public void method() {}\n" + 
2631
				"    }\n" + 
2632
				"    /**\n" + 
2633
				"     * Validates a formula for consistent bindings. Bindings are consistent, when at each point in time,\n" + 
2634
				"     * the set of povided variables can be guaranteed to be a superset of the set of required variables.\n" + 
2635
				"     * @throws ValidationException Thrown if a variable is unbound. \n" + 
2636
				"     * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
2637
				"     * @see IAFAState.ValidationException#method()\n" + 
2638
				"     * @see ValidationException\n" + 
2639
				"     * {@link ValidationException}\n" + 
2640
				"     */\n" + 
2641
				"    public void validate() throws ValidationException;\n" + 
2642
				"}\n",
2643
				"boden/TestValid.java",
2644
				"package boden;\n" + 
2645
				"import boden.IAFAState.ValidationException;\n" + 
2646
				"/**\n" + 
2647
				" * @see ValidationException\n" + 
2648
				" * @see IAFAState.ValidationException\n" + 
2649
				" */\n" + 
2650
				"public class TestValid {\n" + 
2651
				"	/**  \n" + 
2652
				"	 * @see ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
2653
				"	 */\n" + 
2654
				"	IAFAState.ValidationException valid1;\n" + 
2655
				"	/**\n" + 
2656
				"	 * @see IAFAState.ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
2657
				"	 */\n" + 
2658
				"	IAFAState.ValidationException valid2;\n" + 
2659
				"}\n"
2660
			},
2661
			// no warning
2662
			"----------\n" + 
2663
			"1. ERROR in boden\\TestValid.java (at line 4)\r\n" + 
2664
			"	* @see ValidationException\r\n" + 
2665
			"	       ^^^^^^^^^^^^^^^^^^^\n" + 
2666
			"Javadoc: Not visible reference\n" + 
2667
			"----------\n"
2668
		);
2669
	}
2670
	public void testBug103304b() {
2671
		runNegativeTest(
2672
			new String[] {
2673
				"boden/IAFAState.java",
2674
				"package boden;\n" + 
2675
				"public interface IAFAState {\n" + 
2676
				"    public class ValidationException extends Exception {\n" + 
2677
				"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
2678
				"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
2679
				"        }\n" + 
2680
				"        public void method() {}\n" + 
2681
				"    }\n" + 
2682
				"}\n",
2683
				"boden/TestInvalid1.java",
2684
				"package boden;\n" + 
2685
				"import boden.IAFAState.ValidationException;\n" + 
2686
				"public class TestInvalid1 {\n" + 
2687
				"	/** \n" + 
2688
				"	 * @see ValidationException#ValidationException(String, IAFAState)\n" + 
2689
				"	 */ \n" + 
2690
				"	IAFAState.ValidationException invalid;\n" + 
2691
				"}\n",
2692
				"boden/TestInvalid2.java",
2693
				"package boden;\n" + 
2694
				"import boden.IAFAState.ValidationException;\n" + 
2695
				"public class TestInvalid2 {\n" + 
2696
				"	/**\n" + 
2697
				"	 * @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + 
2698
				"	 */\n" + 
2699
				"	IAFAState.ValidationException invalid;\n" + 
2700
				"}\n",
2701
				"boden/TestInvalid3.java",
2702
				"package boden;\n" + 
2703
				"import boden.IAFAState.ValidationException;\n" + 
2704
				"public class TestInvalid3 {\n" + 
2705
				"	/**\n" + 
2706
				"	 * @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" + 
2707
				"	 */\n" + 
2708
				"	IAFAState.ValidationException invalid;\n" + 
2709
				"}\n",
2710
				"boden/TestInvalid4.java",
2711
				"package boden;\n" + 
2712
				"import boden.IAFAState.ValidationException;\n" + 
2713
				"public class TestInvalid4 {\n" + 
2714
				"	/**\n" + 
2715
				"	 * @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" + 
2716
				"	 */\n" + 
2717
				"	IAFAState.ValidationException invalid;\n" + 
2718
				"}\n"
2719
			},
2720
//			boden\TestInvalid1.java:7: warning - Tag @see: reference not found: ValidationException#ValidationException(String, IAFAState)
2721
//			boden\TestInvalid2.java:6: warning - Tag @see: can't find ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
2722
//			boden\TestInvalid3.java:6: warning - Tag @see: can't find IAFA.State.ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
2723
//			boden\TestInvalid4.java:6: warning - Tag @see: can't find IAFAState in boden.IAFAState.ValidationException
2724
			"----------\n" + 
2725
			"1. ERROR in boden\\TestInvalid1.java (at line 5)\n" + 
2726
			"	* @see ValidationException#ValidationException(String, IAFAState)\n" + 
2727
			"	                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2728
			"Javadoc: Invalid qualification for member type constructor\n" + 
2729
			"----------\n" +
2730
			"----------\n" + 
2731
			"1. ERROR in boden\\TestInvalid2.java (at line 5)\n" + 
2732
			"	* @see IAFAState.ValidationException#ValidationException(String, IAFAState)\n" + 
2733
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2734
			"Javadoc: Invalid qualification for member type constructor\n" + 
2735
			"----------\n" +
2736
			"----------\n" + 
2737
			"1. ERROR in boden\\TestInvalid3.java (at line 5)\n" + 
2738
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" + 
2739
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
2740
			"Javadoc: Invalid qualification for member type constructor\n" + 
2741
			"----------\n" + 
2742
			"----------\n" + 
2743
			"1. ERROR in boden\\TestInvalid4.java (at line 5)\n" + 
2744
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" + 
2745
			"	                                     ^^^^^^^^^\n" + 
2746
			"Javadoc: IAFAState cannot be resolved or is not a field\n" + 
2747
			"----------\n"
2748
		);
2749
	}
2750
	public void testBug103304c() {
2751
		runNegativeTest(
2752
			new String[] {
2753
				"test/Test.java",
2754
				"package test;\n" + 
2755
				"public interface Test {\n" + 
2756
				"	public class Level0 {\n" + 
2757
				"		public Level0() {}\n" + 
2758
				"	}\n" + 
2759
				"	public interface Member {\n" + 
2760
				"		public class Level1 {\n" + 
2761
				"			public Level1() {}\n" + 
2762
				"		}\n" + 
2763
				"	}\n" + 
2764
				"}\n",
2765
				"test/C.java",
2766
				"package test;\n" + 
2767
				"public class C {\n" + 
2768
				"	/**\n" + 
2769
				"	 * @see Test.Level0#Test.Level0()\n" + 
2770
				"	 */\n" + 
2771
				"	Test.Level0 valid = new Test.Level0();\n" + 
2772
				"	/**\n" + 
2773
				"	 * @see Test.Level0#Level0()\n" + 
2774
				"	 */\n" + 
2775
				"	Test.Level0 invalid = new Test.Level0();\n" + 
2776
				"}\n"
2777
			},
2778
//			test\C.java:10: warning - Tag @see: can't find Level0() in test.Test.Level0
2779
			"----------\n" + 
2780
			"1. ERROR in test\\C.java (at line 8)\n" + 
2781
			"	* @see Test.Level0#Level0()\n" + 
2782
			"	                   ^^^^^^^^\n" + 
2783
			"Javadoc: Invalid qualification for member type constructor\n" + 
2784
			"----------\n"
2785
		);
2786
	}
2787
	public void testBug103304d() {
2788
		runNegativeTest(
2789
			new String[] {
2790
				"test/Test.java",
2791
				"package test;\n" + 
2792
				"public interface Test {\n" + 
2793
				"	public class Level0 {\n" + 
2794
				"		public Level0() {}\n" + 
2795
				"	}\n" + 
2796
				"	public interface Member {\n" + 
2797
				"		public class Level1 {\n" + 
2798
				"			public Level1() {}\n" + 
2799
				"		}\n" + 
2800
				"	}\n" + 
2801
				"}\n",
2802
				"test/C2.java",
2803
				"package test;\n" + 
2804
				"public class C2 {\n" + 
2805
				"	/**\n" + 
2806
				"	 * @see Test.Member.Level1#Test.Member.Level1()\n" + 
2807
				"	 */\n" + 
2808
				"	Test.Member.Level1 valid = new Test.Member.Level1();\n" + 
2809
				"	/**\n" + 
2810
				"	 * @see Test.Member.Level1#Level1()\n" + 
2811
				"	 */\n" + 
2812
				"	Test.Member.Level1 invalid = new Test.Member.Level1();\n" + 
2813
				"	/**\n" + 
2814
				"	 * @see Test.Member.Level1#Test.Level1()\n" + 
2815
				"	 */\n" + 
2816
				"	Test.Member.Level1 wrong = new Test.Member.Level1();\n" + 
2817
				"}\n"
2818
			},
2819
//			test\C2.java:10: warning - Tag @see: can't find Level1() in test.Test.Member.Level1
2820
//			test\C2.java:14: warning - Tag @see: can't find Test.Level1() in test.Test.Member.Level1
2821
			"----------\n" + 
2822
			"1. ERROR in test\\C2.java (at line 8)\n" + 
2823
			"	* @see Test.Member.Level1#Level1()\n" + 
2824
			"	                          ^^^^^^^^\n" + 
2825
			"Javadoc: Invalid qualification for member type constructor\n" + 
2826
			"----------\n" + 
2827
			"2. ERROR in test\\C2.java (at line 12)\n" + 
2828
			"	* @see Test.Member.Level1#Test.Level1()\n" + 
2829
			"	                          ^^^^^^^^^^^^^\n" + 
2830
			"Javadoc: Invalid qualification for member type constructor\n" + 
2831
			"----------\n"
2832
		);
2833
	}
2834
	public void testBug103304e() {
2835
		runConformTest(
2836
			new String[] {
2837
				"implicit/Valid.java",
2838
				"package implicit;\n" + 
2839
				"public interface Valid {\n" + 
2840
				"	public class Level0 {\n" + 
2841
				"		/**\n" + 
2842
				"		 * @see #Valid.Level0() Valid\n" + 
2843
				"		 */\n" + 
2844
				"		public Level0() {}\n" + 
2845
				"		/**\n" + 
2846
				"		 * @see #Valid.Level0(String) Valid\n" + 
2847
				"		 */\n" + 
2848
				"		public Level0(String str) {}\n" + 
2849
				"	}\n" + 
2850
				"	public interface Member {\n" + 
2851
				"		public class Level1 {\n" + 
2852
				"			/**\n" + 
2853
				"			 * @see #Valid.Member.Level1() Valid\n" + 
2854
				"			 */\n" + 
2855
				"			public Level1() {}\n" + 
2856
				"			/**\n" + 
2857
				"			 * @see #Valid.Member.Level1(int) Valid\n" + 
2858
				"			 */\n" + 
2859
				"			public Level1(int x) {}\n" + 
2860
				"		}\n" + 
2861
				"	}\n" + 
2862
				"}\n"
2863
			}
2864
		);
2865
	}
2866
	public void testBug103304f() {
2867
		runNegativeTest(
2868
			new String[] {
2869
				"implicit/Invalid.java",
2870
				"package implicit;\n" + 
2871
				"public interface Invalid {\n" + 
2872
				"	public class Level0 {\n" + 
2873
				"		/**\n" + 
2874
				"		 * @see #Level0() Invalid\n" + 
2875
				"		 */\n" + 
2876
				"		public Level0() {}\n" + 
2877
				"		/**\n" + 
2878
				"		 * @see #Level0(String) Invalid\n" + 
2879
				"		 */\n" + 
2880
				"		public Level0(String str) {}\n" + 
2881
				"	}\n" + 
2882
				"	public interface Member {\n" + 
2883
				"		public class Level1 {\n" + 
2884
				"			/**\n" + 
2885
				"			 * @see #Level1() Invalid\n" + 
2886
				"			 * @see #Member.Level1() Invalid\n" + 
2887
				"			 * @see #Invalid.Level1() Invalid\n" + 
2888
				"			 */\n" + 
2889
				"			public Level1() {}\n" + 
2890
				"			/**\n" + 
2891
				"			 * @see #Level1(int) Invalid\n" + 
2892
				"			 * @see #Invalid.Level1(int) Invalid\n" + 
2893
				"			 * @see #Member.Level1(int) Invalid\n" + 
2894
				"			 */\n" + 
2895
				"			public Level1(int x) {}\n" + 
2896
				"		}\n" + 
2897
				"	}\n" + 
2898
				"}\n"
2899
			},
2900
//			implicit\Invalid.java:7: warning - Tag @see: can't find Level0() in implicit.Invalid.Level0
2901
//			implicit\Invalid.java:11: warning - Tag @see: can't find Level0(String) in implicit.Invalid.Level0
2902
//			implicit\Invalid.java:20: warning - Tag @see: can't find Level1() in implicit.Invalid.Member.Level1
2903
//			implicit\Invalid.java:20: warning - Tag @see: can't find Member.Level1() in implicit.Invalid.Member.Level1
2904
//			implicit\Invalid.java:20: warning - Tag @see: can't find Invalid.Level1() in implicit.Invalid.Member.Level1
2905
//			implicit\Invalid.java:26: warning - Tag @see: can't find Level1(int) in implicit.Invalid.Member.Level1
2906
//			implicit\Invalid.java:26: warning - Tag @see: can't find Invalid.Level1(int) in implicit.Invalid.Member.Level1
2907
//			implicit\Invalid.java:26: warning - Tag @see: can't find Member.Level1(int) in implicit.Invalid.Member.Level1
2908
			"----------\n" + 
2909
			"1. ERROR in implicit\\Invalid.java (at line 5)\n" + 
2910
			"	* @see #Level0() Invalid\n" + 
2911
			"	        ^^^^^^^^\n" + 
2912
			"Javadoc: Invalid qualification for member type constructor\n" + 
2913
			"----------\n" + 
2914
			"2. ERROR in implicit\\Invalid.java (at line 9)\n" + 
2915
			"	* @see #Level0(String) Invalid\n" + 
2916
			"	        ^^^^^^^^^^^^^^\n" + 
2917
			"Javadoc: Invalid qualification for member type constructor\n" + 
2918
			"----------\n" + 
2919
			"3. ERROR in implicit\\Invalid.java (at line 16)\n" + 
2920
			"	* @see #Level1() Invalid\n" + 
2921
			"	        ^^^^^^^^\n" + 
2922
			"Javadoc: Invalid qualification for member type constructor\n" + 
2923
			"----------\n" + 
2924
			"4. ERROR in implicit\\Invalid.java (at line 17)\n" + 
2925
			"	* @see #Member.Level1() Invalid\n" + 
2926
			"	        ^^^^^^^^^^^^^^^\n" + 
2927
			"Javadoc: Invalid qualification for member type constructor\n" + 
2928
			"----------\n" + 
2929
			"5. ERROR in implicit\\Invalid.java (at line 18)\n" + 
2930
			"	* @see #Invalid.Level1() Invalid\n" + 
2931
			"	        ^^^^^^^^^^^^^^^^\n" + 
2932
			"Javadoc: Invalid qualification for member type constructor\n" + 
2933
			"----------\n" + 
2934
			"6. ERROR in implicit\\Invalid.java (at line 22)\n" + 
2935
			"	* @see #Level1(int) Invalid\n" + 
2936
			"	        ^^^^^^^^^^^\n" + 
2937
			"Javadoc: Invalid qualification for member type constructor\n" + 
2938
			"----------\n" + 
2939
			"7. ERROR in implicit\\Invalid.java (at line 23)\n" + 
2940
			"	* @see #Invalid.Level1(int) Invalid\n" + 
2941
			"	        ^^^^^^^^^^^^^^^^^^^\n" + 
2942
			"Javadoc: Invalid qualification for member type constructor\n" + 
2943
			"----------\n" + 
2944
			"8. ERROR in implicit\\Invalid.java (at line 24)\n" + 
2945
			"	* @see #Member.Level1(int) Invalid\n" + 
2946
			"	        ^^^^^^^^^^^^^^^^^^\n" + 
2947
			"Javadoc: Invalid qualification for member type constructor\n" + 
2948
			"----------\n"
2949
		);
2950
	}
2951
2952
	/**
2153
	 * Bug 112346: [javadoc] {@inheritedDoc} should be inactive for non-overridden method
2953
	 * Bug 112346: [javadoc] {@inheritedDoc} should be inactive for non-overridden method
2154
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=112346"
2954
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=112346"
2155
	 */
2955
	 */
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java (-42 / +54 lines)
Lines 365-381 Link Here
365
		this.runConformReferenceTest(
365
		this.runConformReferenceTest(
366
			new String[] {
366
			new String[] {
367
				"test/IX.java",
367
				"test/IX.java",
368
				"package test;\n"
368
				"package test;\n" +
369
					+ "import test.copy.*;\n"
369
				"import test.copy.*;\n" +
370
					+ "	/**\n"
370
				"	/**\n" +
371
					+ "	 * Valid external classes references \n"
371
				"	 * Valid external classes references \n" +
372
					+ "	 *\n"
372
				"	 *\n" +
373
					+ "	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n"
373
				"	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
374
					+ "	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
374
				// Inner classes are not visible in generated documentation
375
					+ "	 */\n"
375
				//"	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
376
					+ "public interface IX {\n"
376
				"	 */\n" +
377
					+ "	public void foo();\n"
377
				"public interface IX {\n" +
378
					+ "}\n" });
378
				"	public void foo();\n" +
379
				"}\n"
380
			}
381
		);
379
	}
382
	}
380
383
381
	public void test023() {
384
	public void test023() {
Lines 410-425 Link Here
410
		this.runConformReferenceTest(
413
		this.runConformReferenceTest(
411
			new String[] {
414
			new String[] {
412
				"test/IX.java",
415
				"test/IX.java",
413
				"package test;\n"
416
				"package test;\n" +
414
					+ "	/**\n"
417
				"	/**\n" +
415
					+ "	 * Valid external classes references \n"
418
				"	 * Valid external classes references \n" +
416
					+ "	 *\n"
419
				"	 *\n" +
417
					+ "	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n"
420
				"	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
418
					+ "	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
421
				// Inner classes are not visible in generated documentation
419
					+ "	 */\n"
422
				//"	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
420
					+ "public interface IX {\n"
423
				"	 */\n" +
421
					+ "	public void foo();\n"
424
				"public interface IX {\n" +
422
					+ "}\n" });
425
				"	public void foo();\n" +
426
				"}\n"
427
			}
428
		);
423
	}
429
	}
424
430
425
	// @see Field references
431
	// @see Field references
Lines 1622-1638 Link Here
1622
		this.runConformReferenceTest(
1628
		this.runConformReferenceTest(
1623
			new String[] {
1629
			new String[] {
1624
				"test/IX.java",
1630
				"test/IX.java",
1625
				"package test;\n"
1631
				"package test;\n" +
1626
					+ "import test.copy.*;\n"
1632
				"import test.copy.*;\n" +
1627
					+ "public interface IX {\n"
1633
				"public interface IX {\n" +
1628
					+ "	/**\n"
1634
				"	/**\n" +
1629
					+ "	 * Valid external classes references \n"
1635
				"	 * Valid external classes references \n" +
1630
					+ "	 *\n"
1636
				"	 *\n" +
1631
					+ "	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n"
1637
				"	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
1632
					+ "	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
1638
				// Inner classes are not visible in generated documentation
1633
					+ "	 */\n"
1639
				//"	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
1634
					+ "	public void foo();\n"
1640
				"	 */\n" +
1635
					+ "}\n" });
1641
				"	public void foo();\n" +
1642
				"}\n"
1643
				}
1644
			);
1636
	}
1645
	}
1637
1646
1638
	public void test098() {
1647
	public void test098() {
Lines 1667-1682 Link Here
1667
		this.runConformReferenceTest(
1676
		this.runConformReferenceTest(
1668
			new String[] {
1677
			new String[] {
1669
				"test/IX.java",
1678
				"test/IX.java",
1670
				"package test;\n"
1679
				"package test;\n" +
1671
					+ "public interface IX {\n"
1680
				"public interface IX {\n" +
1672
					+ "	/**\n"
1681
				"	/**\n" +
1673
					+ "	 * Valid external classes references \n"
1682
				"	 * Valid external classes references \n" +
1674
					+ "	 *\n"
1683
				"	 *\n" +
1675
					+ "	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n"
1684
				"	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
1676
					+ "	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
1685
				// Inner classes are not visible in generated documentation
1677
					+ "	 */\n"
1686
				//"	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
1678
					+ "	public void foo();\n"
1687
				"	 */\n" +
1679
					+ "}\n" });
1688
				"	public void foo();\n" +
1689
				"}\n"
1690
			}
1691
		);
1680
	}
1692
	}
1681
1693
1682
	// @see tag: field references
1694
	// @see tag: field references
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java (-21 / +27 lines)
Lines 407-423 Link Here
407
		this.runConformReferenceTest(
407
		this.runConformReferenceTest(
408
			new String[] {
408
			new String[] {
409
				"test/X.java",
409
				"test/X.java",
410
				"package test;\n"
410
				"package test;\n" +
411
					+ "import test.copy.*;\n"
411
				"import test.copy.*;\n" +
412
					+ "public class X {\n"
412
				"public class X {\n" +
413
					+ "	/**\n"
413
				"	/**\n" +
414
					+ "	 * Valid external classes references \n"
414
				"	 * Valid external classes references \n" +
415
					+ "	 *\n"
415
				"	 *\n" +
416
					+ "	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n"
416
				"	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
417
					+ "	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
417
				// Inner classes are not visible in generated documentation
418
					+ "	 */\n"
418
				//"	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
419
					+ "	public int x;\n"
419
				"	 */\n" +
420
					+ "}\n" });
420
				"	public int x;\n" +
421
				"}\n"
422
			}
423
		);
421
	}
424
	}
422
425
423
	public void test023() {
426
	public void test023() {
Lines 452-467 Link Here
452
		this.runConformReferenceTest(
455
		this.runConformReferenceTest(
453
			new String[] {
456
			new String[] {
454
				"test/X.java",
457
				"test/X.java",
455
				"package test;\n"
458
				"package test;\n" +
456
					+ "public class X {\n"
459
				"public class X {\n" +
457
					+ "	/**\n"
460
				"	/**\n" +
458
					+ "	 * Valid external classes references \n"
461
				"	 * Valid external classes references \n" +
459
					+ "	 *\n"
462
				"	 *\n" +
460
					+ "	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n"
463
				"	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
461
					+ "	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
464
				// Inner classes are not visible in generated documentation
462
					+ "	 */\n"
465
				//"	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
463
					+ "	public int x;\n"
466
				"	 */\n" +
464
					+ "}\n" });
467
				"	public int x;\n" +
468
				"}\n"
469
				}
470
			);
465
	}
471
	}
466
472
467
	// @see Field references
473
	// @see Field references
(-)src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java (-23 / +29 lines)
Lines 330-347 Link Here
330
		this.runConformReferenceTest(
330
		this.runConformReferenceTest(
331
			new String[] {
331
			new String[] {
332
				"test/X.java",
332
				"test/X.java",
333
				"package test;\n"
333
				"package test;\n" +
334
					+ "import test.copy.*;\n"
334
				"import test.copy.*;\n" +
335
					+ "public class X {\n"
335
				"public class X {\n" +
336
					+ "	/**\n"
336
				"	/**\n" +
337
					+ "	 * Valid external classes references \n"
337
				"	 * Valid external classes references \n" +
338
					+ "	 *\n"
338
				"	 *\n" +
339
					+ "	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n"
339
				"	 * @see VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
340
					+ "	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
340
				// Inner classes are not visible in generated documentation
341
					+ "	 */\n"
341
				//"	 * @see VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
342
					+ "	public X() {\n"
342
				"	 */\n" +
343
					+ "	}\n"
343
				"	public X() {\n" +
344
					+ "}\n" });
344
				"	}\n" +
345
				"}\n"
346
			}
347
		);
345
	}
348
	}
346
349
347
	public void test023() {
350
	public void test023() {
Lines 377-393 Link Here
377
		this.runConformReferenceTest(
380
		this.runConformReferenceTest(
378
			new String[] {
381
			new String[] {
379
				"test/X.java",
382
				"test/X.java",
380
				"package test;\n"
383
				"package test;\n" +
381
					+ "public class X {\n"
384
				"public class X {\n" +
382
					+ "	/**\n"
385
				"	/**\n" +
383
					+ "	 * Valid external classes references \n"
386
				"	 * Valid external classes references \n" +
384
					+ "	 *\n"
387
				"	 *\n" +
385
					+ "	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n"
388
				"	 * @see test.copy.VisibilityPublic Valid ref: visible class through import => no warning on import\n" +
386
					+ "	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n"
389
				// Inner classes are not visible in generated documentation
387
					+ "	 */\n"
390
				//"	 * @see test.copy.VisibilityPublic.VpPublic Valid ref: visible inner class in visible class \n" +
388
					+ "	public X() {\n"
391
				"	 */\n" +
389
					+ "	}\n"
392
				"	public X() {\n" +
390
					+ "}\n" });
393
				"	}\n" +
394
				"}\n"
395
			}
396
		);
391
	}
397
	}
392
398
393
	// @see Field references
399
	// @see Field references
(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterJavadocTest.java (-4 / +67 lines)
Lines 114-120 Link Here
114
		// Run test cases subset
114
		// Run test cases subset
115
		COPY_DIR = false;
115
		COPY_DIR = false;
116
		System.err.println("WARNING: only subset of tests will be executed!!!");
116
		System.err.println("WARNING: only subset of tests will be executed!!!");
117
		suite.addTest(new ASTConverterJavadocTest("testBug130752"));
117
		suite.addTest(new ASTConverterJavadocTest("testBug103304"));
118
		return suite;
118
		return suite;
119
	}
119
	}
120
120
Lines 989-998 Link Here
989
					}
989
					}
990
					// Verify member name position
990
					// Verify member name position
991
					Name name = methodRef.getName();
991
					Name name = methodRef.getName();
992
					text = new String(source, start, name.getLength());
992
					int nameLength = name.getLength();
993
					assumeEquals(prefix+"Misplaced method ref name at <"+start+">: ", text, name.toString());
993
					text = new String(source, start, nameLength);
994
					if (!text.equals(name.toString())) { // may have qualified constructor reference for inner classes
995
						if (methodRef.getQualifier().isQualifiedName()) {
996
							text = new String(source, start, methodRef.getQualifier().getLength());
997
							assumeEquals(prefix+"Misplaced method ref name at <"+start+">: ", text, methodRef.getQualifier().toString());
998
							while (source[start] != '.' || Character.isWhitespace(source[start])) {
999
								start++; // purge non-stored characters
1000
							}
1001
							start++;
1002
						} else {
1003
							while (source[start] != '.' || Character.isWhitespace(source[start])) {
1004
								start++; // purge non-stored characters
1005
							}
1006
							start++;
1007
							text = new String(source, start, nameLength);
1008
							assumeEquals(prefix+"Misplaced method ref name at <"+start+">: ", text, name.toString());
1009
						}
1010
					}
994
					verifyNamePositions(start, name, source);
1011
					verifyNamePositions(start, name, source);
995
					start += name.getLength();
1012
					start += nameLength;
996
					// Verify arguments starting open parenthesis
1013
					// Verify arguments starting open parenthesis
997
					while (source[start] == '*' || Character.isWhitespace(source[start])) {
1014
					while (source[start] == '*' || Character.isWhitespace(source[start])) {
998
						start++; // purge non-stored characters
1015
						start++; // purge non-stored characters
Lines 2989-2994 Link Here
2989
	}
3006
	}
2990
3007
2991
	/**
3008
	/**
3009
	 * @bug 103304: [Javadoc] Wrong reference proposal for inner classes.
3010
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=103304"
3011
	 */
3012
	public void testBug103304() throws JavaModelException {
3013
		this.packageBinding = false; // do NOT verify that qualification only can be package name
3014
		workingCopies = new ICompilationUnit[1];
3015
		workingCopies[0] = getWorkingCopy("/Converter15/src/javadoc/b103304/Test.java",
3016
			"package javadoc.b103304;\n" + 
3017
			"interface IAFAState {\n" + 
3018
			"    public class ValidationException extends Exception {\n" + 
3019
			"        public ValidationException(String variableName, IAFAState subformula) {\n" + 
3020
			"            super(\"Variable \'\"+variableName+\"\' may be unbound in \'\"+subformula+\"\'\");\n" + 
3021
			"        }\n" + 
3022
			"    }\n" + 
3023
			"}\n" +
3024
			"public class Test {\n" + 
3025
			"	/**\n" + 
3026
			"	 * @see IAFAState.ValidationException#IAFAState.ValidationException(String, IAFAState)\n" + 
3027
			"	 */\n" + 
3028
			"	IAFAState.ValidationException valid;\n" + 
3029
			"}\n"
3030
		);
3031
		CompilationUnit compilUnit = (CompilationUnit) runConversion(workingCopies[0], true);
3032
		verifyWorkingCopiesComments();
3033
		if (docCommentSupport.equals(JavaCore.ENABLED)) {
3034
			// Verify comment type
3035
			Iterator unitComments = compilUnit.getCommentList().iterator();
3036
			while (unitComments.hasNext()) {
3037
				Comment comment = (Comment) unitComments.next();
3038
				assertEquals("Comment should be javadoc", comment.getNodeType(), ASTNode.JAVADOC);
3039
				Javadoc javadoc = (Javadoc) comment;
3040
3041
				// Verify that there's always a method reference in tags
3042
				List tags = javadoc.tags();
3043
				int size = tags.size();
3044
				for (int i=0; i<size; i++) {
3045
					TagElement tag = (TagElement) javadoc.tags().get(i);				
3046
					assertEquals("Invalid number of fragment for see reference: "+tag, 1, tag.fragments().size());
3047
					ASTNode node = (ASTNode) tag.fragments().get(0);
3048
					assertEquals("Invalid kind of name reference for tag element: "+tag, ASTNode.METHOD_REF, node.getNodeType());
3049
				}
3050
			}
3051
		}
3052
	}
3053
3054
	/**
2992
	 * Bug 106581: [javadoc] null type binding for parameter in javadoc
3055
	 * Bug 106581: [javadoc] null type binding for parameter in javadoc
2993
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=106581"
3056
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=106581"
2994
	 */
3057
	 */
(-)compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java (-17 / +92 lines)
Lines 34-40 Link Here
34
		this.sourceStart = sourceStart;
34
		this.sourceStart = sourceStart;
35
		this.sourceEnd = sourceEnd;
35
		this.sourceEnd = sourceEnd;
36
	}
36
	}
37
	
37
	/**
38
	 * Returns whether a type can be seen at a given visibility level or not.
39
	 *
40
	 * @param visibility Level of visiblity allowed to see references
41
	 * @param binding Type to be seen
42
	 * @return true if the type can be seen, false otherwise
43
	 */
44
	boolean canBeSeen(int visibility, ReferenceBinding binding) {
45
		int modifiers = binding.modifiers;
46
		if (!binding.isValidBinding()) {
47
			ProblemReferenceBinding problemBinding = (ProblemReferenceBinding) binding;
48
			if (problemBinding.closestMatch != null) {
49
				modifiers = problemBinding.closestMatch.modifiers;
50
			}
51
		}
52
		if (modifiers < 0) return true;
53
		switch (modifiers & ExtraCompilerModifiers.AccVisibilityMASK) {
54
			case ClassFileConstants.AccPublic :
55
				return true;
56
			case ClassFileConstants.AccProtected:
57
				return (visibility != ClassFileConstants.AccPublic);
58
			case ClassFileConstants.AccDefault:
59
				return (visibility == ClassFileConstants.AccDefault || visibility == ClassFileConstants.AccPrivate);
60
			case ClassFileConstants.AccPrivate:
61
				return (visibility == ClassFileConstants.AccPrivate);
62
		}
63
		return true;
64
	}
65
38
	/*
66
	/*
39
	 * @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
67
	 * @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
40
	 */
68
	 */
Lines 233-249 Link Here
233
		}
261
		}
234
262
235
		// Verify field references
263
		// Verify field references
236
		boolean verifyValues = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
264
		boolean source15 = scope.compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5;
265
		int scopeModifiers = -1;
237
		if (reference instanceof JavadocFieldReference) {
266
		if (reference instanceof JavadocFieldReference) {
238
			JavadocFieldReference fieldRef = (JavadocFieldReference) reference;
267
			JavadocFieldReference fieldRef = (JavadocFieldReference) reference;
239
			int modifiers = fieldRef.binding==null ? -1 : fieldRef.binding.modifiers;
240
			
268
			
241
			// Verify if this is a method reference
269
			// Verify if this is a method reference
242
			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51911
270
			// see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=51911
243
			if (fieldRef.methodBinding != null) {
271
			if (fieldRef.methodBinding != null) {
244
				// cannot refer to method for @value tag
272
				// cannot refer to method for @value tag
245
				if (fieldRef.tagValue == JavadocTagConstants.TAG_VALUE_VALUE) {
273
				if (fieldRef.tagValue == JavadocTagConstants.TAG_VALUE_VALUE) {
246
					scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd, modifiers);
274
					if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
275
					scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd, scopeModifiers);
247
				}
276
				}
248
				else if (fieldRef.receiverType != null) {
277
				else if (fieldRef.receiverType != null) {
249
					fieldRef.superAccess = scope.enclosingSourceType().isCompatibleWith(fieldRef.receiverType);
278
					fieldRef.superAccess = scope.enclosingSourceType().isCompatibleWith(fieldRef.receiverType);
Lines 252-286 Link Here
252
			}
281
			}
253
282
254
			// Verify whether field ref should be static or not (for @value tags)
283
			// Verify whether field ref should be static or not (for @value tags)
255
			else if (verifyValues && fieldRef.binding != null && fieldRef.binding.isValidBinding()) {
284
			else if (source15 && fieldRef.binding != null && fieldRef.binding.isValidBinding()) {
256
				if (fieldRef.tagValue == JavadocTagConstants.TAG_VALUE_VALUE && !fieldRef.binding.isStatic()) {
285
				if (fieldRef.tagValue == JavadocTagConstants.TAG_VALUE_VALUE && !fieldRef.binding.isStatic()) {
257
					scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd, modifiers);
286
					if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
287
					scope.problemReporter().javadocInvalidValueReference(fieldRef.sourceStart, fieldRef.sourceEnd, scopeModifiers);
258
				}
288
				}
259
			}
289
			}
260
			
290
261
			// That's it for field references
291
			// That's it for field references
262
			return;
292
			return;
263
		}
293
		}
264
294
265
		// If not 1.5 level, verification is finished
295
		// Verify type references
266
		if (!verifyValues)  return;
296
		if ((reference instanceof JavadocSingleTypeReference || reference instanceof JavadocQualifiedTypeReference) && reference.resolvedType instanceof ReferenceBinding) {
297
			ReferenceBinding resolvedType = (ReferenceBinding) reference.resolvedType;
298
			if (reference.resolvedType.isValidBinding()) {
299
300
				// member types
301
				if (resolvedType.isMemberType()) {
302
					ReferenceBinding topLevelType = resolvedType;
303
					int depth = 0;
304
					while (topLevelType.enclosingType() != null) {
305
						topLevelType = topLevelType.enclosingType();
306
						depth++;
307
					}
308
					ClassScope topLevelScope = scope.classScope();
309
					// when scope is not on compilation unit type, then inner class may not be visible...
310
					if (topLevelScope.parent.kind != Scope.COMPILATION_UNIT_SCOPE ||
311
						!CharOperation.equals(topLevelType.sourceName, topLevelScope.referenceContext.name)) {
312
						topLevelScope = topLevelScope.outerMostClassScope();
313
						if (reference instanceof JavadocSingleTypeReference) {
314
							// inner class single reference can only be done in same unit
315
							if ((!source15 && depth == 1) || topLevelType != topLevelScope.referenceContext.binding) {
316
								if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
317
								scope.problemReporter().javadocNotVisibleReference(reference.sourceStart, reference.sourceEnd, scopeModifiers);
318
							}
319
						} else {
320
							// inner class qualified reference can only be done in same package
321
							if (topLevelType.getPackage() != topLevelScope.referenceContext.binding.getPackage()) {
322
								if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
323
								scope.problemReporter().javadocNotVisibleReference(reference.sourceStart, reference.sourceEnd, scopeModifiers);
324
							}
325
						}
326
					}
327
				}
328
329
				// reference must have enough visibility to be used
330
				if (!canBeSeen(scope.problemReporter().options.reportInvalidJavadocTagsVisibility, resolvedType)) {
331
					if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
332
					scope.problemReporter().javadocNotVisibleReference(reference.sourceStart, reference.sourceEnd, scopeModifiers);
333
				}
334
			}
335
		}
267
336
268
		// Verify that message reference are not used for @value tags
337
		// Verify that message reference are not used for @value tags
269
		else if (reference instanceof JavadocMessageSend) {
338
		if (reference instanceof JavadocMessageSend) {
270
			JavadocMessageSend msgSend = (JavadocMessageSend) reference;
339
			JavadocMessageSend msgSend = (JavadocMessageSend) reference;
271
			int modifiers = msgSend.binding==null ? -1 : msgSend.binding.modifiers;
340
272
			if (msgSend.tagValue == JavadocTagConstants.TAG_VALUE_VALUE) { // cannot refer to method for @value tag
341
			// tag value
273
				scope.problemReporter().javadocInvalidValueReference(msgSend.sourceStart, msgSend.sourceEnd, modifiers);
342
			if (source15 && msgSend.tagValue == JavadocTagConstants.TAG_VALUE_VALUE) { // cannot refer to method for @value tag
343
				if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
344
				scope.problemReporter().javadocInvalidValueReference(msgSend.sourceStart, msgSend.sourceEnd, scopeModifiers);
274
			}
345
			}
346
275
		}
347
		}
276
348
277
		// Verify that constructorreference are not used for @value tags
349
		// Verify that constructor reference are not used for @value tags
278
		else if (reference instanceof JavadocAllocationExpression) {
350
		else if (reference instanceof JavadocAllocationExpression) {
279
			JavadocAllocationExpression alloc = (JavadocAllocationExpression) reference;
351
			JavadocAllocationExpression alloc = (JavadocAllocationExpression) reference;
280
			int modifiers = alloc.binding==null ? -1 : alloc.binding.modifiers;
352
281
			if (alloc.tagValue == JavadocTagConstants.TAG_VALUE_VALUE) { // cannot refer to method for @value tag
353
			// tag value
282
				scope.problemReporter().javadocInvalidValueReference(alloc.sourceStart, alloc.sourceEnd, modifiers);
354
			if (source15 && alloc.tagValue == JavadocTagConstants.TAG_VALUE_VALUE) { // cannot refer to method for @value tag
355
				if (scopeModifiers == -1) scopeModifiers = scope.getDeclarationModifiers();
356
				scope.problemReporter().javadocInvalidValueReference(alloc.sourceStart, alloc.sourceEnd, scopeModifiers);
283
			}
357
			}
358
284
		}
359
		}
285
		
360
		
286
		// Verify that there's no type variable reference
361
		// Verify that there's no type variable reference
(-)compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java (-3 / +19 lines)
Lines 10-24 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.jdt.internal.compiler.ast;
11
package org.eclipse.jdt.internal.compiler.ast;
12
12
13
import org.eclipse.jdt.core.compiler.CharOperation;
13
import org.eclipse.jdt.internal.compiler.impl.Constant;
14
import org.eclipse.jdt.internal.compiler.impl.Constant;
14
import org.eclipse.jdt.internal.compiler.lookup.*;
15
import org.eclipse.jdt.internal.compiler.lookup.*;
15
16
16
public class JavadocAllocationExpression extends AllocationExpression {
17
public class JavadocAllocationExpression extends AllocationExpression {
17
18
18
	public int tagSourceStart, tagSourceEnd;
19
	public int tagSourceStart, tagSourceEnd;
19
	public int tagValue;
20
	public int tagValue, memberStart;
20
	public boolean superAccess = false;
21
	public boolean superAccess = false;
21
	
22
	public char[][] qualification;
23
22
	public JavadocAllocationExpression(int start, int end) {
24
	public JavadocAllocationExpression(int start, int end) {
23
		this.sourceStart = start;
25
		this.sourceStart = start;
24
		this.sourceEnd = end;
26
		this.sourceEnd = end;
Lines 28-34 Link Here
28
		this((int) (pos >>> 32), (int) pos);
30
		this((int) (pos >>> 32), (int) pos);
29
	}
31
	}
30
32
31
	private TypeBinding internalResolveType(Scope scope) {
33
	TypeBinding internalResolveType(Scope scope) {
32
	
34
	
33
		// Propagate the type checking to the arguments, and check if the constructor is defined.
35
		// Propagate the type checking to the arguments, and check if the constructor is defined.
34
		this.constant = Constant.NotAConstant;
36
		this.constant = Constant.NotAConstant;
Lines 120-125 Link Here
120
					}
122
					}
121
				}
123
				}
122
			}
124
			}
125
		} else if (this.resolvedType.isMemberType()) { // inner class constructor reference must be qualified
126
			int length = qualification.length;
127
			ReferenceBinding enclosingTypeBinding = allocationType;
128
			if (type instanceof JavadocQualifiedTypeReference && (((JavadocQualifiedTypeReference)type).tokens.length != length)) {
129
				scope.problemReporter().javadocInvalidConstructorQualification(this.memberStart+1, this.sourceEnd); //, scope.getDeclarationModifiers());
130
			} else {
131
				int idx = length;
132
				while (idx > 0 && CharOperation.equals(qualification[--idx], enclosingTypeBinding.sourceName) && (enclosingTypeBinding = enclosingTypeBinding.enclosingType()) != null) {
133
					// verify that each qualification token matches enclosing types
134
				}
135
				if (idx > 0 || enclosingTypeBinding != null) {
136
					scope.problemReporter().javadocInvalidConstructorQualification(this.memberStart+1, this.sourceEnd); //, scope.getDeclarationModifiers());
137
				}
138
			}
123
		}
139
		}
124
		if (isMethodUseDeprecated(this.binding, scope, true)) {
140
		if (isMethodUseDeprecated(this.binding, scope, true)) {
125
			scope.problemReporter().javadocDeprecatedMethod(this.binding, this, scope.getDeclarationModifiers());
141
			scope.problemReporter().javadocDeprecatedMethod(this.binding, this, scope.getDeclarationModifiers());
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+10 lines)
Lines 753-758 Link Here
753
	/*
753
	/*
754
	 * Javadoc comments
754
	 * Javadoc comments
755
	 */
755
	 */
756
	/** 
757
	 * Problem signaled on a reference to an java element which has a too low visibility level.
758
	 * @since 3.3
759
	 */
760
	int JavadocNotVisibleReference = Javadoc + Internal + 465;
761
	/** 
762
	 * Problem signaled on an unqualified inner class constructor reference.
763
	 * @since 3.3
764
	 */
765
	int JavadocInvalidConstructorQualification = Javadoc + Internal + 466;
756
	/** @since 3.2 */
766
	/** @since 3.2 */
757
	int JavadocMissingIdentifier = Javadoc + Internal + 467;
767
	int JavadocMissingIdentifier = Javadoc + Internal + 467;
758
	/** @since 3.2 */
768
	/** @since 3.2 */
(-)codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java (-4 / +6 lines)
Lines 101-108 Link Here
101
	 * Otherwise return null as we do not need this reference.
101
	 * Otherwise return null as we do not need this reference.
102
	 */
102
	 */
103
	protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
103
	protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
104
		int start = (int) (this.identifierPositionStack[0] >>> 32);
104
		int memberPtr = this.identifierLengthStack[0] - 1;	// may be > 0 for inner class constructor reference
105
		int end = (int) this.identifierPositionStack[0];
105
		int start = (int) (this.identifierPositionStack[memberPtr] >>> 32);
106
		int end = (int) this.identifierPositionStack[memberPtr];
106
		if (start <= this.selectionStart && this.selectionEnd <= end) {
107
		if (start <= this.selectionStart && this.selectionEnd <= end) {
107
			selectedNode = (ASTNode) super.createMethodReference(receiver, arguments);
108
			selectedNode = (ASTNode) super.createMethodReference(receiver, arguments);
108
			this.abort = true;
109
			this.abort = true;
Lines 134-142 Link Here
134
					if (start <= this.selectionStart && this.selectionEnd <= end) {
135
					if (start <= this.selectionStart && this.selectionEnd <= end) {
135
						int pos = i + 1;
136
						int pos = i + 1;
136
						char[][] tokens = new char[pos][];
137
						char[][] tokens = new char[pos][];
137
						System.arraycopy(this.identifierStack, this.identifierPtr+1, tokens, 0, pos);
138
						int ptr = this.identifierPtr - size;
139
						System.arraycopy(this.identifierStack, ptr, tokens, 0, pos);
138
						long[] positions = new long[pos];
140
						long[] positions = new long[pos];
139
						System.arraycopy(this.identifierPositionStack, this.identifierPtr + 1, positions, 0, pos);
141
						System.arraycopy(this.identifierPositionStack, ptr, positions, 0, pos);
140
						selectedNode = new JavadocQualifiedTypeReference(tokens, positions, this.tagSourceStart, this.tagSourceEnd);
142
						selectedNode = new JavadocQualifiedTypeReference(tokens, positions, this.tagSourceStart, this.tagSourceEnd);
141
						this.abort = true; // we got selected node => cancel parse
143
						this.abort = true; // we got selected node => cancel parse
142
						if (SelectionEngine.DEBUG) {
144
						if (SelectionEngine.DEBUG) {
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+2 lines)
Lines 362-367 Link Here
362
460 = Empty block should be documented
362
460 = Empty block should be documented
363
363
364
### DOC 
364
### DOC 
365
465 = Not visible reference
366
466 = Invalid qualification for member type constructor
365
467 = Missing identifier
367
467 = Missing identifier
366
468 = Cannot make a static reference to the non-static type variable {0}
368
468 = Cannot make a static reference to the non-static type variable {0}
367
469 = Invalid param tag type parameter name
369
469 = Invalid param tag type parameter name
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (-7 / +22 lines)
Lines 215-220 Link Here
215
			case IProblem.JavadocDuplicateParamName:
215
			case IProblem.JavadocDuplicateParamName:
216
			case IProblem.JavadocMissingParamName:
216
			case IProblem.JavadocMissingParamName:
217
			case IProblem.JavadocMissingIdentifier:
217
			case IProblem.JavadocMissingIdentifier:
218
			case IProblem.JavadocInvalidConstructorQualification:
218
			case IProblem.JavadocInvalidThrowsClassName:
219
			case IProblem.JavadocInvalidThrowsClassName:
219
			case IProblem.JavadocDuplicateThrowsClassName:
220
			case IProblem.JavadocDuplicateThrowsClassName:
220
			case IProblem.JavadocMissingThrowsClassName:
221
			case IProblem.JavadocMissingThrowsClassName:
Lines 255-260 Link Here
255
			case IProblem.JavadocUsingDeprecatedConstructor:
256
			case IProblem.JavadocUsingDeprecatedConstructor:
256
			case IProblem.JavadocUsingDeprecatedMethod:
257
			case IProblem.JavadocUsingDeprecatedMethod:
257
			case IProblem.JavadocUsingDeprecatedType:
258
			case IProblem.JavadocUsingDeprecatedType:
259
			case IProblem.JavadocNotVisibleReference:
258
				return CompilerOptions.InvalidJavadoc;
260
				return CompilerOptions.InvalidJavadoc;
259
	
261
	
260
			case IProblem.JavadocMissingParamTag:
262
			case IProblem.JavadocMissingParamTag:
Lines 988-993 Link Here
988
		case IProblem.JavadocDuplicateParamName:
990
		case IProblem.JavadocDuplicateParamName:
989
		case IProblem.JavadocMissingParamName:
991
		case IProblem.JavadocMissingParamName:
990
		case IProblem.JavadocMissingIdentifier:
992
		case IProblem.JavadocMissingIdentifier:
993
		case IProblem.JavadocInvalidConstructorQualification:
991
		case IProblem.JavadocInvalidThrowsClassName:
994
		case IProblem.JavadocInvalidThrowsClassName:
992
		case IProblem.JavadocDuplicateThrowsClassName:
995
		case IProblem.JavadocDuplicateThrowsClassName:
993
		case IProblem.JavadocMissingThrowsClassName:
996
		case IProblem.JavadocMissingThrowsClassName:
Lines 1042-1047 Link Here
1042
		case IProblem.JavadocNotVisibleConstructor:
1045
		case IProblem.JavadocNotVisibleConstructor:
1043
		case IProblem.JavadocNotVisibleMethod:
1046
		case IProblem.JavadocNotVisibleMethod:
1044
		case IProblem.JavadocNotVisibleType:
1047
		case IProblem.JavadocNotVisibleType:
1048
		case IProblem.JavadocNotVisibleReference:
1045
			if (!(this.options.reportInvalidJavadocTags && this.options.reportInvalidJavadocTagsNotVisibleRef)) {
1049
			if (!(this.options.reportInvalidJavadocTags && this.options.reportInvalidJavadocTagsNotVisibleRef)) {
1046
				return ProblemSeverities.Ignore;			
1050
				return ProblemSeverities.Ignore;			
1047
			}
1051
			}
Lines 3578-3590 Link Here
3578
	int severity = computeSeverity(IProblem.JavadocUsingDeprecatedType);
3582
	int severity = computeSeverity(IProblem.JavadocUsingDeprecatedType);
3579
	if (severity == ProblemSeverities.Ignore) return;
3583
	if (severity == ProblemSeverities.Ignore) return;
3580
	if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
3584
	if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers)) {
3581
		this.handle(
3585
		if (type.isMemberType() && type instanceof ReferenceBinding && !javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, ((ReferenceBinding)type).modifiers)) {
3582
			IProblem.JavadocUsingDeprecatedType,
3586
			this.handle(IProblem.JavadocNotVisibleReference, NoArgument, NoArgument, location.sourceStart, location.sourceEnd);
3583
			new String[] {new String(type.readableName())},
3587
		} else {
3584
			new String[] {new String(type.shortReadableName())},
3588
			this.handle(
3585
			severity,
3589
				IProblem.JavadocUsingDeprecatedType,
3586
			location.sourceStart,
3590
				new String[] {new String(type.readableName())},
3587
			location.sourceEnd);
3591
				new String[] {new String(type.shortReadableName())},
3592
				severity,
3593
				location.sourceStart,
3594
				location.sourceEnd);
3595
		}
3588
	}
3596
	}
3589
}
3597
}
3590
public void javadocDuplicatedParamTag(char[] token, int sourceStart, int sourceEnd, int modifiers) {
3598
public void javadocDuplicatedParamTag(char[] token, int sourceStart, int sourceEnd, int modifiers) {
Lines 3807-3812 Link Here
3807
		statement.sourceStart,
3815
		statement.sourceStart,
3808
		statement.sourceEnd);
3816
		statement.sourceEnd);
3809
}
3817
}
3818
public void javadocInvalidConstructorQualification(int sourceStart, int sourceEnd){
3819
	this.handle(IProblem.JavadocInvalidConstructorQualification, NoArgument, NoArgument, sourceStart, sourceEnd);
3820
}
3810
/*
3821
/*
3811
 * Similar implementation than invalidField(FieldReference...)
3822
 * Similar implementation than invalidField(FieldReference...)
3812
 * Note that following problem id cannot occur for Javadoc:
3823
 * Note that following problem id cannot occur for Javadoc:
Lines 4208-4213 Link Here
4208
			typeRef.sourceEnd);
4219
			typeRef.sourceEnd);
4209
	}
4220
	}
4210
}
4221
}
4222
public void javadocNotVisibleReference(int sourceStart, int sourceEnd, int modifiers) {
4223
	if (javadocVisibility(this.options.reportInvalidJavadocTagsVisibility, modifiers))
4224
		this.handle(IProblem.JavadocNotVisibleReference, NoArgument, NoArgument, sourceStart, sourceEnd);
4225
}
4211
public void javadocUndeclaredParamTagName(char[] token, int sourceStart, int sourceEnd, int modifiers) {
4226
public void javadocUndeclaredParamTagName(char[] token, int sourceStart, int sourceEnd, int modifiers) {
4212
	int severity = computeSeverity(IProblem.JavadocInvalidParamName);
4227
	int severity = computeSeverity(IProblem.JavadocInvalidParamName);
4213
	if (severity == ProblemSeverities.Ignore) return;
4228
	if (severity == ProblemSeverities.Ignore) return;
(-)compiler/org/eclipse/jdt/internal/compiler/parser/JavadocParser.java (-21 / +47 lines)
Lines 180-215 Link Here
180
			TypeReference typeRef = (TypeReference) receiver;
180
			TypeReference typeRef = (TypeReference) receiver;
181
			// Decide whether we have a constructor or not
181
			// Decide whether we have a constructor or not
182
			boolean isConstructor = false;
182
			boolean isConstructor = false;
183
			int length = this.identifierLengthStack[0];	// may be > 0 for inner class constructor reference
183
			if (typeRef == null) {
184
			if (typeRef == null) {
184
				char[] name = this.sourceParser.compilationUnit.getMainTypeName();
185
				char[] name = this.sourceParser.compilationUnit.getMainTypeName();
185
				TypeDeclaration typeDecl = getParsedTypeDeclaration();
186
				TypeDeclaration typeDecl = getParsedTypeDeclaration();
186
				if (typeDecl != null) {
187
				if (typeDecl != null) {
187
					name = typeDecl.name;
188
					name = typeDecl.name;
188
				}
189
				}
189
				isConstructor = CharOperation.equals(this.identifierStack[0], name);
190
				isConstructor = CharOperation.equals(this.identifierStack[length-1], name);
190
				typeRef = new JavadocImplicitTypeReference(name, this.memberStart);
191
				typeRef = new JavadocImplicitTypeReference(name, this.memberStart);
191
			} else {
192
			} else {
192
				char[] name = null;
193
				if (typeRef instanceof JavadocSingleTypeReference) {
193
				if (typeRef instanceof JavadocSingleTypeReference) {
194
					name = ((JavadocSingleTypeReference)typeRef).token;
194
					char[] name = ((JavadocSingleTypeReference)typeRef).token;
195
					isConstructor = CharOperation.equals(this.identifierStack[length-1], name);
195
				} else if (typeRef instanceof JavadocQualifiedTypeReference) {
196
				} else if (typeRef instanceof JavadocQualifiedTypeReference) {
196
					char[][] tokens = ((JavadocQualifiedTypeReference)typeRef).tokens;
197
					char[][] tokens = ((JavadocQualifiedTypeReference)typeRef).tokens;
197
					name = tokens[tokens.length-1];
198
					int last = tokens.length-1;
199
					isConstructor = CharOperation.equals(this.identifierStack[length-1], tokens[last]);
200
					if (isConstructor) {
201
						boolean valid = true;
202
						if (valid) {
203
							for (int i=0; i<length-1 && valid; i++) {
204
								valid = CharOperation.equals(this.identifierStack[i], tokens[i]);
205
							}
206
						}
207
						if (!valid) {
208
							if (this.reportProblems) {
209
								this.sourceParser.problemReporter().javadocInvalidConstructorQualification(this.memberStart+1, this.scanner.getCurrentTokenEndPosition());
210
							}
211
							return null;
212
						}
213
					}
198
				} else {
214
				} else {
199
					throw new InvalidInputException();
215
					throw new InvalidInputException();
200
				}
216
				}
201
				isConstructor = CharOperation.equals(this.identifierStack[0], name);
202
			}
217
			}
203
			// Create node
218
			// Create node
204
			if (arguments == null) {
219
			if (arguments == null) {
205
				if (isConstructor) {
220
				if (isConstructor) {
206
					JavadocAllocationExpression alloc = new JavadocAllocationExpression(this.identifierPositionStack[0]);
221
					JavadocAllocationExpression allocation = new JavadocAllocationExpression(this.identifierPositionStack[length-1]);
207
					alloc.type = typeRef;
222
					allocation.type = typeRef;
208
					alloc.tagValue = this.tagValue;
223
					allocation.tagValue = this.tagValue;
209
					alloc.sourceEnd = this.scanner.getCurrentTokenEndPosition();
224
					allocation.sourceEnd = this.scanner.getCurrentTokenEndPosition();
210
					return alloc;
225
					if (length == 1) {
226
						allocation.qualification = new char[][] { this.identifierStack[0] };
227
					} else {
228
						System.arraycopy(this.identifierStack, 0, allocation.qualification = new char[length][], 0, length);
229
					}
230
					allocation.memberStart = this.memberStart;
231
					return allocation;
211
				} else {
232
				} else {
212
					JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[0], this.identifierPositionStack[0]);
233
					JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[length-1], this.identifierPositionStack[length-1]);
213
					msg.receiver = typeRef;
234
					msg.receiver = typeRef;
214
					msg.tagValue = this.tagValue;
235
					msg.tagValue = this.tagValue;
215
					msg.sourceEnd = this.scanner.getCurrentTokenEndPosition();
236
					msg.sourceEnd = this.scanner.getCurrentTokenEndPosition();
Lines 219-232 Link Here
219
				JavadocArgumentExpression[] expressions = new JavadocArgumentExpression[arguments.size()];
240
				JavadocArgumentExpression[] expressions = new JavadocArgumentExpression[arguments.size()];
220
				arguments.toArray(expressions);
241
				arguments.toArray(expressions);
221
				if (isConstructor) {
242
				if (isConstructor) {
222
					JavadocAllocationExpression alloc = new JavadocAllocationExpression(this.identifierPositionStack[0]);
243
					JavadocAllocationExpression allocation = new JavadocAllocationExpression(this.identifierPositionStack[length-1]);
223
					alloc.arguments = expressions;
244
					allocation.arguments = expressions;
224
					alloc.type = typeRef;
245
					allocation.type = typeRef;
225
					alloc.tagValue = this.tagValue;
246
					allocation.tagValue = this.tagValue;
226
					alloc.sourceEnd = this.scanner.getCurrentTokenEndPosition();
247
					allocation.sourceEnd = this.scanner.getCurrentTokenEndPosition();
227
					return alloc;
248
					if (length == 1) {
249
						allocation.qualification = new char[][] { this.identifierStack[0] };
250
					} else {
251
						System.arraycopy(this.identifierStack, 0, allocation.qualification = new char[length][], 0, length);
252
					}
253
					allocation.memberStart = this.memberStart;
254
					return allocation;
228
				} else {
255
				} else {
229
					JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[0], this.identifierPositionStack[0], expressions);
256
					JavadocMessageSend msg = new JavadocMessageSend(this.identifierStack[length-1], this.identifierPositionStack[length-1], expressions);
230
					msg.receiver = typeRef;
257
					msg.receiver = typeRef;
231
					msg.tagValue = this.tagValue;
258
					msg.tagValue = this.tagValue;
232
					msg.sourceEnd = this.scanner.getCurrentTokenEndPosition();
259
					msg.sourceEnd = this.scanner.getCurrentTokenEndPosition();
Lines 258-264 Link Here
258
	 */
285
	 */
259
	protected Object createTypeReference(int primitiveToken) {
286
	protected Object createTypeReference(int primitiveToken) {
260
		TypeReference typeRef = null;
287
		TypeReference typeRef = null;
261
		int size = this.identifierLengthStack[this.identifierLengthPtr--];
288
		int size = this.identifierLengthStack[this.identifierLengthPtr];
262
		if (size == 1) { // Single Type ref
289
		if (size == 1) { // Single Type ref
263
			typeRef = new JavadocSingleTypeReference(
290
			typeRef = new JavadocSingleTypeReference(
264
						this.identifierStack[this.identifierPtr],
291
						this.identifierStack[this.identifierPtr],
Lines 272-278 Link Here
272
			System.arraycopy(this.identifierPositionStack, this.identifierPtr - size + 1, positions, 0, size);
299
			System.arraycopy(this.identifierPositionStack, this.identifierPtr - size + 1, positions, 0, size);
273
			typeRef = new JavadocQualifiedTypeReference(tokens, positions, this.tagSourceStart, this.tagSourceEnd);
300
			typeRef = new JavadocQualifiedTypeReference(tokens, positions, this.tagSourceStart, this.tagSourceEnd);
274
		}
301
		}
275
		this.identifierPtr -= size;
276
		return typeRef;
302
		return typeRef;
277
	}
303
	}
278
304
Lines 691-697 Link Here
691
	 * Fill associated comment fields with ast nodes information stored in stack.
717
	 * Fill associated comment fields with ast nodes information stored in stack.
692
	 */
718
	 */
693
	protected void updateDocComment() {
719
	protected void updateDocComment() {
694
		
720
695
		// Set inherited positions
721
		// Set inherited positions
696
		this.docComment.inheritedPositions = this.inheritedPositions;
722
		this.docComment.inheritedPositions = this.inheritedPositions;
697
723
(-)compiler/org/eclipse/jdt/internal/compiler/parser/AbstractCommentParser.java (-2 / +6 lines)
Lines 641-648 Link Here
641
	
641
	
642
		// Get member identifier
642
		// Get member identifier
643
		if (readToken() == TerminalTokens.TokenNameIdentifier) {
643
		if (readToken() == TerminalTokens.TokenNameIdentifier) {
644
			consumeToken();
644
			if (this.scanner.currentCharacter == '.') { // member name may be qualified (inner class constructor reference)
645
			pushIdentifier(true, false);
645
				parseQualifiedName(true);
646
			} else {
647
				consumeToken();
648
				pushIdentifier(true, false);
649
			}
646
			// Look for next token to know whether it's a field or method reference
650
			// Look for next token to know whether it's a field or method reference
647
			int previousPosition = this.index;
651
			int previousPosition = this.index;
648
			if (readToken() == TerminalTokens.TokenNameLPAREN) {
652
			if (readToken() == TerminalTokens.TokenNameLPAREN) {
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocAllocationExpression.java (+1 lines)
Lines 23-28 Link Here
23
		this.tagValue = allocation.tagValue;
23
		this.tagValue = allocation.tagValue;
24
		this.sourceEnd = allocation.sourceEnd;
24
		this.sourceEnd = allocation.sourceEnd;
25
		this.separatorPosition = position;
25
		this.separatorPosition = position;
26
		this.qualification = allocation.qualification;
26
	}
27
	}
27
28
28
	public CompletionOnJavadocAllocationExpression(JavadocAllocationExpression allocation, int position, int flags) {
29
	public CompletionOnJavadocAllocationExpression(JavadocAllocationExpression allocation, int position, int flags) {
(-)codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java (-5 / +4 lines)
Lines 149-156 Link Here
149
	 * Otherwise return null as we do not need this reference.
149
	 * Otherwise return null as we do not need this reference.
150
	 */
150
	 */
151
	protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
151
	protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
152
		int refStart = (int) (this.identifierPositionStack[0] >>> 32);
152
		int memberPtr = this.identifierLengthStack[0] - 1; // may be > 0 for inner class constructor reference
153
		int refEnd = (int) this.identifierPositionStack[0];
153
		int refStart = (int) (this.identifierPositionStack[memberPtr] >>> 32);
154
		int refEnd = (int) this.identifierPositionStack[memberPtr];
154
		boolean inCompletion = (refStart <= (this.cursorLocation+1) && this.cursorLocation <= refEnd) // completion cursor is between first and last stacked identifiers
155
		boolean inCompletion = (refStart <= (this.cursorLocation+1) && this.cursorLocation <= refEnd) // completion cursor is between first and last stacked identifiers
155
			|| ((refStart == (refEnd+1) && refEnd == this.cursorLocation)) // or it's a completion on empty token
156
			|| ((refStart == (refEnd+1) && refEnd == this.cursorLocation)) // or it's a completion on empty token
156
			|| (this.memberStart == this.cursorLocation); // or it's a completion just after the member separator with an identifier after the cursor
157
			|| (this.memberStart == this.cursorLocation); // or it's a completion just after the member separator with an identifier after the cursor
Lines 226-232 Link Here
226
				this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, this.identifierStack[this.identifierPtr], positions, this.tagSourceStart, this.tagSourceEnd);
227
				this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, this.identifierStack[this.identifierPtr], positions, this.tagSourceStart, this.tagSourceEnd);
227
			}
228
			}
228
		}
229
		}
229
		this.identifierPtr -= nbIdentifiers;
230
230
231
		if (CompletionEngine.DEBUG) {
231
		if (CompletionEngine.DEBUG) {
232
			System.out.println("	completion partial qualified type="+completionNode); //$NON-NLS-1$
232
			System.out.println("	completion partial qualified type="+completionNode); //$NON-NLS-1$
Lines 792-798 Link Here
792
			// special case of completion just before the dot.
792
			// special case of completion just before the dot.
793
			return createTypeReference(primitiveToken);
793
			return createTypeReference(primitiveToken);
794
		}
794
		}
795
		int idLength = this.identifierLengthStack[this.identifierLengthPtr--];
795
		int idLength = this.identifierLengthStack[this.identifierLengthPtr];
796
		char[][] tokens = new char[idLength][];
796
		char[][] tokens = new char[idLength][];
797
		int startPtr = this.identifierPtr-idLength+1;
797
		int startPtr = this.identifierPtr-idLength+1;
798
		System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength);
798
		System.arraycopy(this.identifierStack, startPtr, tokens, 0, idLength);
Lines 800-806 Link Here
800
		System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength);
800
		System.arraycopy(this.identifierPositionStack, startPtr, positions, 0, idLength);
801
		positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition;
801
		positions[idLength] = (((long)this.tokenPreviousPosition)<<32) + this.tokenPreviousPosition;
802
		this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd);
802
		this.completionNode = new CompletionOnJavadocQualifiedTypeReference(tokens, CharOperation.NO_CHAR, positions, this.tagSourceStart, this.tagSourceEnd);
803
		this.identifierPtr -= idLength;
804
803
805
		if (CompletionEngine.DEBUG) {
804
		if (CompletionEngine.DEBUG) {
806
			System.out.println("	completion partial qualified type="+completionNode); //$NON-NLS-1$
805
			System.out.println("	completion partial qualified type="+completionNode); //$NON-NLS-1$
(-)dom/org/eclipse/jdt/core/dom/DocCommentParser.java (-17 / +14 lines)
Lines 86-92 Link Here
86
		buffer.append(super.toString());
86
		buffer.append(super.toString());
87
		return buffer.toString();
87
		return buffer.toString();
88
	}
88
	}
89
	
89
90
	/* (non-Javadoc)
90
	/* (non-Javadoc)
91
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#createArgumentReference(char[], java.lang.Object, int)
91
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#createArgumentReference(char[], java.lang.Object, int)
92
	 */
92
	 */
Lines 167-179 Link Here
167
			// Create method ref
167
			// Create method ref
168
			MethodRef methodRef = this.ast.newMethodRef();
168
			MethodRef methodRef = this.ast.newMethodRef();
169
			SimpleName methodName = new SimpleName(this.ast);
169
			SimpleName methodName = new SimpleName(this.ast);
170
			methodName.internalSetIdentifier(new String(this.identifierStack[0]));
170
			int memberPtr = this.identifierLengthStack[0] - 1;
171
			methodName.internalSetIdentifier(new String(this.identifierStack[memberPtr]));
171
			methodRef.setName(methodName);
172
			methodRef.setName(methodName);
172
			int start = (int) (this.identifierPositionStack[0] >>> 32);
173
			int start = (int) (this.identifierPositionStack[memberPtr] >>> 32);
173
			int end = (int) this.identifierPositionStack[0];
174
			int end = (int) this.identifierPositionStack[memberPtr];
174
			methodName.setSourceRange(start, end - start + 1);
175
			methodName.setSourceRange(start, end - start + 1);
175
			// Set qualifier
176
			// Set qualifier
176
//			int end = methodName.getStartPosition()+methodName.getLength()-1;
177
			if (receiver == null) {
177
			if (receiver == null) {
178
				start = this.memberStart;
178
				start = this.memberStart;
179
				methodRef.setSourceRange(start, end - start + 1);
179
				methodRef.setSourceRange(start, end - start + 1);
Lines 188-197 Link Here
188
				while (parameters.hasNext()) {
188
				while (parameters.hasNext()) {
189
					MethodRefParameter param = (MethodRefParameter) parameters.next();
189
					MethodRefParameter param = (MethodRefParameter) parameters.next();
190
					methodRef.parameters().add(param);
190
					methodRef.parameters().add(param);
191
//					end = param.getStartPosition()+param.getLength()-1;
192
				}
191
				}
193
			}
192
			}
194
//			methodRef.setSourceRange(start, end-start+1);
195
			methodRef.setSourceRange(start, this.scanner.getCurrentTokenEndPosition()-start+1);
193
			methodRef.setSourceRange(start, this.scanner.getCurrentTokenEndPosition()-start+1);
196
			return methodRef;
194
			return methodRef;
197
		}
195
		}
Lines 239-245 Link Here
239
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#createTypeReference()
237
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#createTypeReference()
240
	 */
238
	 */
241
	protected Object createTypeReference(int primitiveToken) {
239
	protected Object createTypeReference(int primitiveToken) {
242
		int size = this.identifierLengthStack[this.identifierLengthPtr--];
240
		int size = this.identifierLengthStack[this.identifierLengthPtr];
243
		String[] identifiers = new String[size];
241
		String[] identifiers = new String[size];
244
		int pos = this.identifierPtr - size + 1;
242
		int pos = this.identifierPtr - size + 1;
245
		for (int i = 0; i < size; i++) {
243
		for (int i = 0; i < size; i++) {
Lines 307-324 Link Here
307
			int end = (int) this.identifierPositionStack[pos];
305
			int end = (int) this.identifierPositionStack[pos];
308
			typeRef.setSourceRange(start, end-start+1);
306
			typeRef.setSourceRange(start, end-start+1);
309
		}
307
		}
310
		this.identifierPtr -= size;
311
		return typeRef;
308
		return typeRef;
312
	}
309
	}
313
310
314
	/*
315
	 * Parse @return tag declaration
316
	 */
317
	protected boolean parseReturn() {
318
		createTag();
319
		return true;
320
	}
321
322
	/* (non-Javadoc)
311
	/* (non-Javadoc)
323
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseIdentifierTag(boolean)
312
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseIdentifierTag(boolean)
324
	 */
313
	 */
Lines 332-337 Link Here
332
		return false;
321
		return false;
333
	}
322
	}
334
323
324
	/*
325
	 * Parse @return tag declaration
326
	 */
327
	protected boolean parseReturn() {
328
		createTag();
329
		return true;
330
	}
331
335
	/* (non-Javadoc)
332
	/* (non-Javadoc)
336
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseTag(int)
333
	 * @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseTag(int)
337
	 */
334
	 */

Return to bug 96237