protected void obtainFindBugsMarkers ( ) { // Delete old markers markers . clear ( ) ; if ( editor == null || ruler == null ) { return ; } // Obtain all markers in the editor IResource resource = ( IResource ) editor . getEditorInput ( ) . getAdapter ( IFile . class ) ; if ( resource == null ) { return ; } IMarker [ ] allMarkers = MarkerUtil . getMarkers ( resource , IResource . DEPTH_ZERO ) ; if ( allMarkers . length == 0 ) { return ; } // Discover relevant markers, i.e. FindBugsMarkers AbstractMarkerAnnotationModel model = getModel ( ) ; IDocument document = getDocument ( ) ; for ( int i = 0 ; i < allMarkers . length ; i ++ ) { if ( includesRulerLine ( model . getMarkerPosition ( allMarkers [ i ] ) , document ) ) { if ( MarkerUtil . isFindBugsMarker ( allMarkers [ i ] ) ) { markers . add ( allMarkers [ i ] ) ; } } } }
Fills markers field with all of the FindBugs markers associated with the current line in the text editor s ruler marign .