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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/JavaSearchBugsTests.java (-3 / +39 lines)
Lines 43-49 Link Here
43
	static {
43
	static {
44
//		org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
44
//		org.eclipse.jdt.internal.core.search.BasicSearchEngine.VERBOSE = true;
45
//		org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true;
45
//		org.eclipse.jdt.internal.codeassist.SelectionEngine.DEBUG = true;
46
//		TESTS_PREFIX =  "testBug75816";
46
//		TESTS_PREFIX =  "testBug97547";
47
//		TESTS_NAMES = new String[] { "testBug82208_SearchAllTypeNames_CLASS" };
47
//		TESTS_NAMES = new String[] { "testBug82208_SearchAllTypeNames_CLASS" };
48
//		TESTS_NUMBERS = new int[] { 96761, 96763 };
48
//		TESTS_NUMBERS = new int[] { 96761, 96763 };
49
//		TESTS_RANGE = new int[] { 83304, -1 };
49
//		TESTS_RANGE = new int[] { 83304, -1 };
Lines 64-69 Link Here
64
		if (packageName == null) return getJavaSearchScopeBugs();
64
		if (packageName == null) return getJavaSearchScopeBugs();
65
		return getJavaSearchPackageScope("JavaSearchBugs", packageName, addSubpackages);
65
		return getJavaSearchPackageScope("JavaSearchBugs", packageName, addSubpackages);
66
	}
66
	}
67
	public ICompilationUnit getWorkingCopy(String path, String source) throws JavaModelException {
68
		if (this.wcOwner == null) {
69
			this.wcOwner = new WorkingCopyOwner() {};
70
		}
71
		return getWorkingCopy(path, source, this.wcOwner, null/*don't compute problems*/);
72
	}
67
	protected void search(IJavaElement element, int limitTo) throws CoreException {
73
	protected void search(IJavaElement element, int limitTo) throws CoreException {
68
		search(element, limitTo, EXACT_RULE, getJavaSearchScopeBugs(), resultCollector);
74
		search(element, limitTo, EXACT_RULE, getJavaSearchScopeBugs(), resultCollector);
69
	}
75
	}
Lines 1359-1365 Link Here
1359
	}
1365
	}
1360
1366
1361
	/**
1367
	/**
1362
	 * Test fix for bug 82088: [search][javadoc] Method parameter types references not found in @see/@link tags
1368
	 * Bug 82088: [search][javadoc] Method parameter types references not found in @see/@link tags
1363
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=82088"
1369
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=82088"
1364
	 */
1370
	 */
1365
	public void testBug82088method() throws CoreException {
1371
	public void testBug82088method() throws CoreException {
Lines 2629-2635 Link Here
2629
	}
2635
	}
2630
2636
2631
	/**
2637
	/**
2632
	 * Test fix for bug 89848: [search] does not find method references in anonymous class of imported jarred plugin
2638
	 * Bug 89848: [search] does not find method references in anonymous class of imported jarred plugin
2633
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=89848"
2639
	 * @see "http://bugs.eclipse.org/bugs/show_bug.cgi?id=89848"
2634
	 */
2640
	 */
2635
	public void testBug89848() throws CoreException {
2641
	public void testBug89848() throws CoreException {
Lines 2834-2839 Link Here
2834
			"g5.m.def.Multiple\n" + 
2840
			"g5.m.def.Multiple\n" + 
2835
			"g5.m.def.Single\n" + 
2841
			"g5.m.def.Single\n" + 
2836
			"java.io.Serializable\n" + 
2842
			"java.io.Serializable\n" + 
2843
			"java.lang.CharSequence\n" + 
2837
			"java.lang.Class\n" + 
2844
			"java.lang.Class\n" + 
2838
			"java.lang.CloneNotSupportedException\n" + 
2845
			"java.lang.CloneNotSupportedException\n" + 
2839
			"java.lang.Comparable\n" + 
2846
			"java.lang.Comparable\n" + 
Lines 2950-2955 Link Here
2950
			"g5.m.def.Multiple\n" + 
2957
			"g5.m.def.Multiple\n" + 
2951
			"g5.m.def.Single\n" + 
2958
			"g5.m.def.Single\n" + 
2952
			"java.io.Serializable\n" + 
2959
			"java.io.Serializable\n" + 
2960
			"java.lang.CharSequence\n" + 
2953
			"java.lang.Class\n" + 
2961
			"java.lang.Class\n" + 
2954
			"java.lang.CloneNotSupportedException\n" + 
2962
			"java.lang.CloneNotSupportedException\n" + 
2955
			"java.lang.Comparable\n" + 
2963
			"java.lang.Comparable\n" + 
Lines 3045-3050 Link Here
3045
			"b87627.List\n" + 
3053
			"b87627.List\n" + 
3046
			"b92944.B92944_I\n" + 
3054
			"b92944.B92944_I\n" + 
3047
			"java.io.Serializable\n" + 
3055
			"java.io.Serializable\n" + 
3056
			"java.lang.CharSequence\n" + 
3048
			"java.lang.Comparable\n" +
3057
			"java.lang.Comparable\n" +
3049
			"java.lang.annotation.Annotation", // Annotation is an interface in java.lang
3058
			"java.lang.annotation.Annotation", // Annotation is an interface in java.lang
3050
			requestor);
3059
			requestor);
Lines 3448-3453 Link Here
3448
	}
3457
	}
3449
3458
3450
	/**
3459
	/**
3460
	 * Bug 97547: [search] Package search does not find references in member types import clause
3461
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=97547"
3462
	 */
3463
	public void testBug97547() throws CoreException {
3464
		workingCopies = new ICompilationUnit[2];
3465
		workingCopies[0] = getWorkingCopy("/JavaSearchBugs/src/b97547/IX.java",
3466
			"package b97547;\n" + 
3467
			"public interface IX {\n" + 
3468
			"	public interface IX1 {}\n" + 
3469
			"}"
3470
		);
3471
		workingCopies[1] = getWorkingCopy("/JavaSearchBugs/src/b97547/X.java",
3472
			"package b97547;\n" + 
3473
			"import b97547.IX.*;\n" + 
3474
			"class X {\n" + 
3475
			"	IX x;\n" + 
3476
			"}"
3477
		);
3478
		IPackageDeclaration[] packages = workingCopies[0].getPackageDeclarations();
3479
		assertTrue("Invalid number of packages declaration!", packages!=null && packages.length==1);
3480
		search(packages[0], REFERENCES);
3481
		assertSearchResults(
3482
			"src/b97547/X.java [b97547] EXACT_MATCH"
3483
		);
3484
	}
3485
3486
	/**
3451
	 * Bug 97606: [1.5][search] Raw type reference is reported as exact match for qualified names
3487
	 * Bug 97606: [1.5][search] Raw type reference is reported as exact match for qualified names
3452
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=97606"
3488
	 * @see "https://bugs.eclipse.org/bugs/show_bug.cgi?id=97606"
3453
	 */
3489
	 */

Return to bug 97547