Bug 26321 Quick fix via Ctrl+1: chooses last error if no errors left to cursor
Build I20021113 - create TestCase() { fNam= null; fNme= null; } - position cursor at beginning of line fNam=.... - avtivate quick fix ==> quick fix opens on fNme= null; I would expect that quick fix opens on the "nearest" error
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/JavaCorrectionAssistant.java
Iterator iter= new JavaAnnotationIterator(model, true);
		while (iter.hasNext()) {
			IJavaAnnotation annot= (IJavaAnnotation)iter.next();
			Position pos= model.getPosition((Annotation)annot);
			if (isIncluded(pos, startOffset, endOffset)) {
				if (JavaCorrectionProcessor.hasCorrections(annot)) {
					invocationOffset= computeBestOffset(invocationOffset, pos, offset);
				}
			}
		}
		return invocationOffset;
	}
	private boolean isIncluded(Position pos, int lineStart, int lineEnd) {
		return (pos != null) && (pos.getOffset() >= lineStart && (pos.getOffset() +  pos.getLength() <= lineEnd));
	}
	/**
	 * Computes and returns the invocation offset given a new
	 * position, the initial offset and the best invocation offset
	 * found so far.
	 * <p>
	 * The closest offset to the left of the initial offset is the
	 * best. If there is no offset on the left, the closest on the
	 * right is the best.</p>
	 */
	private int computeBestOffset(int invocationOffset, Position pos, int initalOffset) {
		int newOffset= pos.offset;
		if (newOffset <= initalOffset && initalOffset <= newOffset + pos.length)
			return initalOffset;
		if (invocationOffset < 0)
			return newOffset;