#NEWLINE# def generate( self ) : #NEWLINE# #INDENT# self . error_list = [ ] #NEWLINE# region_set = [ ] #NEWLINE# self . error_lines = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( shell_command , report , icon ) in self . checkstyle_reports : #NEWLINE# #INDENT# self . view . erase_regions ( 'checkstyle' ) #NEWLINE# self . view . erase_regions ( shell_command ) #NEWLINE# debug_message ( ( ( ( shell_command + ' found ' ) + str ( len ( report ) ) ) + ' errors' ) ) #NEWLINE# for error in report : #NEWLINE# #INDENT# line = int ( error . get_line ( ) ) #NEWLINE# pt = self . view . text_point ( ( line - 1 ) , 0 ) #NEWLINE# region_line = self . view . line ( pt ) #NEWLINE# region_set . append ( region_line ) #NEWLINE# self . error_list . append ( ( ( ( '(' + str ( line ) ) + ') ' ) + error . get_message ( ) ) ) #NEWLINE# error . set_point ( pt ) #NEWLINE# self . report . append ( error ) #NEWLINE# self . error_lines [ line ] = error . get_message ( ) #NEWLINE# #UNINDENT# if ( len ( error . error_list ) > 0 ) : #NEWLINE# #INDENT# icon = ( icon if pref . phpcs_show_gutter_marks else '' ) #NEWLINE# outline = ( sublime . DRAW_OUTLINED if pref . phpcs_outline_for_errors else sublime . HIDDEN ) #NEWLINE# if ( pref . phpcs_show_gutter_marks or pref . phpcs_outline_for_errors ) : #NEWLINE# #INDENT# if ( pref . phpcs_icon_scope_color == None ) : #NEWLINE# #INDENT# debug_message ( 'WARN: phpcs_icon_scope_color is not defined, so resorting to phpcs colour scope' ) #NEWLINE# pref . phpcs_icon_scope_color = 'phpcs' #NEWLINE# #UNINDENT# self . view . add_regions ( shell_command , region_set , pref . phpcs_icon_scope_color , icon , outline ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( pref . phpcs_show_quick_panel == True ) : #NEWLINE# #INDENT# if ( ( self . event == 'on_save' ) and ( not pref . phpcs_show_errors_on_save ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . show_quick_panel ( )