Bug 43897 - No completion in cast expression
Summary: No completion in cast expression
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-30 06:36 EDT by Philipe Mulet CLA
Modified: 2003-10-09 06:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.