def run(self, edit, caller=None): project_dir = self.view.window().folders()[0] ctags_file_path = os.path.join(project_dir, setting('ctags_file')) if not os.path.isfile(ctags_file_path): sublime.status_message("There's no ctags file for ClassHierarchy. Please check the settings or build the file with 'rebuild_hierarchy_ctags' command.") return global is_hierarchy_tree_in_loading if is_busy(): return is_hierarchy_tree_in_loading = True unload_hierarchy_tree(project_dir) sublime.status_message("Re/Loading hierarchy tree... Please be patient.") thread = ReloadHierarchyTreeThread(project_dir, ctags_file_path) if caller: if caller['symbol']: did_finished = lambda: self.view.run_command(to_underscore(caller['name']), {'symbol': caller['symbol'], 'window': caller['window']}) else: did_finished = lambda: self.view.run_command(to_underscore(caller['name']), {'no_symbol': True, 'window': caller['window']}) else: did_finished = lambda: sublime.status_message("Re/Loading hierarchy tree is finished!") thread.start() sublime.set_timeout(lambda: check_if_thread_finished(thread, did_finished), 500)
def selected(index): if index > 0: symbol = class_panel_list[index][0] self.view.run_command(to_underscore(self.__class__.__name__), { 'symbol': symbol, 'window': self.window })
def run(self, edit, caller=None): project_dir = self.view.window().folders()[0] ctags_file_path = os.path.join(project_dir, setting('ctags_file')) if not os.path.isfile(ctags_file_path): sublime.status_message( "There's no ctags file for ClassHierarchy. Please check the settings or build the file with 'rebuild_hierarchy_ctags' command." ) return global is_hierarchy_tree_in_loading if is_busy(): return is_hierarchy_tree_in_loading = True unload_hierarchy_tree(project_dir) sublime.status_message( "Re/Loading hierarchy tree... Please be patient.") thread = ReloadHierarchyTreeThread(project_dir, ctags_file_path) if caller: if caller['symbol']: did_finished = lambda: self.view.run_command( to_underscore(caller['name']), { 'symbol': caller['symbol'], 'window': caller['window'] }) else: did_finished = lambda: self.view.run_command( to_underscore(caller['name']), { 'no_symbol': True, 'window': caller['window'] }) else: did_finished = lambda: sublime.status_message( "Re/Loading hierarchy tree is finished!") thread.start() sublime.set_timeout( lambda: check_if_thread_finished(thread, did_finished), 500)
def selected(index): if index > 0: symbol = class_panel_list[index][0] self.view.run_command(to_underscore(self.__class__.__name__), {'symbol': symbol, 'window': self.window})