final int endOfDocument = document.getLength();
int distance = Integer.MAX_VALUE;
final IAnnotationModel model = editor.getDocumentProvider().getAnnotationModel(
editor.getEditorInput());
final Iterator<Annotation> e = new ErlangAnnotationIterator(model, true, true);
while (e.hasNext()) {
final Annotation a = e.next();
if (a instanceof IErlangAnnotation && ((IErlangAnnotation) a).hasOverlay()
|| !isNavigationTarget(a)) {
continue;
}