Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 371832 | Differences between
and this patch

Collapse All | Expand All

(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AnnotationTest.java (-1 / +35 lines)
Lines 47-53 Link Here
47
	// Static initializer to specify tests subset using TESTS_* static variables
47
	// Static initializer to specify tests subset using TESTS_* static variables
48
	// All specified tests which do not belong to the class are skipped...
48
	// All specified tests which do not belong to the class are skipped...
49
	static {
49
	static {
50
//		TESTS_NAMES = new String[] { "testBug365437" };
50
//		TESTS_NAMES = new String[] { "test135" };
51
//		TESTS_NUMBERS = new int[] { 297 };
51
//		TESTS_NUMBERS = new int[] { 297 };
52
//		TESTS_RANGE = new int[] { 294, -1 };
52
//		TESTS_RANGE = new int[] { 294, -1 };
53
	}
53
	}
Lines 10517-10520 Link Here
10517
		"----------\n",
10517
		"----------\n",
10518
		JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
10518
		JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
10519
}
10519
}
10520
10521
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=371832
10522
//Unused imports should be reported even if other errors are suppressed.
10523
public void testBug371832() throws Exception {
10524
	Map customOptions = getCompilerOptions();
10525
	customOptions.put(CompilerOptions.OPTION_ReportUnusedImport, CompilerOptions.ERROR);
10526
	customOptions.put(CompilerOptions.OPTION_ReportUnusedLocal, CompilerOptions.ERROR);
10527
	customOptions.put(CompilerOptions.OPTION_SuppressOptionalErrors, CompilerOptions.ENABLED);
10528
	customOptions.put(CompilerOptions.OPTION_ReportMissingSerialVersion, CompilerOptions.ERROR);
10529
	String testFiles [] = new String[] {
10530
			"A.java",
10531
			"import java.util.List;\n"+
10532
			"@SuppressWarnings(\"serial\")\n" +
10533
			"public class A implements java.io.Serializable {\n" +
10534
			"	void foo() { \n" +
10535
			"	}\n"+
10536
			"}\n"
10537
			};
10538
	String expectedErrorString = 
10539
			"----------\n" + 
10540
			"1. ERROR in A.java (at line 1)\n" + 
10541
			"	import java.util.List;\n" + 
10542
			"	       ^^^^^^^^^^^^^^\n" + 
10543
			"The import java.util.List is never used\n" + 
10544
			"----------\n";
10545
	runNegativeTest(
10546
			true,
10547
			testFiles,
10548
			null, 
10549
			customOptions,
10550
			expectedErrorString,
10551
			JavacTestOptions.Excuse.EclipseWarningConfiguredAsError);
10552
}
10553
10520
}
10554
}
(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocBugsTest.java (-9 / +49 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 4916-4928 Link Here
4916
			"Javadoc: Invalid member type qualification\n" +
4916
			"Javadoc: Invalid member type qualification\n" +
4917
			"----------\n" +
4917
			"----------\n" +
4918
			"----------\n" +
4918
			"----------\n" +
4919
			"1. ERROR in boden\\TestInvalid3.java (at line 5)\n" +
4919
			"1. ERROR in boden\\TestInvalid3.java (at line 2)\n"+
4920
			"	import boden.IAFAState.ValidationException;\n"+
4921
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4922
			"The import boden.IAFAState.ValidationException is never used\n"+
4923
			"----------\n"+
4924
			"2. ERROR in boden\\TestInvalid3.java (at line 5)\n" +
4920
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" +
4925
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" +
4921
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4926
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4922
			"Javadoc: Invalid member type qualification\n" +
4927
			"Javadoc: Invalid member type qualification\n" +
4923
			"----------\n" +
4928
			"----------\n" +
4924
			"----------\n" +
4929
			"----------\n" +
4925
			"1. ERROR in boden\\TestInvalid4.java (at line 5)\n" +
4930
			"1. ERROR in boden\\TestInvalid4.java (at line 2)\n"+
4931
			"	import boden.IAFAState.ValidationException;\n"+
4932
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4933
			"The import boden.IAFAState.ValidationException is never used\n"+
4934
			"----------\n"+
4935
			"2. ERROR in boden\\TestInvalid4.java (at line 5)\n" +
4926
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" +
4936
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" +
4927
			"	                                     ^^^^^^^^^\n" +
4937
			"	                                     ^^^^^^^^^\n" +
4928
			"Javadoc: IAFAState cannot be resolved or is not a field\n" +
4938
			"Javadoc: IAFAState cannot be resolved or is not a field\n" +
Lines 4934-4946 Link Here
4934
			//boden\TestInvalid3.java:6: warning - Tag @see: can't find IAFA.State.ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
4944
			//boden\TestInvalid3.java:6: warning - Tag @see: can't find IAFA.State.ValidationException(String, IAFAState) in boden.IAFAState.ValidationException
4935
			//boden\TestInvalid4.java:6: warning - Tag @see: can't find IAFAState in boden.IAFAState.ValidationException
4945
			//boden\TestInvalid4.java:6: warning - Tag @see: can't find IAFAState in boden.IAFAState.ValidationException
4936
			"----------\n" +
4946
			"----------\n" +
4937
			"1. ERROR in boden\\TestInvalid3.java (at line 5)\n" +
4947
			"1. ERROR in boden\\TestInvalid3.java (at line 2)\n"+
4948
			"	import boden.IAFAState.ValidationException;\n"+
4949
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4950
			"The import boden.IAFAState.ValidationException is never used\n"+
4951
			"----------\n"+
4952
			"2. ERROR in boden\\TestInvalid3.java (at line 5)\n" +
4938
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" +
4953
			"	* @see IAFAState.ValidationException#IAFA.State.ValidationException(String, IAFAState)\n" +
4939
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4954
			"	                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4940
			"Javadoc: Invalid member type qualification\n" +
4955
			"Javadoc: Invalid member type qualification\n" +
4941
			"----------\n" +
4956
			"----------\n" +
4942
			"----------\n" +
4957
			"----------\n" +
4943
			"1. ERROR in boden\\TestInvalid4.java (at line 5)\n" +
4958
			"1. ERROR in boden\\TestInvalid4.java (at line 2)\n"+
4959
			"	import boden.IAFAState.ValidationException;\n"+
4960
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4961
			"The import boden.IAFAState.ValidationException is never used\n"+
4962
			"----------\n"+
4963
			"2. ERROR in boden\\TestInvalid4.java (at line 5)\n" +
4944
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" +
4964
			"	* @see IAFAState.ValidationException#IAFAState .ValidationException(String, IAFAState)\n" +
4945
			"	                                     ^^^^^^^^^\n" +
4965
			"	                                     ^^^^^^^^^\n" +
4946
			"Javadoc: IAFAState cannot be resolved or is not a field\n" +
4966
			"Javadoc: IAFAState cannot be resolved or is not a field\n" +
Lines 6966-6972 Link Here
6966
		"Javadoc: Invalid member type qualification\n" +
6986
		"Javadoc: Invalid member type qualification\n" +
6967
		"----------\n" +
6987
		"----------\n" +
6968
		"----------\n" +
6988
		"----------\n" +
6969
		"1. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
6989
		"1. ERROR in pkg3\\Invalid3.java (at line 2)\n" +
6990
		"	import mainpkg.Outer.*;\n"+
6991
		"	       ^^^^^^^^^^^^^\n"+
6992
		"The import mainpkg.Outer is never used\n" +
6993
		"----------\n" +
6994
		"2. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
6970
		"	* {@link MostInner} -- error/warning  \n" +
6995
		"	* {@link MostInner} -- error/warning  \n" +
6971
		"	         ^^^^^^^^^\n" +
6996
		"	         ^^^^^^^^^\n" +
6972
		"Javadoc: MostInner cannot be resolved to a type\n" +
6997
		"Javadoc: MostInner cannot be resolved to a type\n" +
Lines 6975-6981 Link Here
6975
	String error50 = new String (
7000
	String error50 = new String (
6976
			//pkg3\Invalid3.java:12: warning - Tag @link: reference not found: MostInner
7001
			//pkg3\Invalid3.java:12: warning - Tag @link: reference not found: MostInner
6977
			"----------\n" +
7002
			"----------\n" +
6978
			"1. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
7003
			"1. ERROR in pkg3\\Invalid3.java (at line 2)\n" +
7004
			"	import mainpkg.Outer.*;\n"+
7005
			"	       ^^^^^^^^^^^^^\n"+
7006
			"The import mainpkg.Outer is never used\n" +
7007
			"----------\n" +		
7008
			"2. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
6979
			"	* {@link MostInner} -- error/warning  \n" +
7009
			"	* {@link MostInner} -- error/warning  \n" +
6980
			"	         ^^^^^^^^^\n" +
7010
			"	         ^^^^^^^^^\n" +
6981
			"Javadoc: MostInner cannot be resolved to a type\n" +
7011
			"Javadoc: MostInner cannot be resolved to a type\n" +
Lines 7070-7076 Link Here
7070
			"Javadoc: Invalid member type qualification\n" +
7100
			"Javadoc: Invalid member type qualification\n" +
7071
			"----------\n" +
7101
			"----------\n" +
7072
			"----------\n" +
7102
			"----------\n" +
7073
			"1. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
7103
			"1. ERROR in pkg3\\Invalid3.java (at line 2)\n" +
7104
			"	import mainpkg.Outer.*;\n"+
7105
			"	       ^^^^^^^^^^^^^\n"+
7106
			"The import mainpkg.Outer is never used\n" +
7107
			"----------\n" +
7108
			"2. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
7074
			"	* {@link MostInner} -- error/warning  \n" +
7109
			"	* {@link MostInner} -- error/warning  \n" +
7075
			"	         ^^^^^^^^^\n" +
7110
			"	         ^^^^^^^^^\n" +
7076
			"Javadoc: MostInner cannot be resolved to a type\n" +
7111
			"Javadoc: MostInner cannot be resolved to a type\n" +
Lines 7079-7085 Link Here
7079
	String error50 = new String(
7114
	String error50 = new String(
7080
			//pkg3\Invalid3.java:12: warning - Tag @link: reference not found: MostInner
7115
			//pkg3\Invalid3.java:12: warning - Tag @link: reference not found: MostInner
7081
			"----------\n" +
7116
			"----------\n" +
7082
			"1. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
7117
			"1. ERROR in pkg3\\Invalid3.java (at line 2)\n" +
7118
			"	import mainpkg.Outer.*;\n"+
7119
			"	       ^^^^^^^^^^^^^\n"+
7120
			"The import mainpkg.Outer is never used\n" +
7121
			"----------\n" +
7122
			"2. ERROR in pkg3\\Invalid3.java (at line 6)\n" +
7083
			"	* {@link MostInner} -- error/warning  \n" +
7123
			"	* {@link MostInner} -- error/warning  \n" +
7084
			"	         ^^^^^^^^^\n" +
7124
			"	         ^^^^^^^^^\n" +
7085
			"Javadoc: MostInner cannot be resolved to a type\n" +
7125
			"Javadoc: MostInner cannot be resolved to a type\n" +
(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForClass.java (-5 / +20 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 950-961 Link Here
950
					+ "	}\n"
950
					+ "	}\n"
951
					+ "}\n" },
951
					+ "}\n" },
952
			"----------\n" +
952
			"----------\n" +
953
			"1. ERROR in test\\X.java (at line 6)\n" +
953
			"1. WARNING in test\\X.java (at line 2)\n"+
954
			"	import test.copy.*;\n"+
955
			"	       ^^^^^^^^^\n"+
956
			"The import test.copy is never used\n"+
957
			"----------\n"+
958
			"2. ERROR in test\\X.java (at line 6)\n" +
954
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
959
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
955
			"	       ^^^^^^^^^^^^^^^^^\n" +
960
			"	       ^^^^^^^^^^^^^^^^^\n" +
956
			"Javadoc: The type VisibilityPackage is not visible\n" +
961
			"Javadoc: The type VisibilityPackage is not visible\n" +
957
			"----------\n" +
962
			"----------\n" +
958
			"2. ERROR in test\\X.java (at line 7)\n" +
963
			"3. ERROR in test\\X.java (at line 7)\n" +
959
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
964
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
960
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
965
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
961
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
966
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
Lines 1018-1024 Link Here
1018
						"}\n",
1023
						"}\n",
1019
						},
1024
						},
1020
						"----------\n" + 
1025
						"----------\n" + 
1021
						"1. ERROR in X.java (at line 6)\n" + 
1026
						"1. WARNING in X.java (at line 2)\n"+
1027
						"	import java.util.Map.Entry;\n"+
1028
						"	       ^^^^^^^^^^^^^^^^^^^\n"+
1029
						"The import java.util.Map.Entry is never used\n"+
1030
						"----------\n"+
1031
						"2. ERROR in X.java (at line 6)\n" + 
1022
						"	* <li> {@link Entry} </li>\n" + 
1032
						"	* <li> {@link Entry} </li>\n" + 
1023
						"	              ^^^^^\n" + 
1033
						"	              ^^^^^\n" + 
1024
						"Javadoc: Invalid member type qualification\n" + 
1034
						"Javadoc: Invalid member type qualification\n" + 
Lines 1090-1096 Link Here
1090
						"}\n",
1100
						"}\n",
1091
						},
1101
						},
1092
						"----------\n" + 
1102
						"----------\n" + 
1093
						"1. ERROR in X.java (at line 6)\n" + 
1103
						"1. WARNING in X.java (at line 2)\n"+
1104
						"	import java.util.Map.Entry;\n"+
1105
						"	       ^^^^^^^^^^^^^^^^^^^\n"+
1106
						"The import java.util.Map.Entry is never used\n"+
1107
						"----------\n"+
1108
						"2. ERROR in X.java (at line 6)\n" + 
1094
						"	* <li> {@link Entry} </li>\n" + 
1109
						"	* <li> {@link Entry} </li>\n" + 
1095
						"	              ^^^^^\n" + 
1110
						"	              ^^^^^\n" + 
1096
						"Javadoc: Invalid member type qualification\n" + 
1111
						"Javadoc: Invalid member type qualification\n" + 
(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForConstructor.java (-3 / +8 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 903-914 Link Here
903
					+ "	}\n"
903
					+ "	}\n"
904
					+ "}\n" },
904
					+ "}\n" },
905
			"----------\n" +
905
			"----------\n" +
906
			"1. ERROR in test\\X.java (at line 7)\n" +
906
			"1. WARNING in test\\X.java (at line 2)\n"+
907
			"	import test.copy.*;\n"+
908
			"	       ^^^^^^^^^\n"+
909
			"The import test.copy is never used\n"+
910
			"----------\n"+
911
			"2. ERROR in test\\X.java (at line 7)\n" +
907
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
912
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
908
			"	       ^^^^^^^^^^^^^^^^^\n" +
913
			"	       ^^^^^^^^^^^^^^^^^\n" +
909
			"Javadoc: The type VisibilityPackage is not visible\n" +
914
			"Javadoc: The type VisibilityPackage is not visible\n" +
910
			"----------\n" +
915
			"----------\n" +
911
			"2. ERROR in test\\X.java (at line 8)\n" +
916
			"3. ERROR in test\\X.java (at line 8)\n" +
912
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
917
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
913
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
918
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
914
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
919
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForField.java (-3 / +8 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 977-988 Link Here
977
					+ "	public int x;\n"
977
					+ "	public int x;\n"
978
					+ "}\n" },
978
					+ "}\n" },
979
			"----------\n" +
979
			"----------\n" +
980
			"1. ERROR in test\\X.java (at line 7)\n" +
980
			"1. WARNING in test\\X.java (at line 2)\n"+
981
			"	import test.copy.*;\n"+
982
			"	       ^^^^^^^^^\n"+
983
			"The import test.copy is never used\n"+
984
			"----------\n"+
985
			"2. ERROR in test\\X.java (at line 7)\n" +
981
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
986
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
982
			"	       ^^^^^^^^^^^^^^^^^\n" +
987
			"	       ^^^^^^^^^^^^^^^^^\n" +
983
			"Javadoc: The type VisibilityPackage is not visible\n" +
988
			"Javadoc: The type VisibilityPackage is not visible\n" +
984
			"----------\n" +
989
			"----------\n" +
985
			"2. ERROR in test\\X.java (at line 8)\n" +
990
			"3. ERROR in test\\X.java (at line 8)\n" +
986
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
991
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
987
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
992
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
988
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
993
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForInterface.java (-5 / +15 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 910-921 Link Here
910
					+ "	public void foo();\n"
910
					+ "	public void foo();\n"
911
					+ "}\n" },
911
					+ "}\n" },
