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

(-)src/org/eclipse/jdt/core/tests/model/ResolveTests.java (+19 lines)
Lines 414-419 Link Here
414
	);
414
	);
415
}
415
}
416
/**
416
/**
417
 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=252481
418
 */
419
public void testEmptyCU1() throws JavaModelException {
420
	this.workingCopies = new ICompilationUnit[1];
421
	this.workingCopies[0] = getWorkingCopy(
422
		"/Resolve/src/Test.java",
423
		"//this CU must contain only an unknown type name" +
424
		"Unknown\n" +
425
		"\n"
426
	);
427
	
428
	IJavaElement[] elements = codeSelect(this.workingCopies[0], "Unknown", "Unknown");
429
	assertElementsEqual(
430
		"Unexpected elements",
431
		"",
432
		elements
433
	);
434
}
435
/**
417
 * Resolve empty selection
436
 * Resolve empty selection
418
 */
437
 */
419
public void testEmptySelection() throws JavaModelException {
438
public void testEmptySelection() throws JavaModelException {
(-)codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java (-1 / +5 lines)
Lines 730-736 Link Here
730
			
730
			
731
			IJavaSearchScope scope = BasicSearchEngine.createWorkspaceScope();
731
			IJavaSearchScope scope = BasicSearchEngine.createWorkspaceScope();
732
			
732
			
733
			SelectionTypeNameMatchRequestorWrapper requestorWrapper = new SelectionTypeNameMatchRequestorWrapper(typeNameMatchRequestor, scope, this.unitScope.referenceContext.imports);
733
			SelectionTypeNameMatchRequestorWrapper requestorWrapper =
734
				new SelectionTypeNameMatchRequestorWrapper(
735
						typeNameMatchRequestor, 
736
						scope,
737
						this.unitScope == null ? null : this.unitScope.referenceContext.imports);
734
			
738
			
735
			org.eclipse.jdt.core.ICompilationUnit[] workingCopies = this.owner == null ? null : JavaModelManager.getJavaModelManager().getWorkingCopies(this.owner, true/*add primary WCs*/);
739
			org.eclipse.jdt.core.ICompilationUnit[] workingCopies = this.owner == null ? null : JavaModelManager.getJavaModelManager().getWorkingCopies(this.owner, true/*add primary WCs*/);
736
			
740
			

Return to bug 252481