private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset) { int posBegin= pos.offset; int posEnd= posBegin + pos.length; if (isInside(invocationLocation, posBegin, posEnd)) { // covers invocation location? return invocationLocation; } else if (bestOffset != invocationLocation) { int newClosestPosition= computeBestOffset(posBegin, invocationLocation, bestOffset); if (newClosestPosition != -1) { if (newClosestPosition != bestOffset) { // new best if (JavaCorrectionProcessor.hasCorrections(annot)) { // only jump to it if there are proposals return newClosestPosition; } } } } return bestOffset; }
private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset) { int posBegin= pos.offset; int posEnd= posBegin + pos.length; if (isInside(invocationLocation, posBegin, posEnd) && JavaCorrectionProcessor.hasCorrections(annot)) { // covers invocation location? return invocationLocation; } else if (bestOffset != invocationLocation) { int newClosestPosition= computeBestOffset(posBegin, invocationLocation, bestOffset); if (newClosestPosition != -1) { if (newClosestPosition != bestOffset) { // new best if (JavaCorrectionProcessor.hasCorrections(annot)) { // only jump to it if there are proposals return newClosestPosition; } } } } return bestOffset; }
private static int processAnnotation(Annotation annot, Position pos, int invocationLocation, int bestOffset) { int posBegin= pos.offset; int posEnd= posBegin + pos.length; if (isInside(invocationLocation, posBegin, posEnd) && JavaCorrectionProcessor.hasCorrections(annot)) { // covers invocation location? return invocationLocation; } else if (bestOffset != invocationLocation) { int newClosestPosition= computeBestOffset(posBegin, invocationLocation, bestOffset); if (newClosestPosition != -1) { if (newClosestPosition != bestOffset) { // new best if (JavaCorrectionProcessor.hasCorrections(annot)) { // only jump to it if there are proposals return newClosestPosition; } } } } return bestOffset; }
if (JavaCorrectionProcessor.isQuickFixableType(annot)) { Position pos= model.getPosition(annot); if (pos != null && isInside(pos.offset, rangeStart, rangeEnd)) { // inside our range? allAnnotations.add(annot); allPositions.add(pos); if (isInside(bestOffset, pos.offset, pos.offset + pos.length)) { resultingAnnotations.add(allAnnotations.get(i)); if (JavaCorrectionProcessor.isQuickFixableType(annot)) { Position pos= model.getPosition(annot); if (pos != null && isInside(invocationLocation, pos.offset, pos.offset + pos.length)) { resultingAnnotations.add(annot);
if (JavaCorrectionProcessor.isQuickFixableType(annot)) { Position pos= model.getPosition(annot); if (pos != null && isInside(pos.offset, rangeStart, rangeEnd)) { // inside our range? allAnnotations.add(annot); allPositions.add(pos); if (isInside(bestOffset, pos.offset, pos.offset + pos.length)) { resultingAnnotations.add(allAnnotations.get(i)); if (JavaCorrectionProcessor.isQuickFixableType(annot)) { Position pos= model.getPosition(annot); if (pos != null && isInside(invocationLocation, pos.offset, pos.offset + pos.length)) { resultingAnnotations.add(annot);
if (JavaCorrectionProcessor.isQuickFixableType(annot)) { Position pos= model.getPosition(annot); if (pos != null && isInside(pos.offset, rangeStart, rangeEnd)) { // inside our range? allAnnotations.add(annot); allPositions.add(pos); if (isInside(bestOffset, pos.offset, pos.offset + pos.length)) { resultingAnnotations.add(allAnnotations.get(i)); if (JavaCorrectionProcessor.isQuickFixableType(annot)) { Position pos= model.getPosition(annot); if (pos != null && isInside(invocationLocation, pos.offset, pos.offset + pos.length)) { resultingAnnotations.add(annot);