912
			"----------\n" +
912
			"----------\n" +
913
			"1. ERROR in test\\IX.java (at line 6)\n" +
913
			"1. WARNING in test\\IX.java (at line 2)\n"+
914
			"	import test.copy.*;\n"+
915
			"	       ^^^^^^^^^\n"+
916
			"The import test.copy is never used\n"+
917
			"----------\n"+
918
			"2. ERROR in test\\IX.java (at line 6)\n" +
914
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
919
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
915
			"	       ^^^^^^^^^^^^^^^^^\n" +
920
			"	       ^^^^^^^^^^^^^^^^^\n" +
916
			"Javadoc: The type VisibilityPackage is not visible\n" +
921
			"Javadoc: The type VisibilityPackage is not visible\n" +
917
			"----------\n" +
922
			"----------\n" +
918
			"2. ERROR in test\\IX.java (at line 7)\n" +
923
			"3. ERROR in test\\IX.java (at line 7)\n" +
919
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
924
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
920
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
925
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
921
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
926
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
Lines 2198-2209 Link Here
2198
					+ "	public void foo();\n"
2203
					+ "	public void foo();\n"
2199
					+ "}\n" },
2204
					+ "}\n" },
2200
			"----------\n" +
2205
			"----------\n" +
2201
			"1. ERROR in test\\IX.java (at line 7)\n" +
