private int getImageType(IJavaAnnotation annotation) { int imageType= NO_IMAGE; if (annotation.hasOverlay()) imageType= OVERLAY_IMAGE; else if (!annotation.isMarkedDeleted()) { if (showQuickFix(annotation)) imageType= JavaMarkerAnnotation.ERROR_ANNOTATION_TYPE.equals(annotation.getType()) ? QUICKFIX_ERROR_IMAGE : QUICKFIX_IMAGE; } else { imageType= GRAY_IMAGE; } return imageType; }
private int getImageType(IJavaAnnotation annotation) { int imageType= NO_IMAGE; if (annotation.hasOverlay()) imageType= OVERLAY_IMAGE; else if (!annotation.isMarkedDeleted()) { if (showQuickFix(annotation)) { if (JavaMarkerAnnotation.ERROR_ANNOTATION_TYPE.equals(annotation.getType())) { imageType= QUICKFIX_ERROR_IMAGE; } else if (JavaMarkerAnnotation.WARNING_ANNOTATION_TYPE.equals(annotation.getType())) { imageType= QUICKFIX_WARNING_IMAGE; } else { imageType= QUICKFIX_INFO_IMAGE; } } } else { imageType= GRAY_IMAGE; } return imageType; }
private int getImageType(IJavaAnnotation annotation) { int imageType= NO_IMAGE; if (annotation.hasOverlay()) imageType= OVERLAY_IMAGE; else if (!annotation.isMarkedDeleted()) { if (showQuickFix(annotation)) { if (JavaMarkerAnnotation.ERROR_ANNOTATION_TYPE.equals(annotation.getType())) { imageType= QUICKFIX_ERROR_IMAGE; } else if (JavaMarkerAnnotation.WARNING_ANNOTATION_TYPE.equals(annotation.getType())) { imageType= QUICKFIX_WARNING_IMAGE; } else { imageType= QUICKFIX_INFO_IMAGE; } } } else { imageType= GRAY_IMAGE; } return imageType; }
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 containsRelevantMarkers(IEditorPart editor) { IAnnotationModel model= JavaUI.getDocumentProvider().getAnnotationModel(editor.getEditorInput()); Iterator<Annotation> iterator= model.getAnnotationIterator(); while (iterator.hasNext()) { Annotation element= iterator.next(); if (element instanceof IJavaAnnotation) { IJavaAnnotation annot= (IJavaAnnotation) element; if (!annot.isMarkedDeleted() && annot.isPersistent() && !annot.isProblem()) return true; } } return false; }
private boolean containsRelevantMarkers(IEditorPart editor) { IAnnotationModel model= JavaUI.getDocumentProvider().getAnnotationModel(editor.getEditorInput()); Iterator iterator= model.getAnnotationIterator(); while (iterator.hasNext()) { Object element= iterator.next(); if (element instanceof IJavaAnnotation) { IJavaAnnotation annot= (IJavaAnnotation) element; if (!annot.isMarkedDeleted() && annot.isPersistent() && !annot.isProblem()) return true; } } return false; }
private boolean containsRelevantMarkers(IEditorPart editor) { IAnnotationModel model= JavaUI.getDocumentProvider().getAnnotationModel(editor.getEditorInput()); Iterator<Annotation> iterator= model.getAnnotationIterator(); while (iterator.hasNext()) { Annotation element= iterator.next(); if (element instanceof IJavaAnnotation) { IJavaAnnotation annot= (IJavaAnnotation) element; if (!annot.isMarkedDeleted() && annot.isPersistent() && !annot.isProblem()) return true; } } return false; }
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); }