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
enableAutoActivation(false);
		enableAutoInsert(false);
		
		setContextInformationPopupOrientation(CONTEXT_INFO_ABOVE);
		setInformationControlCreator(getInformationControlCreator());
		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
		IColorManager manager= textTools.getColorManager();
		IPreferenceStore store=  JavaPlugin.getDefault().getPreferenceStore();
		Color c= getColor(store, ContentAssistPreference.PROPOSALS_FOREGROUND, manager);
		setProposalSelectorForeground(c);
		
		c= getColor(store, ContentAssistPreference.PROPOSALS_BACKGROUND, manager);
		setProposalSelectorBackground(c);
	}
	
	private IInformationControlCreator getInformationControlCreator() {
		return new IInformationControlCreator() {
			public IInformationControl createInformationControl(Shell parent) {
				return new DefaultInformationControl(parent, new HTMLTextPresenter());
			}
		};
	}	
	
	private static Color getColor(IPreferenceStore store, String key, IColorManager manager) {
		RGB rgb= PreferenceConverter.getColor(store, key);
		return manager.getColor(rgb);
	}
}