2206
			"1. WARNING in test\\IX.java (at line 2)\n"+
2207
			"	import test.copy.*;\n"+
2208
			"	       ^^^^^^^^^\n"+
2209
			"The import test.copy is never used\n"+
2210
			"----------\n"+
2211
			"2. ERROR in test\\IX.java (at line 7)\n" +
2202
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
2212
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
2203
			"	       ^^^^^^^^^^^^^^^^^\n" +
2213
			"	       ^^^^^^^^^^^^^^^^^\n" +
2204
			"Javadoc: The type VisibilityPackage is not visible\n" +
2214
			"Javadoc: The type VisibilityPackage is not visible\n" +
2205
			"----------\n" +
2215
			"----------\n" +
2206
			"2. ERROR in test\\IX.java (at line 8)\n" +
2216
			"3. ERROR in test\\IX.java (at line 8)\n" +
2207
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
2217
			"	* @see test.copy.VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
2208
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2218
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2209
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
2219
			"Javadoc: The type test.copy.VisibilityPackage is not visible\n" +
(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/JavadocTestForMethod.java (-43 / +73 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 1037-1048 Link Here
1037
					+ "	}\n"
1037
					+ "	}\n"
1038
					+ "}\n" },
1038
					+ "}\n" },
1039
			"----------\n" +
1039
			"----------\n" +
1040
			"1. ERROR in X.java (at line 5)\n" +
1040
			"1. WARNING in X.java (at line 1)\n"+
1041
			"	import java.util.Hashtable;\n"+
1042
			"	       ^^^^^^^^^^^^^^^^^^^\n"+
1043
			"The import java.util.Hashtable is never used\n"+
1044
			"----------\n"+
1045
			"2. ERROR in X.java (at line 5)\n" +
1041
			"	* @param Hashtable\n" +
1046
			"	* @param Hashtable\n" +
1042
			"	         ^^^^^^^^^\n" +
1047
			"	         ^^^^^^^^^\n" +
1043
			"Javadoc: Parameter Hashtable is not declared\n" +
1048
			"Javadoc: Parameter Hashtable is not declared\n" +
1044
			"----------\n" +
1049
			"----------\n" +
1045
			"2. ERROR in X.java (at line 7)\n" +
1050
			"3. ERROR in X.java (at line 7)\n" +
1046
			"	public void p_foo(int x) {\n" +
1051
			"	public void p_foo(int x) {\n" +
1047
			"	                      ^\n" +
1052
			"	                      ^\n" +
1048
			"Javadoc: Missing tag for parameter x\n" +
1053
			"Javadoc: Missing tag for parameter x\n" +
Lines 2341-2387 Link Here
2341
					+ "	}\n"
2346
					+ "	}\n"
2342
					+ "}\n" },
2347
					+ "}\n" },
2343
			"----------\n" +
2348
			"----------\n" +
2344
			"1. ERROR in test\\X.java (at line 7)\n" +
2349
			"1. WARNING in test\\X.java (at line 2)\n"+
2350
			"	import test.copy.*;\n"+
2351
			"	       ^^^^^^^^^\n"+
2352
			"The import test.copy is never used\n"+
2353
			"----------\n"+
2354
			"2. ERROR in test\\X.java (at line 7)\n" +
2345
			"	* @see VisibilityPackage#unknown Invalid ref: non visible class (non existent field)\n" +
2355
			"	* @see VisibilityPackage#unknown Invalid ref: non visible class (non existent field)\n" +
2346
			"	       ^^^^^^^^^^^^^^^^^\n" +
2356
			"	       ^^^^^^^^^^^^^^^^^\n" +
2347
			"Javadoc: The type VisibilityPackage is not visible\n" +
2357
			"Javadoc: The type VisibilityPackage is not visible\n" +
