Bug 22496 Keyboard execution of all auto fix hints in current cursor line [quick fix]
To allow fast typing, without having to worry about casts, it would be nice, if CTRL + 1 (auto fix) could find all the hints that are available for the current line. An example: public class AutoCast { Object getObject(){ return this; } void autoCast(){ AutoCast castMe = getObject(); } } My cursor is behind the semi-colon of getObject(). To add the cast "(AutoCast)" with the help of Eclipse, I would want CTRL + 1 to find the last auto fix hint prior to the cursor in the same line. With this feature, a lot of lazy-typing would be very comfortable: "Don't worry about casts, while you are writing code. Simly let Eclipse add all of them when the line of code is completed."
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.java
/*******************************************************************************
 * Copyright (c) 2000, 2002 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.ui.text.correction;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.contentassist.ContentAssistant;
import org.eclipse.ui.IEditorPart;
import org.eclipse.jdt.ui.text.IColorManager;
import org.eclipse.jdt.ui.text.JavaTextTools;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.text.ContentAssistPreference;
import org.eclipse.jdt.internal.ui.text.HTMLTextPresenter;
import org.eclipse.jdt.internal.ui.text.JavaPartitionScanner;
public class JavaCorrectionAssistant extends ContentAssistant {