#NEWLINE# def run( self , list_mode ) : #NEWLINE# #INDENT# self . open_files = [ ] #NEWLINE# self . open_views = [ ] #NEWLINE# self . window = sublime . active_window ( ) #NEWLINE# self . settings = sublime . load_settings ( 'ExtendedSwitcher.sublime-settings' ) #NEWLINE# folders = self . window . folders ( ) #NEWLINE# for f in self . getViews ( list_mode ) : #NEWLINE# #INDENT# if ( self . settings . get ( 'skip_current_file' ) == True ) : #NEWLINE# #INDENT# if ( f . id ( ) == self . window . active_view ( ) . id ( ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# self . open_views . append ( f ) #NEWLINE# file_name = f . file_name ( ) #NEWLINE# file_path = '' #NEWLINE# if file_name : #NEWLINE# #INDENT# for folder in folders : #NEWLINE# #INDENT# if ( os . path . commonprefix ( [ folder , file_name ] ) == folder ) : #NEWLINE# #INDENT# file_path = os . path . relpath ( file_name , folder ) #NEWLINE# #UNINDENT# #UNINDENT# if f . is_dirty ( ) : #NEWLINE# #INDENT# file_name += self . settings . get ( 'mark_dirty_file_char' ) #NEWLINE# #UNINDENT# if ( self . settings . get ( 'show_full_file_path' ) == True ) : #NEWLINE# #INDENT# self . open_files . append ( [ os . path . basename ( file_name ) , file_path ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . open_files . append ( [ os . path . basename ( file_name ) , '' ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if f . name ( ) : #NEWLINE# #INDENT# if f . is_dirty ( ) : #NEWLINE# #INDENT# self . open_files . append ( [ ( f . name ( ) + self . settings . get ( 'mark_dirty_file_char' ) ) , '' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . open_files . append ( [ f . name ( ) , '' ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if f . is_dirty ( ) : #NEWLINE# #INDENT# self . open_files . append ( [ ( 'Untitled' + self . settings . get ( 'mark_dirty_file_char' ) ) , '' ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . open_files . append ( [ 'Untitled' , '' ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# if ( self . check_for_sorting ( ) == True ) : #NEWLINE# #INDENT# self . sort_files ( ) #NEWLINE# #UNINDENT# self . window . show_quick_panel ( self . open_files , self . tab_selected , False , ( - 1 ) )