protected MarkerAnnotation createMarkerAnnotation(IMarker marker) { if (JavaMarkerAnnotation.isJavaAnnotation(marker)) return new JavaMarkerAnnotation(marker); return new InternalMarkerAnnotation(marker); }
@Override public boolean isProblem() { String type= getType(); return INFO_ANNOTATION_TYPE.equals(type) || WARNING_ANNOTATION_TYPE.equals(type) || ERROR_ANNOTATION_TYPE.equals(type); }
/** * Overlays value with problem annotation. * * @param value the value * @param problemAnnotation the problem annotation */ private void setOverlay(Object value, ProblemAnnotation problemAnnotation) { if (value instanceof JavaMarkerAnnotation) { JavaMarkerAnnotation annotation= (JavaMarkerAnnotation) value; if (annotation.isProblem()) { annotation.setOverlay(problemAnnotation); fPreviouslyOverlaid.remove(annotation); fCurrentlyOverlaid.add(annotation); } } else { } }
/** * Overlays this annotation with the given javaAnnotation. * * @param javaAnnotation annotation that is overlaid by this annotation */ public void setOverlay(IJavaAnnotation javaAnnotation) { if (fOverlay != null) fOverlay.removeOverlaid(this); fOverlay= javaAnnotation; if (!isMarkedDeleted()) markDeleted(fOverlay != null); if (fOverlay != null) fOverlay.addOverlaid(this); }
/** * @see AbstractMarkerAnnotationModel#createMarkerAnnotation(IMarker) */ @Override protected MarkerAnnotation createMarkerAnnotation(IMarker marker) { return new JavaMarkerAnnotation(marker); }
private void removeMarkerOverlays(boolean isCanceled) { if (isCanceled) { fCurrentlyOverlaid.addAll(fPreviouslyOverlaid); } else if (fPreviouslyOverlaid != null) { Iterator e= fPreviouslyOverlaid.iterator(); while (e.hasNext()) { JavaMarkerAnnotation annotation= (JavaMarkerAnnotation) e.next(); annotation.setOverlay(null); } } }
private void testIfProblemMarker(Annotation annotation) { if (fIncludesProblemMarkerAnnotations) { return; } if (annotation instanceof JavaMarkerAnnotation) { fIncludesProblemMarkerAnnotations= ((JavaMarkerAnnotation) annotation).isProblem(); } else if (annotation instanceof MarkerAnnotation) { try { IMarker marker= ((MarkerAnnotation) annotation).getMarker(); if (!marker.exists() || marker.isSubtypeOf(IMarker.PROBLEM)) { fIncludesProblemMarkerAnnotations= true; } } catch (CoreException e) { JavaPlugin.log(e); } } }
/** * Overlays this annotation with the given javaAnnotation. * * @param javaAnnotation annotation that is overlaid by this annotation */ public void setOverlay(IJavaAnnotation javaAnnotation) { if (fOverlay != null) fOverlay.removeOverlaid(this); fOverlay= javaAnnotation; if (!isMarkedDeleted()) markDeleted(fOverlay != null); if (fOverlay != null) fOverlay.addOverlaid(this); }
/** * Overlays value with problem annotation. * * @param value the value * @param problemAnnotation */ private void setOverlay(Object value, ProblemAnnotation problemAnnotation) { if (value instanceof JavaMarkerAnnotation) { JavaMarkerAnnotation annotation= (JavaMarkerAnnotation) value; if (annotation.isProblem()) { annotation.setOverlay(problemAnnotation); fPreviouslyOverlaid.remove(annotation); fCurrentlyOverlaid.add(annotation); } } else { } }
/** * @see AbstractMarkerAnnotationModel#createMarkerAnnotation(IMarker) */ protected MarkerAnnotation createMarkerAnnotation(IMarker marker) { return new JavaMarkerAnnotation(marker); }
private void removeMarkerOverlays(boolean isCanceled) { if (isCanceled) { fCurrentlyOverlaid.addAll(fPreviouslyOverlaid); } else if (fPreviouslyOverlaid != null) { Iterator<JavaMarkerAnnotation> e= fPreviouslyOverlaid.iterator(); while (e.hasNext()) { JavaMarkerAnnotation annotation= e.next(); annotation.setOverlay(null); } } }
private void testIfProblemMarker(Annotation annotation) { if (fIncludesProblemMarkerAnnotations) { return; } if (annotation instanceof JavaMarkerAnnotation) { fIncludesProblemMarkerAnnotations= ((JavaMarkerAnnotation) annotation).isProblem(); } else if (annotation instanceof MarkerAnnotation) { try { IMarker marker= ((MarkerAnnotation) annotation).getMarker(); if (!marker.exists() || marker.isSubtypeOf(IMarker.PROBLEM)) { fIncludesProblemMarkerAnnotations= true; } } catch (CoreException e) { JavaPlugin.log(e); } } }
@Override protected MarkerAnnotation createMarkerAnnotation(IMarker marker) { if (JavaMarkerAnnotation.isJavaAnnotation(marker)) return new JavaMarkerAnnotation(marker); return super.createMarkerAnnotation(marker); }
/** * Overlays this annotation with the given javaAnnotation. * * @param javaAnnotation annotation that is overlaid by this annotation */ public void setOverlay(IJavaAnnotation javaAnnotation) { if (fOverlay != null) fOverlay.removeOverlaid(this); fOverlay= javaAnnotation; if (!isMarkedDeleted()) markDeleted(fOverlay != null); if (fOverlay != null) fOverlay.addOverlaid(this); }
/** * Overlays value with problem annotation. * * @param value the value * @param problemAnnotation the problem annotation */ private void setOverlay(Object value, ProblemAnnotation problemAnnotation) { if (value instanceof JavaMarkerAnnotation) { JavaMarkerAnnotation annotation= (JavaMarkerAnnotation) value; if (annotation.isProblem()) { annotation.setOverlay(problemAnnotation); fPreviouslyOverlaid.remove(annotation); fCurrentlyOverlaid.add(annotation); } } else { } }