2348
			"----------\n" +
2358
			"----------\n" +
2349
			"2. ERROR in test\\X.java (at line 8)\n" +
2359
			"3. ERROR in test\\X.java (at line 8)\n" +
2350
			"	* @see VisibilityPackage#vf_private Invalid ref: non visible class (non existent field)\n" +
2360
			"	* @see VisibilityPackage#vf_private Invalid ref: non visible class (non existent field)\n" +
2351
			"	       ^^^^^^^^^^^^^^^^^\n" +
2361
			"	       ^^^^^^^^^^^^^^^^^\n" +
2352
			"Javadoc: The type VisibilityPackage is not visible\n" +
2362
			"Javadoc: The type VisibilityPackage is not visible\n" +
2353
			"----------\n" +
2363
			"----------\n" +
2354
			"3. ERROR in test\\X.java (at line 9)\n" +
2364
			"4. ERROR in test\\X.java (at line 9)\n" +
2355
			"	* @see VisibilityPackage#vf_public Invalid ref: non visible class (visible field)\n" +
2365
			"	* @see VisibilityPackage#vf_public Invalid ref: non visible class (visible field)\n" +
2356
			"	       ^^^^^^^^^^^^^^^^^\n" +
2366
			"	       ^^^^^^^^^^^^^^^^^\n" +
2357
			"Javadoc: The type VisibilityPackage is not visible\n" +
2367
			"Javadoc: The type VisibilityPackage is not visible\n" +
2358
			"----------\n" +
2368
			"----------\n" +
2359
			"4. ERROR in test\\X.java (at line 10)\n" +
2369
			"5. ERROR in test\\X.java (at line 10)\n" +
2360
			"	* @see VisibilityPackage.VpPrivate#unknown Invalid ref: non visible class and non visible inner class (non existent field)\n" +
2370
			"	* @see VisibilityPackage.VpPrivate#unknown Invalid ref: non visible class and non visible inner class (non existent field)\n" +
2361
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2371
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2362
			"Javadoc: The type VisibilityPackage is not visible\n" +
2372
			"Javadoc: The type VisibilityPackage is not visible\n" +
2363
			"----------\n" +
2373
			"----------\n" +
2364
			"5. ERROR in test\\X.java (at line 11)\n" +
2374
			"6. ERROR in test\\X.java (at line 11)\n" +
2365
			"	* @see VisibilityPackage.VpPrivate#vf_private Invalid ref: non visible class and non visible inner class (non visible field)\n" +
2375
			"	* @see VisibilityPackage.VpPrivate#vf_private Invalid ref: non visible class and non visible inner class (non visible field)\n" +
2366
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2376
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2367
			"Javadoc: The type VisibilityPackage is not visible\n" +
2377
			"Javadoc: The type VisibilityPackage is not visible\n" +
2368
			"----------\n" +
2378
			"----------\n" +
2369
			"6. ERROR in test\\X.java (at line 12)\n" +
2379
			"7. ERROR in test\\X.java (at line 12)\n" +
2370
			"	* @see VisibilityPackage.VpPrivate#vf_public Invalid ref: non visible class and non visible inner class (visible field)\n" +
2380
			"	* @see VisibilityPackage.VpPrivate#vf_public Invalid ref: non visible class and non visible inner class (visible field)\n" +
2371
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2381
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2372
			"Javadoc: The type VisibilityPackage is not visible\n" +
2382
			"Javadoc: The type VisibilityPackage is not visible\n" +
2373
			"----------\n" +
2383
			"----------\n" +
2374
			"7. ERROR in test\\X.java (at line 13)\n" +
2384
			"8. ERROR in test\\X.java (at line 13)\n" +
2375
			"	* @see VisibilityPackage.VpPublic#unknown Invalid ref: non visible class and visible inner class (non existent field)\n" +
2385
			"	* @see VisibilityPackage.VpPublic#unknown Invalid ref: non visible class and visible inner class (non existent field)\n" +
2376
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2386
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2377
			"Javadoc: The type VisibilityPackage is not visible\n" +
2387
			"Javadoc: The type VisibilityPackage is not visible\n" +
2378
			"----------\n" +
2388
			"----------\n" +
2379
			"8. ERROR in test\\X.java (at line 14)\n" +
2389
			"9. ERROR in test\\X.java (at line 14)\n" +
2380
			"	* @see VisibilityPackage.VpPublic#vf_private Invalid ref: non visible class and visible inner class (non visible field)\n" +
2390
			"	* @see VisibilityPackage.VpPublic#vf_private Invalid ref: non visible class and visible inner class (non visible field)\n" +
2381
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2391
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2382
			"Javadoc: The type VisibilityPackage is not visible\n" +
2392
			"Javadoc: The type VisibilityPackage is not visible\n" +
2383
			"----------\n" +
2393
			"----------\n" +
2384
			"9. ERROR in test\\X.java (at line 15)\n" +
2394
			"10. ERROR in test\\X.java (at line 15)\n" +
2385
			"	* @see VisibilityPackage.VpPublic#vf_public Invalid ref: non visible class and visible inner class (visible field)\n" +
2395
			"	* @see VisibilityPackage.VpPublic#vf_public Invalid ref: non visible class and visible inner class (visible field)\n" +
2386
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2396
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
2387
			"Javadoc: The type VisibilityPackage is not visible\n" +
2397
			"Javadoc: The type VisibilityPackage is not visible\n" +
Lines 3782-3803 Link Here
3782
					+ "	}\n"
3792
					+ "	}\n"
3783
					+ "}\n" },
3793
					+ "}\n" },
3784
			"----------\n" +
3794
			"----------\n" +
3785
			"1. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 7)\n" +
3795
			"1. WARNING in test\\deep\\qualified\\name\\p\\X.java (at line 2)\n"+
3796
			"	import java.util.Vector;\n"+
3797
			"	       ^^^^^^^^^^^^^^^^\n"+
3798
			"The import java.util.Vector is never used\n"+
3799
			"----------\n"+
3800
			"2. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 7)\n" +
3786
			"	* @see test.deep.qualified.name.p.X#smr_foo(boolean,int i,byte,short s,char,long l,float,double d) Invalid reference: mixed argument declaration\n" +
3801
			"	* @see test.deep.qualified.name.p.X#smr_foo(boolean,int i,byte,short s,char,long l,float,double d) Invalid reference: mixed argument declaration\n" +
3787
			"	                                           ^^^^^^^^^^^^^^\n" +
3802
			"	                                           ^^^^^^^^^^^^^^\n" +
3788
			"Javadoc: Invalid parameters declaration\n" +
3803
			"Javadoc: Invalid parameters declaration\n" +
3789
			"----------\n" +
3804
			"----------\n" +
3790
			"2. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 8)\n" +
3805
			"3. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 8)\n" +
3791
			"	* @see test.deep.qualified.name.p.X#smr_foo(String,String y,int) Invalid reference: mixed argument declaration\n" +
3806
			"	* @see test.deep.qualified.name.p.X#smr_foo(String,String y,int) Invalid reference: mixed argument declaration\n" +
3792
			"	                                           ^^^^^^^^^^^^^^^^\n" +
3807
			"	                                           ^^^^^^^^^^^^^^^^\n" +
3793
			"Javadoc: Invalid parameters declaration\n" +
