/** * Returns all markers which include the ruler's line of activity. * * @return all a list of markers which include the ruler's line of activity */ protected List getMarkers() { List markers= new ArrayList(); IResource resource= getResource(); IDocument document= getDocument(); AbstractMarkerAnnotationModel model= getAnnotationModel(); if (resource != null && model != null && resource.exists()) { try { IMarker[] allMarkers= resource.findMarkers(fMarkerType, true, IResource.DEPTH_ZERO); if (allMarkers != null) { for (int i= 0; i < allMarkers.length; i++) { if (includesRulerLine(model.getMarkerPosition(allMarkers[i]), document)) { markers.add(allMarkers[i]); } } } } catch (CoreException x) { handleCoreException(x, TextEditorMessages.MarkerRulerAction_getMarker); } } return markers; }
/** * Returns all markers which include the ruler's line of activity. * * @return all a list of markers which include the ruler's line of activity */ protected List<IMarker> getMarkers() { List<IMarker> markers= new ArrayList<>(); IResource resource= getResource(); IDocument document= getDocument(); AbstractMarkerAnnotationModel model= getAnnotationModel(); if (resource != null && model != null && resource.exists()) { try { IMarker[] allMarkers= resource.findMarkers(fMarkerType, true, IResource.DEPTH_ZERO); if (allMarkers != null) { for (int i= 0; i < allMarkers.length; i++) { if (includesRulerLine(model.getMarkerPosition(allMarkers[i]), document)) { markers.add(allMarkers[i]); } } } } catch (CoreException x) { handleCoreException(x, TextEditorMessages.MarkerRulerAction_getMarker); } } return markers; }