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
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.internal.ui.javaeditor;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.ui.editors.text.EncodingActionGroup;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.actions.RetargetAction;
import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.ui.texteditor.RetargetTextEditorAction;
import org.eclipse.jdt.ui.IContextMenuConstants;
import org.eclipse.jdt.ui.actions.IJavaEditorActionDefinitionIds;
import org.eclipse.jdt.ui.actions.JdtActionConstants;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
public class BasicEditorActionContributor extends BasicJavaEditorActionContributor {