3808
			"Javadoc: Invalid parameters declaration\n" +
3794
			"----------\n" +
3809
			"----------\n" +
3795
			"3. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 9)\n" +
3810
			"4. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 9)\n" +
3796
			"	* @see test.deep.qualified.name.p.X#smr_foo(Hashtable,Vector,boolean b) Invalid reference: mixed argument declaration\n" +
3811
			"	* @see test.deep.qualified.name.p.X#smr_foo(Hashtable,Vector,boolean b) Invalid reference: mixed argument declaration\n" +
3797
			"	                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
3812
			"	                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
3798
			"Javadoc: Invalid parameters declaration\n" +
3813
			"Javadoc: Invalid parameters declaration\n" +
3799
			"----------\n" +
3814
			"----------\n" +
3800
			"4. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 10)\n" +
3815
			"5. ERROR in test\\deep\\qualified\\name\\p\\X.java (at line 10)\n" +
3801
			"	* @see test.deep.qualified.name.p.X#smr_foo(Hashtable,Vector,boolean b) Invalid reference: mixed argument declaration\n" +
3816
			"	* @see test.deep.qualified.name.p.X#smr_foo(Hashtable,Vector,boolean b) Invalid reference: mixed argument declaration\n" +
3802
			"	                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
3817
			"	                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
3803
			"Javadoc: Invalid parameters declaration\n" +
3818
			"Javadoc: Invalid parameters declaration\n" +
Lines 4213-4289 Link Here
4213
					+ "	}\n"
4228
					+ "	}\n"
4214
					+ "}\n" },
4229
					+ "}\n" },
4215
			"----------\n" +
4230
			"----------\n" +
4216
			"1. ERROR in test\\X.java (at line 7)\n" +
4231
			"1. WARNING in test\\X.java (at line 2)\n"+
4232
			"	import test.copy.*;\n"+
4233
			"	       ^^^^^^^^^\n"+
4234
			"The import test.copy is never used\n"+
4235
			"----------\n"+
4236
			"2. ERROR in test\\X.java (at line 7)\n" +
4217
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
4237
			"	* @see VisibilityPackage#unknown() Invalid ref: non visible class (non existent method)\n" +
4218
			"	       ^^^^^^^^^^^^^^^^^\n" +
4238
			"	       ^^^^^^^^^^^^^^^^^\n" +
4219
			"Javadoc: The type VisibilityPackage is not visible\n" +
4239
			"Javadoc: The type VisibilityPackage is not visible\n" +
4220
			"----------\n" +
4240
			"----------\n" +
4221
			"2. ERROR in test\\X.java (at line 8)\n" +
4241
			"3. ERROR in test\\X.java (at line 8)\n" +
4222
			"	* @see VisibilityPackage#vm_private() Invalid ref: non visible class (non visible method)\n" +
4242
			"	* @see VisibilityPackage#vm_private() Invalid ref: non visible class (non visible method)\n" +
4223
			"	       ^^^^^^^^^^^^^^^^^\n" +
4243
			"	       ^^^^^^^^^^^^^^^^^\n" +
4224
			"Javadoc: The type VisibilityPackage is not visible\n" +
4244
			"Javadoc: The type VisibilityPackage is not visible\n" +
4225
			"----------\n" +
4245
			"----------\n" +
4226
			"3. ERROR in test\\X.java (at line 9)\n" +
4246
			"4. ERROR in test\\X.java (at line 9)\n" +
4227
			"	* @see VisibilityPackage#vm_private(boolean) Invalid ref: non visible class (non existent method)\n" +
4247
			"	* @see VisibilityPackage#vm_private(boolean) Invalid ref: non visible class (non existent method)\n" +
4228
			"	       ^^^^^^^^^^^^^^^^^\n" +
4248
			"	       ^^^^^^^^^^^^^^^^^\n" +
4229
			"Javadoc: The type VisibilityPackage is not visible\n" +
4249
			"Javadoc: The type VisibilityPackage is not visible\n" +
4230
			"----------\n" +
4250
			"----------\n" +
4231
			"4. ERROR in test\\X.java (at line 10)\n" +
4251
			"5. ERROR in test\\X.java (at line 10)\n" +
4232
			"	* @see VisibilityPackage#vm_public() Invalid ref: non visible class (visible method)\n" +
4252
			"	* @see VisibilityPackage#vm_public() Invalid ref: non visible class (visible method)\n" +
4233
			"	       ^^^^^^^^^^^^^^^^^\n" +
4253
			"	       ^^^^^^^^^^^^^^^^^\n" +
4234
			"Javadoc: The type VisibilityPackage is not visible\n" +
4254
			"Javadoc: The type VisibilityPackage is not visible\n" +
4235
			"----------\n" +
4255
			"----------\n" +
4236
			"5. ERROR in test\\X.java (at line 11)\n" +
4256
			"6. ERROR in test\\X.java (at line 11)\n" +
4237
			"	* @see VisibilityPackage#vm_public(long,long,long,int) Invalid ref: non visible class (visible method)\n" +
4257
			"	* @see VisibilityPackage#vm_public(long,long,long,int) Invalid ref: non visible class (visible method)\n" +
4238
			"	       ^^^^^^^^^^^^^^^^^\n" +
4258
			"	       ^^^^^^^^^^^^^^^^^\n" +
4239
			"Javadoc: The type VisibilityPackage is not visible\n" +
4259
			"Javadoc: The type VisibilityPackage is not visible\n" +
4240
			"----------\n" +
4260
			"----------\n" +
4241
			"6. ERROR in test\\X.java (at line 12)\n" +
4261
			"7. ERROR in test\\X.java (at line 12)\n" +
4242
			"	* @see VisibilityPackage.VpPrivate#unknown() Invalid ref: non visible class and non visible inner class (non existent method)\n" +
4262
			"	* @see VisibilityPackage.VpPrivate#unknown() Invalid ref: non visible class and non visible inner class (non existent method)\n" +
4243
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4263
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4244
			"Javadoc: The type VisibilityPackage is not visible\n" +
4264
			"Javadoc: The type VisibilityPackage is not visible\n" +
4245
			"----------\n" +
4265
			"----------\n" +
4246
			"7. ERROR in test\\X.java (at line 13)\n" +
4266
			"8. ERROR in test\\X.java (at line 13)\n" +
4247
			"	* @see VisibilityPackage.VpPrivate#vm_private() Invalid ref: non visible class and non visible inner class (non visible method)\n" +
4267
			"	* @see VisibilityPackage.VpPrivate#vm_private() Invalid ref: non visible class and non visible inner class (non visible method)\n" +
4248
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4268
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4249
			"Javadoc: The type VisibilityPackage is not visible\n" +
4269
			"Javadoc: The type VisibilityPackage is not visible\n" +
4250
			"----------\n" +
4270
			"----------\n" +
4251
			"8. ERROR in test\\X.java (at line 14)\n" +
4271
			"9. ERROR in test\\X.java (at line 14)\n" +
4252
			"	* @see VisibilityPackage.VpPrivate#vm_private(boolean, String) Invalid ref: non visible class and non visible inner class (non applicable method)\n" +
4272
			"	* @see VisibilityPackage.VpPrivate#vm_private(boolean, String) Invalid ref: non visible class and non visible inner class (non applicable method)\n" +
4253
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4273
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4254
			"Javadoc: The type VisibilityPackage is not visible\n" +
