コード例 #1
0
ファイル: addr2line.py プロジェクト: lupine37/gps
 def onclick(self, text):
     matched = re.match(file_line_re, text)
     buffer = EditorBuffer.get(File(matched.group(2)))
     MDI.get_by_child(buffer.current_view()).raise_window()
     line = int(matched.group(3))
     column = matched.group(5)
     if column is not None:
         buffer.current_view().goto(buffer.at(line, int(column)))
     else:
         buffer.current_view().goto(buffer.at(line, 1))
コード例 #2
0
ファイル: gnatpsta.py プロジェクト: ocsobservatory/gps
def on_exit(self, status, remaining_output):
    shutil.rmtree(tmp_dir)

    if status != 0:
        GPS.Console("Messages").write("error: failed to display standard.ads",
                                      mode="error")

    buffer = EditorBuffer.get_new()
    buffer.delete()  # delete any text inserted via templates
    buffer.insert(buffer.at(1, 1), remaining_output)
    buffer.set_lang('ada')
    buffer.current_view().set_read_only(True)
    MDI.get_by_child(buffer.current_view()).rename('package Standard')