Bug 94665 [quick fix] changing source version to 5.0 is not offered when caret offset is wrong
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.java
int newOffset= collectQuickFixableAnnotations(fEditor, currOffset, goToClosest, resultingAnnotations);
			if (newOffset != currOffset) {
				storePosition(currOffset, currLength);
				fViewer.setSelectedRange(newOffset, 0);
				fViewer.revealRange(newOffset, 0);
			}
		} catch (BadLocationException e) {
			JavaPlugin.log(e);
		}
		fCurrentAnnotations= (Annotation[]) resultingAnnotations.toArray(new Annotation[resultingAnnotations.size()]);
		return super.showPossibleCompletions();
	}
	
	
	public static int collectQuickFixableAnnotations(ITextEditor editor, int invocationLocation, boolean goToClosest, ArrayList resultingAnnotations) throws BadLocationException {
		IRegion lineInfo= editor.getDocumentProvider().getDocument(editor.getEditorInput()).getLineInformationOfOffset(invocationLocation);
		int rangeStart= lineInfo.getOffset();
		int rangeEnd= rangeStart + lineInfo.getLength();
		IAnnotationModel model= JavaUI.getDocumentProvider().getAnnotationModel(editor.getEditorInput());
		
		int bestOffset= Integer.MAX_VALUE;
		Iterator iter= model.getAnnotationIterator();
		while (iter.hasNext()) {
			Annotation annot= (Annotation) iter.next();
			if (JavaCorrectionProcessor.isQuickFixableType(annot)) {
				Position pos= model.getPosition(annot);
				if (pos != null && isInside(pos.offset, rangeStart, rangeEnd)) { 
					bestOffset= processAnnotation(annot, pos, invocationLocation, bestOffset, goToClosest, resultingAnnotations);
				}
			}