<s> from sublime import Region <EOL> from threading import Thread <EOL> from . line import Line <EOL> class File ( ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , view , action = '<STR_LIT>' ) : <EOL> self . view = view <EOL> self . id = self . view . buffer_id ( ) <EOL> self . action = action <EOL> self . scan ( ) <EOL> def scan ( self ) : <EOL> """<STR_LIT>""" <EOL> if self . action == '<STR_LIT>' : <EOL> regions = [ self . view . line ( s ) for s in self . view . sel ( ) ] <EOL> else : <EOL> regions = self . view . lines ( Region ( <NUM_LIT:0> , self . view . size ( ) ) ) <EOL> for region in regions : <EOL> line = Line ( self . view , region , self . id ) <EOL> if line . has_color ( ) : <EOL> line . add_region ( ) <EOL> else : <EOL> try : <EOL> self . view . erase_regions ( "<STR_LIT>" % region . a ) <EOL> except : <EOL> pass </s>
