Bug 6342

Summary: Code assist on Intreface-'Constructors' incomplete
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: David Audel <david_audel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: m.moebius
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Martin Aeschlimann CLA 2001-11-27 06:06:37 EST
11122 with patch
For the anonymous inner class proposal:
Code assist on interfaces 'constructor' now works, but, as it seems, not 
everywhere.
- 'new java.util.List(' does not bring a proposal
- 'new junit.framework.Test(' works

'Test' is in source. Maybe thats the difference.
Comment 1 Philipe Mulet CLA 2001-12-04 16:23:14 EST
I think we should add another API for feeding these anonymous type bodies. 
Constructors for interface do not sound right, 1.0 customers would be seeing 
this behavior too, whereas with the new ICompletionRequestor, a new API would 
be ignored to 1.0 customers.
Comment 2 Philipe Mulet CLA 2002-01-10 06:29:35 EST
Do you agree with the API change ?
Comment 3 Martin Aeschlimann CLA 2002-01-10 06:45:52 EST
yes. can you give details?
would it be acceptAnonymousType(...)?
could it also be called in type names after 'new'? (not only after the opening 
bracket)
  new IActio
            ^code assist here 
Comment 4 David Audel CLA 2002-01-10 11:36:03 EST
i suggest :

public void acceptAnonymousType(
	char[] declaringTypePackageName,
	char[] declaringTypeName,
	char[][] parameterPackageNames,
	char[][] parameterTypeNames,
	char[][] parameterNames,
	char[] completionName,
	int modifiers,
	int completionStart,
	int completionEnd)
Comment 5 Philipe Mulet CLA 2002-01-11 07:41:40 EST
In the API, declaringTypeName will rather be superTypeName.
Comment 6 David Audel CLA 2002-01-11 11:45:22 EST
New API on ICompletionRequestor for suggest anonymous type declaration: 
      void acceptAnonymousType( 
          char[] superTypePackageName, 
          char[] superTypeName, 
          char[][] parameterPackageNames, 
          char[][] parameterNames, 
          char[][] parameterNames, 
          char[] completionName, 
          int modifiers, 
          int completionStart, 
          int completionEnd); 

Fixed.