#NEWLINE# def on_done( self , text , history = True ) : #NEWLINE# #INDENT# parser = Parser ( ) #NEWLINE# result = parser . parse ( text ) #NEWLINE# if ( result and ( 'command' in result ) ) : #NEWLINE# #INDENT# result [ 'text' ] = text #NEWLINE# if history : #NEWLINE# #INDENT# self . history . append ( data = result , label = text ) #NEWLINE# #UNINDENT# command = result [ 'command' ] #NEWLINE# args = ( command [ 'args' ] if ( 'args' in result ) else None ) #NEWLINE# if ( ( 'context' in result ) and ( result [ 'context' ] == 'view' ) ) : #NEWLINE# #INDENT# self . window . active_view ( ) . run_command ( command , args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . window . run_command ( command , args )