Bug 4964 Automatic Code Assist needs to be smarter
Build 204 While writing SWT code, I type the following: button.dispose At this point, I do not realize that the code assist list is up because I am not looking. There are 2 items in the list now: DISPOSED int - Widget dispose() void - Widget I then type "(" because the line I was typing was supposed to be: button.dispose(); But as soon as I type the "(" then automatic code assist seems to insert whatever is selected. Since DISPOSED is first in the list and is selected, I ended up with: button.DISPOSED which isn't even close to what I want, and I have to delete it all and start again, paying more attention this time. Code assist should notice that I have typed a ( and that this matches "dispose ()" far better than "DISPOSED". Either that, or it needs to be case sensitive when it is automatically inserting stuff.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ResultCollector.java
protected ImageDescriptor getDeprecatedDescriptor(ImageDescriptor descriptor) {
		Point size= new Point(16, 16);
		return new JavaElementImageDescriptor(descriptor, JavaElementImageDescriptor.WARNING, size);	    
	}
	
	protected JavaCompletionProposal createCompletion(int start, int end, String completion, ImageDescriptor descriptor, String name) {
		int length;
		if (fUserReplacementLength == -1) {
			length= fPreventEating ? fCodeAssistOffset - start : end - start;
		} else {
			length= fUserReplacementLength;
			
			if (start < fCodeAssistOffset) {
				length+= fCodeAssistOffset - start;
			}
		}
		Image icon= fRegistry.get(descriptor);
		
		return new JavaCompletionProposal(completion, start, length, icon, name);
	}
		
	/**
	 * Specifies the context of the code assist operation.
	 * @param codeAssistOffset The Offset on which the code assist will be called.
	 * Used to modify the offsets of the created proposals. ('Non Eating')
	 * @param jproject The Java project to which the underlying source belongs.
	 * Needed to find types referred.
	 * @param cu The compilation unit that is edited. Used to add import statements.
	 * Can be <code>null</code> if no import statements should be added.
	 */