Bug 43850 QuickAssist with linked mode has wrong default selection [quick assist]
I20030925 QuickAssist with linked mode has a default selection which is NOT the inserted (and green underlined) proposal. This is annoying, since it prevents quick acceptance with <Enter>. class X { public void foo(int jott) { } } - cursor on 'jott', Ctrl+1 - choose 'Assign parameter to new field' -> 'jott' is inserted in the editor, but 'i' is selected and inserted on <Enter> It's most probably a typo in LinkedModeProposal, line 101: "// keep first entry at first position Arrays.sort(res, 0, ..." should be "Arrays.sort(res, 1, ..."
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/LinkedCorrectionProposal.java
IPreferenceStore store= PreferenceConstants.getPreferenceStore();
			String[] prefOrder= JavaPreferencesSettings.getImportOrderPreference(store);
			int threshold= JavaPreferencesSettings.getImportNumberThreshold(store);					
			ImportsStructure impStructure= new ImportsStructure(fCompilationUnit, prefOrder, threshold, true);
			return impStructure;
		}
		
		/* (non-Javadoc)
		 * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension2#apply(org.eclipse.jface.text.ITextViewer, char, int, int)
		 */
		public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) {
			IDocument document= viewer.getDocument();
			Point point= viewer.getSelectedRange();
			try {
				String replaceString= fProposal;
				ImportsStructure impStructure= null;
				if (fTypeProposal != null) {
					impStructure= getImportStructure();
					replaceString= impStructure.addImport(fTypeProposal);
				}
				document.replace(point.x, point.y, replaceString);
			
				if (impStructure != null) {
					impStructure.create(false, null);
				}
			} catch (BadLocationException e) {
				JavaPlugin.log(e);
			} catch (CoreException e) {
				JavaPlugin.log(e);
			}