@Override public boolean canFix(Annotation annotation) { return hasCorrections(annotation); }
private boolean isQuickFixTarget(Annotation a) { return JavaCorrectionProcessor.hasCorrections(a) || a instanceof AssistAnnotation; }
private boolean isQuickFixTarget(Annotation a) { return JavaCorrectionProcessor.hasCorrections(a) || a instanceof AssistAnnotation; }
@Override public boolean canFix(Annotation annotation) { return hasCorrections(annotation); }
private boolean isQuickFixTarget(Annotation a) { return JavaCorrectionProcessor.hasCorrections(a) || a instanceof AssistAnnotation; }
public boolean canFix(Annotation annotation) { return hasCorrections(annotation); }
private boolean showQuickFix(IJavaAnnotation annotation) { return fShowQuickFixIcon && annotation.isProblem() && JavaCorrectionProcessor.hasCorrections((Annotation) annotation); }
private boolean showQuickFix(IJavaAnnotation annotation) { return fShowQuickFixIcon && annotation.isProblem() && JavaCorrectionProcessor.hasCorrections((Annotation) annotation); }
private boolean showQuickFix(IJavaAnnotation annotation) { return fShowQuickFixIcon && annotation.isProblem() && JavaCorrectionProcessor.hasCorrections((Annotation) annotation); }
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; }
public static boolean hasCorrections(Annotation annotation) { if (annotation instanceof IJavaAnnotation) { IJavaAnnotation javaAnnotation= (IJavaAnnotation) annotation; int problemId= javaAnnotation.getId(); if (problemId != -1) { ICompilationUnit cu= javaAnnotation.getCompilationUnit(); if (cu != null) { return hasCorrections(cu, problemId, javaAnnotation.getMarkerType()); } } } if (annotation instanceof SimpleMarkerAnnotation) { return hasCorrections(((SimpleMarkerAnnotation) annotation).getMarker()); } return false; }
public static boolean hasCorrections(Annotation annotation) { if (annotation instanceof IJavaAnnotation) { IJavaAnnotation javaAnnotation= (IJavaAnnotation) annotation; int problemId= javaAnnotation.getId(); if (problemId != -1) { ICompilationUnit cu= javaAnnotation.getCompilationUnit(); if (cu != null) { return hasCorrections(cu, problemId, javaAnnotation.getMarkerType()); } } } if (annotation instanceof SimpleMarkerAnnotation) { return hasCorrections(((SimpleMarkerAnnotation) annotation).getMarker()); } return false; }
public static boolean hasCorrections(Annotation annotation) { if (annotation instanceof IJavaAnnotation) { IJavaAnnotation javaAnnotation= (IJavaAnnotation) annotation; int problemId= javaAnnotation.getId(); if (problemId != -1) { ICompilationUnit cu= javaAnnotation.getCompilationUnit(); if (cu != null) { return hasCorrections(cu, problemId, javaAnnotation.getMarkerType()); } } } if (annotation instanceof SimpleMarkerAnnotation) { return hasCorrections(((SimpleMarkerAnnotation) annotation).getMarker()); } return false; }
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 boolean internalHasResolutions(IMarker marker) { int id= marker.getAttribute(IJavaModelMarker.ID, -1); ICompilationUnit cu= getCompilationUnit(marker); return cu != null && JavaCorrectionProcessor.hasCorrections(cu, id, MarkerUtilities.getMarkerType(marker)); }
private static boolean internalHasResolutions(IMarker marker) { int id= marker.getAttribute(IJavaModelMarker.ID, -1); ICompilationUnit cu= getCompilationUnit(marker); return cu != null && JavaCorrectionProcessor.hasCorrections(cu, id, MarkerUtilities.getMarkerType(marker)); }
private static boolean internalHasResolutions(IMarker marker) { int id= marker.getAttribute(IJavaModelMarker.ID, -1); ICompilationUnit cu= getCompilationUnit(marker); return cu != null && JavaCorrectionProcessor.hasCorrections(cu, id, MarkerUtilities.getMarkerType(marker)); }
private boolean isIncluded(IJavaAnnotation annotation, boolean showTemporaryProblems) { // XXX: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=138601 if (annotation instanceof ProblemAnnotation && JavaMarkerAnnotation.TASK_ANNOTATION_TYPE.equals(annotation.getType())) return false; if (!annotation.isProblem()) return true; if (annotation.isMarkedDeleted() && !annotation.hasOverlay()) return true; if (annotation.hasOverlay() && !annotation.isMarkedDeleted()) return true; if (annotation.hasOverlay()) return (!isIncluded(annotation.getOverlay(), showTemporaryProblems)); return showTemporaryProblems && JavaCorrectionProcessor.hasCorrections((Annotation)annotation); }
private boolean isIncluded(IJavaAnnotation annotation, boolean showTemporaryProblems) { // XXX: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=138601 if (annotation instanceof ProblemAnnotation && JavaMarkerAnnotation.TASK_ANNOTATION_TYPE.equals(annotation.getType())) return false; if (!annotation.isProblem()) return true; if (annotation.isMarkedDeleted() && !annotation.hasOverlay()) return true; if (annotation.hasOverlay() && !annotation.isMarkedDeleted()) return true; if (annotation.hasOverlay()) return (!isIncluded(annotation.getOverlay(), showTemporaryProblems)); return showTemporaryProblems && JavaCorrectionProcessor.hasCorrections((Annotation)annotation); }
private boolean isIncluded(IJavaAnnotation annotation, boolean showTemporaryProblems) { // XXX: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=138601 if (annotation instanceof ProblemAnnotation && JavaMarkerAnnotation.TASK_ANNOTATION_TYPE.equals(annotation.getType())) return false; if (!annotation.isProblem()) return true; if (annotation.isMarkedDeleted() && !annotation.hasOverlay()) return true; if (annotation.hasOverlay() && !annotation.isMarkedDeleted()) return true; if (annotation.hasOverlay()) return (!isIncluded(annotation.getOverlay(), showTemporaryProblems)); return showTemporaryProblems && JavaCorrectionProcessor.hasCorrections((Annotation)annotation); }