#NEWLINE# def run_server_app( self , file_name , working_dir , action ) : #NEWLINE# #INDENT# if ( action == 'secondary' ) : #NEWLINE# #INDENT# self . panel = OutputPanel ( 'dart.out' ) #NEWLINE# self . panel . write ( ( '=' * 80 ) ) #NEWLINE# self . panel . write ( '\n' ) #NEWLINE# self . panel . write ( 'Running dart with Observatory.\n' ) #NEWLINE# self . panel . write ( ( '=' * 80 ) ) #NEWLINE# self . panel . write ( '\n' ) #NEWLINE# self . panel . show ( ) #NEWLINE# DartRunFileCommand . observatory = RunDartWithObservatory ( file_name , cwd = working_dir , listener = self ) #NEWLINE# DartRunFileCommand . observatory . start ( ) #NEWLINE# def start_dartium( ) : #NEWLINE# #INDENT# d = Dartium ( ) #NEWLINE# port = DartRunFileCommand . observatory . port #NEWLINE# if ( port is None ) : #NEWLINE# #INDENT# _logger . debug ( 'could not capture observatory port' ) #NEWLINE# print ( "Dart: Cannot start Observatory because its port couldn't be retrieved" ) #NEWLINE# return #NEWLINE# #UNINDENT# d . start ( 'http://localhost:{}' . format ( port ) ) #NEWLINE# #UNINDENT# after ( 1000 , ( lambda : start_dartium ( ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# preamble = '* Running {0}\n* (output starts below the next line)\n==============================================================================\n' #NEWLINE# self . execute ( cmd = [ SDK ( ) . path_to_dart , '--checked' , file_name ] , working_dir = action , file_regex = "'file:///(.+)': error: line (\\d+) pos (\\d+): (.*)$" , preamble = preamble . format ( file_name ) ) #NEWLINE# DartRunFileCommand . is_script_running = True