4274
			"Javadoc: The type VisibilityPackage is not visible\n" +
4255
			"----------\n" +
4275
			"----------\n" +
4256
			"9. ERROR in test\\X.java (at line 15)\n" +
4276
			"10. ERROR in test\\X.java (at line 15)\n" +
4257
			"	* @see VisibilityPackage.VpPrivate#vm_public() Invalid ref: non visible class and non visible inner class (visible method)\n" +
4277
			"	* @see VisibilityPackage.VpPrivate#vm_public() Invalid ref: non visible class and non visible inner class (visible method)\n" +
4258
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4278
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4259
			"Javadoc: The type VisibilityPackage is not visible\n" +
4279
			"Javadoc: The type VisibilityPackage is not visible\n" +
4260
			"----------\n" +
4280
			"----------\n" +
4261
			"10. ERROR in test\\X.java (at line 16)\n" +
4281
			"11. ERROR in test\\X.java (at line 16)\n" +
4262
			"	* @see VisibilityPackage.VpPrivate#vm_public(Object, float) Invalid ref: non visible class and non visible inner class (non applicable visible method)\n" +
4282
			"	* @see VisibilityPackage.VpPrivate#vm_public(Object, float) Invalid ref: non visible class and non visible inner class (non applicable visible method)\n" +
4263
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4283
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4264
			"Javadoc: The type VisibilityPackage is not visible\n" +
4284
			"Javadoc: The type VisibilityPackage is not visible\n" +
4265
			"----------\n" +
4285
			"----------\n" +
4266
			"11. ERROR in test\\X.java (at line 17)\n" +
4286
			"12. ERROR in test\\X.java (at line 17)\n" +
4267
			"	* @see VisibilityPackage.VpPublic#unknown() Invalid ref: non visible class and visible inner class (non existent method)\n" +
4287
			"	* @see VisibilityPackage.VpPublic#unknown() Invalid ref: non visible class and visible inner class (non existent method)\n" +
4268
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4288
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4269
			"Javadoc: The type VisibilityPackage is not visible\n" +
4289
			"Javadoc: The type VisibilityPackage is not visible\n" +
4270
			"----------\n" +
4290
			"----------\n" +
4271
			"12. ERROR in test\\X.java (at line 18)\n" +
4291
			"13. ERROR in test\\X.java (at line 18)\n" +
4272
			"	* @see VisibilityPackage.VpPublic#vm_private() Invalid ref: non visible class and visible inner class (non visible method)\n" +
4292
			"	* @see VisibilityPackage.VpPublic#vm_private() Invalid ref: non visible class and visible inner class (non visible method)\n" +
4273
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4293
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4274
			"Javadoc: The type VisibilityPackage is not visible\n" +
4294
			"Javadoc: The type VisibilityPackage is not visible\n" +
4275
			"----------\n" +
4295
			"----------\n" +
4276
			"13. ERROR in test\\X.java (at line 19)\n" +
4296
			"14. ERROR in test\\X.java (at line 19)\n" +
4277
			"	* @see VisibilityPackage.VpPublic#vm_private(boolean, String) Invalid ref: non visible class and visible inner class (non applicable method)\n" +
4297
			"	* @see VisibilityPackage.VpPublic#vm_private(boolean, String) Invalid ref: non visible class and visible inner class (non applicable method)\n" +
4278
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4298
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4279
			"Javadoc: The type VisibilityPackage is not visible\n" +
4299
			"Javadoc: The type VisibilityPackage is not visible\n" +
4280
			"----------\n" +
4300
			"----------\n" +
4281
			"14. ERROR in test\\X.java (at line 20)\n" +
4301
			"15. ERROR in test\\X.java (at line 20)\n" +
4282
			"	* @see VisibilityPackage.VpPublic#vm_public() Invalid ref: non visible class and visible inner class (visible method)\n" +
4302
			"	* @see VisibilityPackage.VpPublic#vm_public() Invalid ref: non visible class and visible inner class (visible method)\n" +
4283
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4303
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4284
			"Javadoc: The type VisibilityPackage is not visible\n" +
4304
			"Javadoc: The type VisibilityPackage is not visible\n" +
4285
			"----------\n" +
4305
			"----------\n" +
4286
			"15. ERROR in test\\X.java (at line 21)\n" +
4306
			"16. ERROR in test\\X.java (at line 21)\n" +
4287
			"	* @see VisibilityPackage.VpPublic#vm_public(Object, float) Invalid ref: non visible class and visible inner class (non applicable visible method)\n" +
4307
			"	* @see VisibilityPackage.VpPublic#vm_public(Object, float) Invalid ref: non visible class and visible inner class (non applicable visible method)\n" +
4288
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4308
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
4289
			"Javadoc: The type VisibilityPackage is not visible\n" +
4309
			"Javadoc: The type VisibilityPackage is not visible\n" +
Lines 4678-4709 Link Here
4678
					+ "	}\n"
4698
					+ "	}\n"
4679
					+ "}\n" },
4699
					+ "}\n" },
4680
			"----------\n" +
4700
			"----------\n" +
4681
			"1. ERROR in test\\X.java (at line 7)\n" +
4701
			"1. WARNING in test\\X.java (at line 2)\n"+
4702
			"	import test.copy.VisibilityPublic;\n"+
4703
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n"+
4704
			"The import test.copy.VisibilityPublic is never used\n"+
4705
			"----------\n"+
4706
			"2. ERROR in test\\X.java (at line 7)\n" +
4682
			"	* @see VisibilityPublic#vm_private(\"boolean\") Invalid ref: invalid argument declaration\n" +
4707
			"	* @see VisibilityPublic#vm_private(\"boolean\") Invalid ref: invalid argument declaration\n" +
4683
			"	                                  ^^^^^^^^^^\n" +
4708
			"	                                  ^^^^^^^^^^\n" +
4684
			"Javadoc: Invalid parameters declaration\n" +
4709
			"Javadoc: Invalid parameters declaration\n" +
4685
			"----------\n" +
4710
			"----------\n" +
4686
			"2. ERROR in test\\X.java (at line 8)\n" +
4711
			"3. ERROR in test\\X.java (at line 8)\n" +
4687
			"	* @see VisibilityPublic#vm_public(long, \"int) Invalid ref: invalid argument definition\n" +
4712
			"	* @see VisibilityPublic#vm_public(long, \"int) Invalid ref: invalid argument definition\n" +
4688
			"	                                 ^^^^^^^^\n" +
4713
			"	                                 ^^^^^^^^\n" +
4689
			"Javadoc: Invalid parameters declaration\n" +
4714
			"Javadoc: Invalid parameters declaration\n" +
4690
			"----------\n" +
4715
			"----------\n" +
4691
			"3. ERROR in test\\X.java (at line 9)\n" +
4716
			"4. ERROR in test\\X.java (at line 9)\n" +
4692
			"	* @see VisibilityPublic.VpPrivate#vm_private(double d()) Invalid ref: invalid argument declaration\n" +
4717
			"	* @see VisibilityPublic.VpPrivate#vm_private(double d()) Invalid ref: invalid argument declaration\n" +
4693
			"	                                            ^^^^^^^^^^\n" +
4718
			"	                                            ^^^^^^^^^^\n" +
4694
			"Javadoc: Invalid parameters declaration\n" +
