def __init__(self, executable): self.executable = executable self.name = "addr2line -e " + os.path.basename(self.executable) Console.__init__(self, self.name, on_input=Addr2line.on_input) self.create_link(file_line_re, self.onclick) self.clear() self.write("Backtrace ?") self.enable_input(True) MDI.get(self.name).raise_window()
def show_unused_entities(where, globals_only): """List all unused global entities from WHERE in the locations window""" Editor.register_highlighting("Unused_Entities", "blue") Locations.remove_category("Unused entity") MDI.get("Messages").raise_window() for e in UnusedIterator(where, globals_only=globals_only): Locations.add(category="Unused entity", file=e.declaration().file(), line=e.declaration().line(), column=e.declaration().column(), message="unused entity " + e.name(), highlight="Unused_Entities", length=len(e.name())) Console().write("Done searching for unused entities\n")
def update_project_view_title(t): new_name = Project.root().file().name() new_short_name = Project.root().name() view = MDI.get("Project View") if view is not None: view.rename(new_name, new_short_name) t.remove()
def on_exit(self, process, status, full_output): MDI.get(self.name).raise_window() self.write("\n\nBacktrace ?") self.enable_input(True)