<s> import inspect <EOL> import sys <EOL> import traceback <EOL> from robotide import utils <EOL> from . import messagetype <EOL> from . import publisher <EOL> class RideMessage ( object ) : <EOL> """<STR_LIT>""" <EOL> __metaclass__ = messagetype . messagetype <EOL> topic = None <EOL> data = [ ] <EOL> def __init__ ( self , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> if sorted ( kwargs . keys ( ) ) != sorted ( self . data ) : <EOL> raise TypeError ( '<STR_LIT>' % self . data ) <EOL> self . __dict__ . update ( kwargs ) <EOL> def publish ( self ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> self . _publish ( self ) <EOL> except Exception , err : <EOL> self . _publish ( RideLogException ( message = '<STR_LIT>' + str ( err ) , <EOL> exception = err , level = '<STR_LIT>' ) ) <EOL> def _publish ( self , msg ) : <EOL> publisher . PUBLISHER . publish ( msg . topic , msg ) <EOL> class RideLog ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:message>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideLogMessage ( RideLog ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:message>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> def __init__ ( self , message , level = '<STR_LIT>' , notify_user = False ) : <EOL> """<STR_LIT>""" <EOL> RideMessage . __init__ ( <EOL> self , message = message , level = level , <EOL> timestamp = utils . get_timestamp ( ) , notify_user = notify_user ) <EOL> class RideLogException ( RideLog ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:message>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> def __init__ ( self , message , exception , level = '<STR_LIT>' , notify_user = False ) : <EOL> """<STR_LIT>""" <EOL> exc_type , exc_value , exc_traceback = sys . exc_info ( ) <EOL> if exc_traceback : <EOL> tb = traceback . extract_tb ( exc_traceback ) <EOL> message += '<STR_LIT>' % ( unicode ( exception ) , '<STR_LIT>' . join ( traceback . format_list ( tb ) ) ) <EOL> RideMessage . __init__ ( <EOL> self , message = message , level = level , notify_user = False , <EOL> timestamp = utils . get_timestamp ( ) , exception = exception ) <EOL> class RideInputValidationError ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:message>' ] <EOL> class RideModificationPrevented ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideSettingsChanged ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideExecuteSpecXmlImport ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> class RideTreeSelection ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideOpenVariableDialog ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideTestExecutionStarted ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideTestSelectedForRunningChanged ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideTestRunning ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideTestPassed ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideTestFailed ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideNotebookTabChanging ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideNotebookTabChanged ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> class RideSaving ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:path>' , '<STR_LIT>' ] <EOL> class RideSaved ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:path>' ] <EOL> class RideSaveAll ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> class RideDataDirtyCleared ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideNewProject ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:path>' , '<STR_LIT>' ] <EOL> class RideClosing ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class RideOpenSuite ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:path>' , '<STR_LIT>' ] <EOL> class RideOpenResource ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT:path>' , '<STR_LIT>' ] <EOL> class RideSelectResource ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideDataChanged ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> class RideFileNameChanged ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideDataFileRemoved ( RideDataChanged ) : <EOL> data = [ '<STR_LIT:path>' , '<STR_LIT>' ] <EOL> class RideSuiteAdded ( RideDataChanged ) : <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideInitFileRemoved ( RideDataChanged ) : <EOL> data = [ '<STR_LIT:path>' , '<STR_LIT>' ] <EOL> class RideImportSetting ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:type>' , '<STR_LIT>' ] <EOL> def is_resource ( self ) : <EOL> return self . type == '<STR_LIT>' <EOL> @ property <EOL> def name ( self ) : <EOL> return self . import_controller . name <EOL> class _RideExcludes ( RideMessage ) : <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideIncludesChanged ( _RideExcludes ) : <EOL> pass <EOL> class RideExcludesChanged ( _RideExcludes ) : <EOL> pass <EOL> class RideImportSettingAdded ( RideImportSetting ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class RideImportSettingChanged ( RideImportSetting ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class RideImportSettingRemoved ( RideImportSetting ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class RideDataChangedToDirty ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideDataFileSet ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideUserKeyword ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> class RideUserKeywordAdded ( RideUserKeyword ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> class RideUserKeywordRemoved ( RideUserKeyword ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> class RideItem ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideItemStepsChanged ( RideItem ) : <EOL> """<STR_LIT>""" <EOL> class RideItemNameChanged ( RideItem ) : <EOL> """<STR_LIT>""" <EOL> class RideItemSettingsChanged ( RideItem ) : <EOL> """<STR_LIT>""" <EOL> class RideTestCaseAdded ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> class RideTestCaseRemoved ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> class RideItemMovedUp ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideItemMovedDown ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideVariableAdded ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' , '<STR_LIT:index>' ] <EOL> class RideVariableRemoved ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> class RideVariableMovedUp ( RideItemMovedUp ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideVariableMovedDown ( RideItemMovedDown ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> class RideVariableUpdated ( RideDataChanged ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' ] <EOL> class RideOpenTagSearch ( RideMessage ) : <EOL> """<STR_LIT>""" <EOL> data = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> __all__ = [ name for name , cls in globals ( ) . items ( ) <EOL> if inspect . isclass ( cls ) and issubclass ( cls , RideMessage ) ] </s>