4719
			"Javadoc: Invalid parameters declaration\n" +
4695
			"----------\n" +
4720
			"----------\n" +
4696
			"4. ERROR in test\\X.java (at line 10)\n" +
4721
			"5. ERROR in test\\X.java (at line 10)\n" +
4697
			"	* @see VisibilityPublic.VpPrivate#vm_public(\") Invalid ref: invalid argument declaration\n" +
4722
			"	* @see VisibilityPublic.VpPrivate#vm_public(\") Invalid ref: invalid argument declaration\n" +
4698
			"	                                           ^^\n" +
4723
			"	                                           ^^\n" +
4699
			"Javadoc: Invalid parameters declaration\n" +
4724
			"Javadoc: Invalid parameters declaration\n" +
4700
			"----------\n" +
4725
			"----------\n" +
4701
			"5. ERROR in test\\X.java (at line 11)\n" +
4726
			"6. ERROR in test\\X.java (at line 11)\n" +
4702
			"	* @see VisibilityPublic.VpPublic#vm_private(d()) Invalid ref: invalid argument declaration\n" +
4727
			"	* @see VisibilityPublic.VpPublic#vm_private(d()) Invalid ref: invalid argument declaration\n" +
4703
			"	                                           ^^^\n" +
4728
			"	                                           ^^^\n" +
4704
			"Javadoc: Invalid parameters declaration\n" +
4729
			"Javadoc: Invalid parameters declaration\n" +
4705
			"----------\n" +
4730
			"----------\n" +
4706
			"6. ERROR in test\\X.java (at line 12)\n" +
4731
			"7. ERROR in test\\X.java (at line 12)\n" +
4707
			"	* @see VisibilityPublic.VpPublic#vm_public(205) Invalid ref: invalid argument declaration\n" +
4732
			"	* @see VisibilityPublic.VpPublic#vm_public(205) Invalid ref: invalid argument declaration\n" +
4708
			"	                                          ^^^^\n" +
4733
			"	                                          ^^^^\n" +
4709
			"Javadoc: Invalid parameters declaration\n" +
4734
			"Javadoc: Invalid parameters declaration\n" +
Lines 4875-4906 Link Here
4875
					+ "	}\n"
4900
					+ "	}\n"
4876
					+ "}\n" },
4901
					+ "}\n" },
4877
			"----------\n" +
4902
			"----------\n" +
4878
			"1. ERROR in test\\X.java (at line 7)\n" +
4903
			"1. WARNING in test\\X.java (at line 2)\n"+
4904
			"	import test.copy.VisibilityPublic;\n"+
4905
			"	       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n"+
4906
			"The import test.copy.VisibilityPublic is never used\n"+
4907
			"----------\n"+
4908
			"2. ERROR in test\\X.java (at line 7)\n" +
4879
			"	* @see test.copy.VisibilityPublic#vm_private(\"\") Invalid ref: invalid argument declaration\n" +
4909
			"	* @see test.copy.VisibilityPublic#vm_private(\"\") Invalid ref: invalid argument declaration\n" +
4880
			"	                                            ^^^\n" +
4910
			"	                                            ^^^\n" +
4881
			"Javadoc: Invalid parameters declaration\n" +
4911
			"Javadoc: Invalid parameters declaration\n" +
4882
			"----------\n" +
4912
			"----------\n" +
4883
			"2. ERROR in test\\X.java (at line 8)\n" +
4913
			"3. ERROR in test\\X.java (at line 8)\n" +
4884
			"	* @see test.copy.VisibilityPublic#vm_public(\"\"\") Invalid ref: invalid argument definition\n" +
4914
			"	* @see test.copy.VisibilityPublic#vm_public(\"\"\") Invalid ref: invalid argument definition\n" +
4885
			"	                                           ^^^\n" +
4915
			"	                                           ^^^\n" +
4886
			"Javadoc: Invalid parameters declaration\n" +
4916
			"Javadoc: Invalid parameters declaration\n" +
4887
			"----------\n" +
4917
			"----------\n" +
4888
			"3. ERROR in test\\X.java (at line 9)\n" +
4918
			"4. ERROR in test\\X.java (at line 9)\n" +
4889
			"	* @see test.copy.VisibilityPublic.VpPrivate#vm_private(String d()) Invalid ref: invalid argument declaration\n" +
4919
			"	* @see test.copy.VisibilityPublic.VpPrivate#vm_private(String d()) Invalid ref: invalid argument declaration\n" +
4890
			"	                                                      ^^^^^^^^^^\n" +
4920
			"	                                                      ^^^^^^^^^^\n" +
4891
			"Javadoc: Invalid parameters declaration\n" +
4921
			"Javadoc: Invalid parameters declaration\n" +
4892
			"----------\n" +
4922
			"----------\n" +
4893
			"4. ERROR in test\\X.java (at line 10)\n" +
4923
			"5. ERROR in test\\X.java (at line 10)\n" +
4894
			"	* @see test.copy.VisibilityPublic.VpPrivate#vm_public([) Invalid ref: invalid argument declaration\n" +
4924
			"	* @see test.copy.VisibilityPublic.VpPrivate#vm_public([) Invalid ref: invalid argument declaration\n" +
4895
			"	                                                     ^^\n" +
4925
			"	                                                     ^^\n" +
4896
			"Javadoc: Invalid parameters declaration\n" +
4926
			"Javadoc: Invalid parameters declaration\n" +
4897
			"----------\n" +
4927
			"----------\n" +
4898
			"5. ERROR in test\\X.java (at line 11)\n" +
4928
			"6. ERROR in test\\X.java (at line 11)\n" +
4899
			"	* @see test.copy.VisibilityPublic.VpPublic#vm_private([]) Invalid ref: invalid argument declaration\n" +
4929
			"	* @see test.copy.VisibilityPublic.VpPublic#vm_private([]) Invalid ref: invalid argument declaration\n" +
4900
			"	                                                     ^^\n" +
4930
			"	                                                     ^^\n" +
4901
			"Javadoc: Invalid parameters declaration\n" +
4931
			"Javadoc: Invalid parameters declaration\n" +
4902
			"----------\n" +
4932
			"----------\n" +
4903
			"6. ERROR in test\\X.java (at line 12)\n" +
4933
			"7. ERROR in test\\X.java (at line 12)\n" +
4904
			"	* @see test.copy.VisibilityPublic.VpPublic#vm_public(char[], int[],]) Invalid ref: invalid argument declaration\n" +
4934
			"	* @see test.copy.VisibilityPublic.VpPublic#vm_public(char[], int[],]) Invalid ref: invalid argument declaration\n" +
4905
			"	                                                    ^^^^^^^^^^^^^^^^\n" +
4935
			"	                                                    ^^^^^^^^^^^^^^^^\n" +
4906
			"Javadoc: Invalid parameters declaration\n" +
