Module implementing a widget to visualize the Python AST for some Python sources.
None |
PythonAstViewer | Class implementing a widget to visualize the Python AST for some Python sources. |
None |
Class implementing a widget to visualize the Python AST for some Python sources.
EndIndexRole |
EndLineRole |
StartIndexRole |
StartLineRole |
None |
PythonAstViewer | Constructor |
__astItemClicked | Private slot handling a user click on an AST node item. |
__astViewerStateChanged | Private slot to toggle the display of the AST viewer. |
__clearSelection | Private method to clear all selected items. |
__createErrorItem | Private method to create a top level error item. |
__editorChanged | Private slot to handle a change of the current editor. |
__editorDoubleClicked | Private slot to handle a mouse button double click in the editor. |
__editorSaved | Private slot to reload the AST after the connected editor was saved. |
__findClosestContainingItem | Private method to search for the tree item that contains a range closest. |
__findClosestContainingNode | Private method to search for the AST node that contains a range closest. |
__grabFocus | Private method to grab the input focus. |
__lastEditorClosed | Private slot to handle the last editor closed signal of the view manager. |
__loadAST | Private method to generate the AST from the source of the current editor and visualize it. |
__markTextRanges | Private method to modify the AST nodes with end_lineno and end_col_offset information. |
__populateNode | Private method to populate the tree view with a node. |
__rangeContainsSmaller | Private method to check, if second is contained in first. |
__rangeContainsSmallerOrEqual | Private method to check, if second is contained in or equal to first. |
__resizeColumns | Private method to resize the columns to suitable values. |
__selectItemForEditorSelection | Private slot to select the item corresponding to an editor selection. |
hide | Public slot to hide the AST viewer. |
resizeEvent | Protected method to handle resize events. |
show | Public slot to show the AST viewer. |
shutdown | Public method to perform shutdown actions. |
None |
Constructor
Private slot handling a user click on an AST node item.
Private slot to toggle the display of the AST viewer.
Private method to clear all selected items.
Private method to create a top level error item.
Private slot to handle a change of the current editor.
Private slot to handle a mouse button double click in the editor.
Private slot to reload the AST after the connected editor was saved.
Private method to search for the tree item that contains a range closest.
Private method to search for the AST node that contains a range closest.
Private method to grab the input focus.
Private slot to handle the last editor closed signal of the view manager.
Private method to generate the AST from the source of the current editor and visualize it.
Private method to modify the AST nodes with end_lineno and end_col_offset information.
Note: The modifications are only done for nodes containing lineno and col_offset attributes.
Private method to populate the tree view with a node.
Private method to check, if second is contained in first.
Private method to check, if second is contained in or equal to first.
Private method to resize the columns to suitable values.
Private slot to select the item corresponding to an editor selection.
Public slot to hide the AST viewer.
Protected method to handle resize events.
Public slot to show the AST viewer.
Public method to perform shutdown actions.