def load_messages(tool): """Read messages that apply to 'tool'. 'tool' -- A string giving the name of a QM tool.""" # Load diagnostics. diagnostic_file = qm.get_share_directory('messages', 'diagnostics.txt') get_diagnostic_set().ReadFromFile(diagnostic_file) # Load help messages. diagnostic_file = qm.get_share_directory('messages', 'help.txt') get_help_set().ReadFromFile(diagnostic_file)
def get_help_set(): """Return the 'DiagnosticSet' for help messages. returns -- The 'DiagnosticSet' containing help messages.""" global __help_set if __help_set is None: __help_set = DiagnosticSet() __help_set.ReadFromFile(qm.get_share_directory("diagnostics", "common-help.txt")) return __help_set
def get_diagnostic_set(): """Return the 'DiagnosticSet' containing warning/error messages. returns -- The 'DiagnosticSet' containing warning/error messages.""" global __diagnostic_set if __diagnostic_set is None: __diagnostic_set = DiagnosticSet() __diagnostic_set.ReadFromFile(qm.get_share_directory("diagnostics", "common.txt")) return __diagnostic_set
def get_help_set(): """Return the 'DiagnosticSet' for help messages. returns -- The 'DiagnosticSet' containing help messages.""" global __help_set if __help_set is None: __help_set = DiagnosticSet() __help_set.ReadFromFile( qm.get_share_directory("diagnostics", "common-help.txt")) return __help_set
def get_diagnostic_set(): """Return the 'DiagnosticSet' containing warning/error messages. returns -- The 'DiagnosticSet' containing warning/error messages.""" global __diagnostic_set if __diagnostic_set is None: __diagnostic_set = DiagnosticSet() __diagnostic_set.ReadFromFile( qm.get_share_directory("diagnostics", "common.txt")) return __diagnostic_set
def load_messages(tool): """Read messages that apply to 'tool'. 'tool' -- A string giving the name of a QM tool.""" # Load diagnostics. if not qm.common.is_installed: diagnostic_file \ = qm.get_share_directory("..", "qm", tool, "share", "messages", "diagnostics.txt") else: diagnostic_file \ = qm.get_share_directory("messages", tool, "diagnostics.txt") get_diagnostic_set().ReadFromFile(diagnostic_file) # Load help messages. if not qm.common.is_installed: diagnostic_file \ = qm.get_share_directory("..", "qm", tool, "share", "messages", "help.txt") else: diagnostic_file \ = qm.get_share_directory("messages", tool, "help.txt") get_help_set().ReadFromFile(diagnostic_file)