4936
			"Javadoc: Invalid parameters declaration\n" +
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java (-1 / +12 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 73-78 Link Here
73
	public char[][] packageName;
73
	public char[][] packageName;
74
	public boolean checkSecondaryTypes = false; // check for secondary types which were created after the initial buildTypeBindings call
74
	public boolean checkSecondaryTypes = false; // check for secondary types which were created after the initial buildTypeBindings call
75
	private int numberOfErrors;
75
	private int numberOfErrors;
76
	private boolean hasMandatoryErrors;
76
77
77
	private static final int[] EMPTY_LINE_ENDS = Util.EMPTY_INT_ARRAY;
78
	private static final int[] EMPTY_LINE_ENDS = Util.EMPTY_INT_ARRAY;
78
	private static final Comparator PROBLEM_COMPARATOR = new Comparator() {
79
	private static final Comparator PROBLEM_COMPARATOR = new Comparator() {
Lines 274-279 Link Here
274
	return this.numberOfErrors != 0;
275
	return this.numberOfErrors != 0;
275
}
276
}
276
277
278
public boolean hasMandatoryErrors() {
279
	return this.hasMandatoryErrors;
280
}
281
277
public boolean hasProblems() {
282
public boolean hasProblems() {
278
	return this.problemCount != 0;
283
	return this.problemCount != 0;
279
}
284
}
Lines 324-329 Link Here
324
}
329
}
325
330
326
public void record(CategorizedProblem newProblem, ReferenceContext referenceContext) {
331
public void record(CategorizedProblem newProblem, ReferenceContext referenceContext) {
332
	record(newProblem, referenceContext, true);
333
	return;
334
}
335
336
public void record(CategorizedProblem newProblem, ReferenceContext referenceContext, boolean mandatoryError) {
327
	//new Exception("VERBOSE PROBLEM REPORTING").printStackTrace();
337
	//new Exception("VERBOSE PROBLEM REPORTING").printStackTrace();
328
	if(newProblem.getID() == IProblem.Task) {
338
	if(newProblem.getID() == IProblem.Task) {
329
		recordTask(newProblem);
339
		recordTask(newProblem);
Lines 343-348 Link Here
343
	}
353
	}
344
	if (newProblem.isError()) {
354
	if (newProblem.isError()) {
345
		this.numberOfErrors++;
355
		this.numberOfErrors++;
356
		if (mandatoryError) this.hasMandatoryErrors = true;
346
		if ((newProblem.getID() & IProblem.Syntax) != 0) {
357
		if ((newProblem.getID() & IProblem.Syntax) != 0) {
347
			this.hasSyntaxError = true;
358
			this.hasSyntaxError = true;
348
		}
359
		}
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 602-608 Link Here
602
							0, // source end
602
							0, // source end
603
							0, // line number
603
							0, // line number
604
							0),// column number
604
							0),// column number
605
					unit);
605
					unit, true);
606
606
607
			/* hand back the compilation result */
607
			/* hand back the compilation result */
608
			if (!result.hasBeenAccepted) {
608
			if (!result.hasBeenAccepted) {
Lines 664-670 Link Here
664
					if (distantProblem instanceof DefaultProblem) { // fixup filename TODO (philippe) should improve API to make this official
664
					if (distantProblem instanceof DefaultProblem) { // fixup filename TODO (philippe) should improve API to make this official
665
						((DefaultProblem) distantProblem).setOriginatingFileName(result.getFileName());
665
						((DefaultProblem) distantProblem).setOriginatingFileName(result.getFileName());
666
					}
666
					}
667
					result.record(distantProblem, unit);
667
					result.record(distantProblem, unit, true);
668
				}
668
				}
669
			} else {
669
			} else {
670
				/* distant internal exception which could not be reported back there */
670
				/* distant internal exception which could not be reported back there */
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java (-1 / +1 lines)
Lines 561-567 Link Here
561
				this.types[i].resolve(this.scope);
561
				this.types[i].resolve(this.scope);
562
			}
562
			}
563
		}
563
		}
564
		if (!this.compilationResult.hasErrors()) checkUnusedImports();
564
		if (!this.compilationResult.hasMandatoryErrors()) checkUnusedImports();
565
		reportNLSProblems();
565
		reportNLSProblems();
566
	} catch (AbortCompilationUnit e) {
566
	} catch (AbortCompilationUnit e) {
567
		this.ignoreFurtherInvestigation = true;
567
		this.ignoreFurtherInvestigation = true;
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemHandler.java (-5 / +6 lines)
Lines 162-171 Link Here
162
162
163
	switch (severity & ProblemSeverities.Error) {
163
	switch (severity & ProblemSeverities.Error) {
164
		case ProblemSeverities.Error :
164
		case ProblemSeverities.Error :
165
			record(problem, unitResult, referenceContext);
165
			boolean mandatory = ((severity & ProblemSeverities.Optional) == 0);
166
			record(problem, unitResult, referenceContext, mandatory);
166
			if ((severity & ProblemSeverities.Fatal) != 0) {
167
			if ((severity & ProblemSeverities.Fatal) != 0) {
167
				// don't abort or tag as error if the error is suppressed
168
				// don't abort or tag as error if the error is suppressed
168
				if (!referenceContext.hasErrors() && (severity & ProblemSeverities.Optional) != 0 && this.options.suppressOptionalErrors) {
169
				if (!referenceContext.hasErrors() && !mandatory && this.options.suppressOptionalErrors) {
169
					CompilationUnitDeclaration unitDecl = referenceContext.getCompilationUnitDeclaration();
170
					CompilationUnitDeclaration unitDecl = referenceContext.getCompilationUnitDeclaration();
170
					if (unitDecl != null && unitDecl.isSuppressed(problem)) {
171
					if (unitDecl != null && unitDecl.isSuppressed(problem)) {
171
						return;
172
						return;
Lines 180-186 Link Here
180
			}
181
			}
181
			break;
182
			break;
182
		case ProblemSeverities.Warning :
183
		case ProblemSeverities.Warning :
183
			record(problem, unitResult, referenceContext);
184
			record(problem, unitResult, referenceContext, false);
184
			break;
185
			break;
185
	}
186
	}
186
}
187
}
Lines 208-214 Link Here
208
		referenceContext,
209
		referenceContext,
209
		unitResult);
210
		unitResult);
210
}
211
}
211
public void record(CategorizedProblem problem, CompilationResult unitResult, ReferenceContext referenceContext) {
212
public void record(CategorizedProblem problem, CompilationResult unitResult, ReferenceContext referenceContext, boolean optionalError) {
212
	unitResult.record(problem, referenceContext);
213
	unitResult.record(problem, referenceContext, optionalError);
213
}
214
}
214
}
215
}
(-)a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/compiler/SourceElementParser.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
2
 * Copyright (c) 2000, 2012 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 86-93 Link Here
86
		DefaultErrorHandlingPolicies.exitAfterAllProblems(),
86
		DefaultErrorHandlingPolicies.exitAfterAllProblems(),
87
		options,
87
		options,
88
		problemFactory) {
88
		problemFactory) {
89
		public void record(CategorizedProblem problem, CompilationResult unitResult, ReferenceContext context) {
89
		public void record(CategorizedProblem problem, CompilationResult unitResult, ReferenceContext context, boolean mandatoryError) {
90
			unitResult.record(problem, context); // TODO (jerome) clients are trapping problems either through factory or requestor... is result storing needed?
90
			unitResult.record(problem, context, mandatoryError); // TODO (jerome) clients are trapping problems either through factory or requestor... is result storing needed?
91
			SourceElementParser.this.requestor.acceptProblem(problem);
91
			SourceElementParser.this.requestor.acceptProblem(problem);
92
		}
92
		}
93
	};
93
	};

Return to bug 371832