Bug 46364 [content assist] Support incremental content assist
I've been spoiled by content assist. What would be a great addition would be a Unix-style "look ahead" invoked by the TAB key, like at a Unix Shell. If non-whitespace characters appear to the left of the Caret, it is unlikely that a TAB is going to be inserted in that line. This is why I think it's ok to use TAB for this. Basically, pressing TAB will be equivalent to the combination of: Control+SPACE, followed by ENTER. So, given: for (int i = 0; i < cols.length; i++) { Entry entry = cols[i]; double distance; if (entry.side == -1) { distance = Math.abs(baseRect.preciseX - entry.offset); if (distance < best) { bestSide = -1; best = dis<<CARET>> Pressing the TAB key will insert "tance".
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicEditorActionContributor.java
protected RetargetAction fRetargetContentAssist;
	protected RetargetTextEditorAction fContentAssist;
	protected RetargetTextEditorAction fCompletePrefix;
	protected RetargetTextEditorAction fContextInformation;
	protected RetargetTextEditorAction fCorrectionAssist;
	private EncodingActionGroup fEncodingActionGroup;
	
	
	public BasicEditorActionContributor() {
		
		fRetargetContentAssist= new RetargetAction(JdtActionConstants.CONTENT_ASSIST,  JavaEditorMessages.getString("ContentAssistProposal.label")); 
		fRetargetContentAssist.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
		markAsPartListener(fRetargetContentAssist);
		
		fContentAssist= new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistProposal."); 
		fContentAssist.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); 
		fContentAssist.setImageDescriptor(JavaPluginImages.DESC_CLCL_CODE_ASSIST);
		fContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST);
		
		fContextInformation= new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistContextInformation."); 
		fContextInformation.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
		
		fCompletePrefix= new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "ContentAssistCompletePrefix."); 
		fCompletePrefix.setActionDefinitionId(IJavaEditorActionDefinitionIds.CONTENT_ASSIST_COMPLETE_PREFIX);
		
		fCorrectionAssist= new RetargetTextEditorAction(JavaEditorMessages.getResourceBundle(), "CorrectionAssistProposal.");