Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 43897

Summary: No completion in cast expression
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Philipe Mulet CLA 2003-09-30 06:36:31 EDT
Build 20030925

CodeAssist doesn't provide completions in WorkingCopyNotInClasspathTests,
inside the cast expression:
  copy = (ICompilationUnit) cu.bec<CODE ASSIST>
where it should offer method #becomeWorkingCopy.


// 41583 - variation using primary working copy
public void testReconcileAndCommit3() throws CoreException {
	ICompilationUnit copy = null;
	try {
		this.createProject("SimpleProject");
		this.createFolder("/SimpleProject/src/native.1");
		String source = 
			"class X {}";
		IFile file = this.createFile
("/SimpleProject/src/native.1/X.java", source);
		ICompilationUnit cu = JavaCore.createCompilationUnitFrom(file);
		copy = (ICompilationUnit) cu.bec<CODE ASSIST HERE>
Comment 1 Philipe Mulet CLA 2003-09-30 06:38:23 EDT
I suspect it is due to the fact the #become method is of type void, and we are 
in a situation where codeassist as an expected type (lhs of assign). The match 
should still be offered, though a likely not very relevant one.
Comment 2 David Audel CLA 2003-10-02 06:25:41 EDT
void methods are filtered if the completion node have an expected type.

Fixed by removing the filter.
Comment 3 David Audel CLA 2003-10-09 06:58:43 EDT
Verified.