def jumpToCode(fileName, line): """Jumps to the source code""" editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile(fileName, line) editor = editorsManager.currentWidget().getEditor() editor.gotoLine(line) editorsManager.currentWidget().setFocus()
def jumpToCode( self, fileName, line ): " Jumps to the source code " editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile( fileName, line ) editor = editorsManager.currentWidget().getEditor() editor.gotoLine( line ) editorsManager.currentWidget().setFocus() return
def __onJumpToCode(self): """Jumps to the corresponding source code line""" if self.__currentItem is not None: if self.__currentItem.getType() == STACK_FRAME_ITEM: fileName = self.__currentItem.getFileName() if '<' not in fileName and '>' not in fileName: lineNumber = self.__currentItem.getLineNumber() editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile(fileName, lineNumber) editor = editorsManager.currentWidget().getEditor() editor.gotoLine(lineNumber) editorsManager.currentWidget().setFocus()
def __onFrameDoubleClicked( self, item, column ): " Triggered when a frame is double clicked " # The frame has been switched already because the double click # signal always comes after the single click one fileName = item.getFilename() lineNumber = item.getLineNumber() editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile( fileName, lineNumber ) editor = editorsManager.currentWidget().getEditor() editor.gotoLine( lineNumber ) editorsManager.currentWidget().setFocus() return
def __onFrameDoubleClicked(self, item, column): """Triggered when a frame is double clicked""" del column # unused argument # The frame has been switched already because the double click # signal always comes after the single click one fileName = item.getFilename() lineNumber = item.getLineNumber() editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile(fileName, lineNumber) editor = editorsManager.currentWidget().getEditor() editor.gotoLine(lineNumber) editorsManager.currentWidget().setFocus()
def __onJumpToCode( self ): " Jumps to the corresponding source code line " if self.__currentItem is not None: if self.__currentItem.getType() == STACK_FRAME_ITEM: fileName = self.__currentItem.getFileName() if '<' not in fileName and '>' not in fileName: lineNumber = self.__currentItem.getLineNumber() editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile( fileName, lineNumber ) editor = editorsManager.currentWidget().getEditor() editor.gotoLine( lineNumber ) editorsManager.currentWidget().setFocus() return
def __itemActivated(self, item, column): """Double click on the item""" if item is not None and column > 0: columnStr = item.text(column) if self.__entryRe.exactMatch(columnStr.strip()): filename, lineno, _ = self.__entryRe.capturedTexts()[1:] try: lineno = int(lineno) except ValueError: return if self.projectLoaded: filename = GlobalData().project.getAbsolutePath(filename) editorsManager = GlobalData().mainWindow.editorsManager() editorsManager.openFile(filename, lineno) editor = editorsManager.currentWidget().getEditor() editor.gotoLine(lineno) editorsManager.currentWidget().setFocus()