Bug 41643 - Code assist doesn't propose all valid types
Summary: Code assist doesn't propose all valid types
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-18 09:49 EDT by Dirk Baeumer CLA
Modified: 2003-10-09 06:57 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 Dirk Baeumer CLA 2003-08-18 09:49:54 EDT
I20030813++

I have the following CU

/******************************************************************************
*
 * Copyright (c) 2003 International Business Machines Corp. and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v0.5 
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 
******************************************************************************/
package org.eclipse.jdt.internal.corext.refactoring.participants;

import org.eclipse.core.runtime.CoreException;

public abstract class DeleteProcessor implements IRefactoringProcessor {

	private static final <cursor>

	public final IRefactoringParticipant[] getPrimaryParticipants() throws 
CoreException {
		return DeleteExtensionManager.getParticipants(this, getElements
());	
	}
	
	public final IRefactoringParticipant[] getDerivedParticipants() throws 
CoreException {
		IRefactoringParticipant[] result= 
DeleteExtensionManager.getParticipants(this, getDerivedElements());
		IRefactoringParticipant[] additions= getMappedParticipants
(result);
		if (additions == null || additions.length == 0) 
			return result;
		IRefactoringParticipant[] temp= new IRefactoringParticipant
[result.length + additions.length];
		System.arraycopy(result, 0, temp, 0, result.length);
		System.arraycopy(additions, 0, result, result.length, 
additions.length);
		return temp;
	}

	protected IRefactoringParticipant[] getMappedParticipants
(IRefactoringParticipant[] result) {
		return null;
	}
}

Opening code assist on <cursor> position only proposes DeleteProcessor.
Comment 1 Olivier Thomann CLA 2003-08-18 09:53:11 EDT
Do you have the same problem if you use the latest integration build?
Comment 2 Dirk Baeumer CLA 2003-08-18 11:53:57 EDT
It is the latest integration build with the latest plug-in export.
Comment 3 Olivier Thomann CLA 2003-08-18 12:00:42 EDT
I'd like to find out if this is a regression from the latest integration build. 
So if you simply use the latest integration build, do you get the same problem? 
or do you get it only when you use the latest jdt/core patch?
It is important to know that for the tomorrow's submission.
Comment 4 Dirk Baeumer CLA 2003-08-18 12:40:59 EDT
I get the problem with the latest integration build without latest JDT/Core 
patch but with JDT/UI plug-in export
Comment 5 Olivier Thomann CLA 2003-08-18 12:50:26 EDT
Ok, then this is not a regression from previous jdt/core submission. So I 
consider our submission ok. This problem will be addressed as soon as David is 
back.
Comment 6 David Audel CLA 2003-09-22 09:20:19 EDT
When the completion token is empty only top level types, enclosing types and 
expected types are proposed.

file X1.java
public class X1 {
   X2 x = <cursor>
   class X3 {}
}
class X4{
}

file X5.java
class X5 {
}

In this exemple, the completion proposals must be X1, X2, X3, X4.

So, the behavior in your test case seems to be correct.
But the algorithm do not work correctly, because in my test case X3 and X4 are 
not found.
Comment 7 David Audel CLA 2003-10-02 10:28:26 EDT
Not propose all types is the intended behavior when completion token is empty
(avoid to propose all types in the classpath).

Problem with field initializer is fixed.

Fixed.
Comment 8 David Audel CLA 2003-10-09 06:57:18 EDT
Verified.