private static void printSyntacticMarkers ( PrintStream output , Collection < Path . Entry < ? > > sources , SyntacticItem . Marker marker ) { // Path . Entry < ? > source = getSourceEntry ( sources , marker . getSource ( ) ) ; // Span span = marker . getTarget ( ) . getAncestor ( AbstractCompilationUnit . Attribute . Span . class ) ; // Read the enclosing line so we can print it EnclosingLine line = readEnclosingLine ( source , span ) ; // Sanity check we found it if ( line != null ) { // print the error message output . println ( source . location ( ) + ":" + line . lineNumber + ": " + marker . getMessage ( ) ) ; // Finally print the line highlight printLineHighlight ( output , line ) ; } else { output . println ( source . location ( ) + ":?: " + marker . getMessage ( ) ) ; } }
Print out an individual syntactic markers .