Wed, 23 Sep 2020 19:17:00 +0200
Updated source docu.
--- a/eric6/APIs/Python3/eric6.api Wed Sep 23 19:16:22 2020 +0200 +++ b/eric6/APIs/Python3/eric6.api Wed Sep 23 19:17:00 2020 +0200 @@ -9018,9 +9018,11 @@ eric6.UI.PythonAstViewer.PythonAstViewer.show?4() eric6.UI.PythonAstViewer.PythonAstViewer.shutdown?4() eric6.UI.PythonAstViewer.PythonAstViewer?1(viewmanager, parent=None) +eric6.UI.PythonDisViewer.PythonDisViewer.CodeInfoRole?7 eric6.UI.PythonDisViewer.PythonDisViewer.EndLineRole?7 eric6.UI.PythonDisViewer.PythonDisViewer.StartLineRole?7 eric6.UI.PythonDisViewer.PythonDisViewer.clear?4() +eric6.UI.PythonDisViewer.PythonDisViewer.createCodeInfoItems?4(infoList) eric6.UI.PythonDisViewer.PythonDisViewer.hide?4() eric6.UI.PythonDisViewer.PythonDisViewer.preferencesChanged?4() eric6.UI.PythonDisViewer.PythonDisViewer.resizeEvent?4(evt)
--- a/eric6/APIs/Python3/eric6.bas Wed Sep 23 19:16:22 2020 +0200 +++ b/eric6/APIs/Python3/eric6.bas Wed Sep 23 19:17:00 2020 +0200 @@ -734,7 +734,7 @@ PyRegExpWizardWindow E5MainWindow PySvnProjectHelper VcsProjectHelper PythonAstViewer QWidget -PythonDisViewer QWidget +PythonDisViewer QWidget Ui_PythonDisViewer PythonDisViewerModes enum.Enum PythonPage ConfigurationPageBase Ui_PythonPage QRegExpWizard QObject
--- a/eric6/Documentation/Help/source.qhp Wed Sep 23 19:16:22 2020 +0200 +++ b/eric6/Documentation/Help/source.qhp Wed Sep 23 19:17:00 2020 +0200 @@ -11902,11 +11902,15 @@ <keyword name="PythonDisViewer (Constructor)" id="PythonDisViewer (Constructor)" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__init__" /> <keyword name="PythonDisViewer (Module)" id="PythonDisViewer (Module)" ref="eric6.UI.PythonDisViewer.html" /> <keyword name="PythonDisViewer.__clearSelection" id="PythonDisViewer.__clearSelection" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__clearSelection" /> - <keyword name="PythonDisViewer.__collapseAll" id="PythonDisViewer.__collapseAll" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__collapseAll" /> - <keyword name="PythonDisViewer.__contextMenuRequested" id="PythonDisViewer.__contextMenuRequested" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__contextMenuRequested" /> + <keyword name="PythonDisViewer.__codeInfoContextMenuRequested" id="PythonDisViewer.__codeInfoContextMenuRequested" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__codeInfoContextMenuRequested" /> + <keyword name="PythonDisViewer.__collapseAllCodeInfo" id="PythonDisViewer.__collapseAllCodeInfo" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__collapseAllCodeInfo" /> + <keyword name="PythonDisViewer.__collapseAllDis" id="PythonDisViewer.__collapseAllDis" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__collapseAllDis" /> + <keyword name="PythonDisViewer.__configure" id="PythonDisViewer.__configure" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__configure" /> + <keyword name="PythonDisViewer.__createCodeInfo" id="PythonDisViewer.__createCodeInfo" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__createCodeInfo" /> <keyword name="PythonDisViewer.__createErrorItem" id="PythonDisViewer.__createErrorItem" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__createErrorItem" /> <keyword name="PythonDisViewer.__createInstructionItem" id="PythonDisViewer.__createInstructionItem" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__createInstructionItem" /> <keyword name="PythonDisViewer.__createTitleItem" id="PythonDisViewer.__createTitleItem" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__createTitleItem" /> + <keyword name="PythonDisViewer.__disContextMenuRequested" id="PythonDisViewer.__disContextMenuRequested" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__disContextMenuRequested" /> <keyword name="PythonDisViewer.__disItemClicked" id="PythonDisViewer.__disItemClicked" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__disItemClicked" /> <keyword name="PythonDisViewer.__disViewerStateChanged" id="PythonDisViewer.__disViewerStateChanged" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__disViewerStateChanged" /> <keyword name="PythonDisViewer.__disassembleObject" id="PythonDisViewer.__disassembleObject" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__disassembleObject" /> @@ -11914,16 +11918,21 @@ <keyword name="PythonDisViewer.__editorLanguageChanged" id="PythonDisViewer.__editorLanguageChanged" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__editorLanguageChanged" /> <keyword name="PythonDisViewer.__editorLineChanged" id="PythonDisViewer.__editorLineChanged" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__editorLineChanged" /> <keyword name="PythonDisViewer.__editorSaved" id="PythonDisViewer.__editorSaved" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__editorSaved" /> - <keyword name="PythonDisViewer.__expandAll" id="PythonDisViewer.__expandAll" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__expandAll" /> + <keyword name="PythonDisViewer.__expandAllCodeInfo" id="PythonDisViewer.__expandAllCodeInfo" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__expandAllCodeInfo" /> + <keyword name="PythonDisViewer.__expandAllDis" id="PythonDisViewer.__expandAllDis" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__expandAllDis" /> <keyword name="PythonDisViewer.__lastEditorClosed" id="PythonDisViewer.__lastEditorClosed" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__lastEditorClosed" /> <keyword name="PythonDisViewer.__loadDIS" id="PythonDisViewer.__loadDIS" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__loadDIS" /> - <keyword name="PythonDisViewer.__resizeColumns" id="PythonDisViewer.__resizeColumns" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__resizeColumns" /> + <keyword name="PythonDisViewer.__resizeCodeInfoColumns" id="PythonDisViewer.__resizeCodeInfoColumns" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__resizeCodeInfoColumns" /> + <keyword name="PythonDisViewer.__resizeDisColumns" id="PythonDisViewer.__resizeDisColumns" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__resizeDisColumns" /> <keyword name="PythonDisViewer.__selectChildren" id="PythonDisViewer.__selectChildren" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__selectChildren" /> <keyword name="PythonDisViewer.__selectItemForEditorLine" id="PythonDisViewer.__selectItemForEditorLine" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__selectItemForEditorLine" /> + <keyword name="PythonDisViewer.__showCodeInfo" id="PythonDisViewer.__showCodeInfo" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__showCodeInfo" /> + <keyword name="PythonDisViewer.__showCodeInfoData" id="PythonDisViewer.__showCodeInfoData" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__showCodeInfoData" /> <keyword name="PythonDisViewer.__styleLabels" id="PythonDisViewer.__styleLabels" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__styleLabels" /> <keyword name="PythonDisViewer.__tryCompile" id="PythonDisViewer.__tryCompile" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__tryCompile" /> <keyword name="PythonDisViewer.__updateItemEndLine" id="PythonDisViewer.__updateItemEndLine" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.__updateItemEndLine" /> <keyword name="PythonDisViewer.clear" id="PythonDisViewer.clear" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.clear" /> + <keyword name="PythonDisViewer.createCodeInfoItems" id="PythonDisViewer.createCodeInfoItems" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.createCodeInfoItems" /> <keyword name="PythonDisViewer.hide" id="PythonDisViewer.hide" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.hide" /> <keyword name="PythonDisViewer.preferencesChanged" id="PythonDisViewer.preferencesChanged" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.preferencesChanged" /> <keyword name="PythonDisViewer.resizeEvent" id="PythonDisViewer.resizeEvent" ref="eric6.UI.PythonDisViewer.html#PythonDisViewer.resizeEvent" />
--- a/eric6/Documentation/Source/eric6.UI.PythonDisViewer.html Wed Sep 23 19:16:22 2020 +0200 +++ b/eric6/Documentation/Source/eric6.UI.PythonDisViewer.html Wed Sep 23 19:17:00 2020 +0200 @@ -59,11 +59,11 @@ Python sources. </p> <h3>Derived from</h3> -QWidget +QWidget, Ui_PythonDisViewer <h3>Class Attributes</h3> <table> -<tr><td>EndLineRole</td></tr><tr><td>StartLineRole</td></tr> +<tr><td>CodeInfoRole</td></tr><tr><td>EndLineRole</td></tr><tr><td>StartLineRole</td></tr> </table> <h3>Class Methods</h3> @@ -83,12 +83,24 @@ <td>Private method to clear all selected items.</td> </tr> <tr> -<td><a href="#PythonDisViewer.__collapseAll">__collapseAll</a></td> -<td>Private slot to collapse all items.</td> +<td><a href="#PythonDisViewer.__codeInfoContextMenuRequested">__codeInfoContextMenuRequested</a></td> +<td>Private slot to show the context menu of the code info widget.</td> +</tr> +<tr> +<td><a href="#PythonDisViewer.__collapseAllCodeInfo">__collapseAllCodeInfo</a></td> +<td>Private slot to collapse all items of the code info widget.</td> </tr> <tr> -<td><a href="#PythonDisViewer.__contextMenuRequested">__contextMenuRequested</a></td> -<td>Private slot to show the context menu.</td> +<td><a href="#PythonDisViewer.__collapseAllDis">__collapseAllDis</a></td> +<td>Private slot to collapse all items of the disassembly widget.</td> +</tr> +<tr> +<td><a href="#PythonDisViewer.__configure">__configure</a></td> +<td>Private method to open the configuration dialog.</td> +</tr> +<tr> +<td><a href="#PythonDisViewer.__createCodeInfo">__createCodeInfo</a></td> +<td>Private method to create a dictionary containing the code info data.</td> </tr> <tr> <td><a href="#PythonDisViewer.__createErrorItem">__createErrorItem</a></td> @@ -103,6 +115,10 @@ <td>Private method to create a title item.</td> </tr> <tr> +<td><a href="#PythonDisViewer.__disContextMenuRequested">__disContextMenuRequested</a></td> +<td>Private slot to show the context menu of the disassembly widget.</td> +</tr> +<tr> <td><a href="#PythonDisViewer.__disItemClicked">__disItemClicked</a></td> <td>Private slot handling a user click on a Disassembly node item.</td> </tr> @@ -131,8 +147,12 @@ <td>Private slot to reload the Disassembly after the connected editor was saved.</td> </tr> <tr> -<td><a href="#PythonDisViewer.__expandAll">__expandAll</a></td> -<td>Private slot to expand all items.</td> +<td><a href="#PythonDisViewer.__expandAllCodeInfo">__expandAllCodeInfo</a></td> +<td>Private slot to expand all items of the code info widget.</td> +</tr> +<tr> +<td><a href="#PythonDisViewer.__expandAllDis">__expandAllDis</a></td> +<td>Private slot to expand all items of the disassembly widget.</td> </tr> <tr> <td><a href="#PythonDisViewer.__lastEditorClosed">__lastEditorClosed</a></td> @@ -143,8 +163,12 @@ <td>Private method to generate the Disassembly from the source of the current editor and visualize it.</td> </tr> <tr> -<td><a href="#PythonDisViewer.__resizeColumns">__resizeColumns</a></td> -<td>Private method to resize the columns to suitable values.</td> +<td><a href="#PythonDisViewer.__resizeCodeInfoColumns">__resizeCodeInfoColumns</a></td> +<td>Private method to resize the columns of the code info widget to suitable values.</td> +</tr> +<tr> +<td><a href="#PythonDisViewer.__resizeDisColumns">__resizeDisColumns</a></td> +<td>Private method to resize the columns of the disassembly widget to suitable values.</td> </tr> <tr> <td><a href="#PythonDisViewer.__selectChildren">__selectChildren</a></td> @@ -155,6 +179,14 @@ <td>Private slot to select the items corresponding with the cursor line of the current editor.</td> </tr> <tr> +<td><a href="#PythonDisViewer.__showCodeInfo">__showCodeInfo</a></td> +<td>Private slot handling the context menu action to show code info.</td> +</tr> +<tr> +<td><a href="#PythonDisViewer.__showCodeInfoData">__showCodeInfoData</a></td> +<td>Private method to show the passed code info data.</td> +</tr> +<tr> <td><a href="#PythonDisViewer.__styleLabels">__styleLabels</a></td> <td>Private method to style the info labels iaw.</td> </tr> @@ -171,6 +203,10 @@ <td>Public method to clear the display.</td> </tr> <tr> +<td><a href="#PythonDisViewer.createCodeInfoItems">createCodeInfoItems</a></td> +<td>Function to create code info items for the given list.</td> +</tr> +<tr> <td><a href="#PythonDisViewer.hide">hide</a></td> <td>Public slot to hide the DIS viewer.</td> </tr> @@ -230,19 +266,12 @@ <p> Private method to clear all selected items. </p> -<a NAME="PythonDisViewer.__collapseAll" ID="PythonDisViewer.__collapseAll"></a> -<h4>PythonDisViewer.__collapseAll</h4> -<b>__collapseAll</b>(<i></i>) +<a NAME="PythonDisViewer.__codeInfoContextMenuRequested" ID="PythonDisViewer.__codeInfoContextMenuRequested"></a> +<h4>PythonDisViewer.__codeInfoContextMenuRequested</h4> +<b>__codeInfoContextMenuRequested</b>(<i>coord</i>) <p> - Private slot to collapse all items. -</p> -<a NAME="PythonDisViewer.__contextMenuRequested" ID="PythonDisViewer.__contextMenuRequested"></a> -<h4>PythonDisViewer.__contextMenuRequested</h4> -<b>__contextMenuRequested</b>(<i>coord</i>) - -<p> - Private slot to show the context menu. + Private slot to show the context menu of the code info widget. </p> <dl> @@ -251,6 +280,53 @@ position of the mouse pointer </dd> </dl> +<a NAME="PythonDisViewer.__collapseAllCodeInfo" ID="PythonDisViewer.__collapseAllCodeInfo"></a> +<h4>PythonDisViewer.__collapseAllCodeInfo</h4> +<b>__collapseAllCodeInfo</b>(<i></i>) + +<p> + Private slot to collapse all items of the code info widget. +</p> +<a NAME="PythonDisViewer.__collapseAllDis" ID="PythonDisViewer.__collapseAllDis"></a> +<h4>PythonDisViewer.__collapseAllDis</h4> +<b>__collapseAllDis</b>(<i></i>) + +<p> + Private slot to collapse all items of the disassembly widget. +</p> +<a NAME="PythonDisViewer.__configure" ID="PythonDisViewer.__configure"></a> +<h4>PythonDisViewer.__configure</h4> +<b>__configure</b>(<i></i>) + +<p> + Private method to open the configuration dialog. +</p> +<a NAME="PythonDisViewer.__createCodeInfo" ID="PythonDisViewer.__createCodeInfo"></a> +<h4>PythonDisViewer.__createCodeInfo</h4> +<b>__createCodeInfo</b>(<i>co</i>) + +<p> + Private method to create a dictionary containing the code info data. +</p> +<dl> + +<dt><i>co</i> (code)</dt> +<dd> +reference to the code object to generate the info for +</dd> +</dl> +<dl> +<dt>Returns:</dt> +<dd> +dictionary containing the code info data +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +dict +</dd> +</dl> <a NAME="PythonDisViewer.__createErrorItem" ID="PythonDisViewer.__createErrorItem"></a> <h4>PythonDisViewer.__createErrorItem</h4> <b>__createErrorItem</b>(<i>error</i>) @@ -345,6 +421,20 @@ QTreeWidgetItem </dd> </dl> +<a NAME="PythonDisViewer.__disContextMenuRequested" ID="PythonDisViewer.__disContextMenuRequested"></a> +<h4>PythonDisViewer.__disContextMenuRequested</h4> +<b>__disContextMenuRequested</b>(<i>coord</i>) + +<p> + Private slot to show the context menu of the disassembly widget. +</p> +<dl> + +<dt><i>coord</i> (QPoint)</dt> +<dd> +position of the mouse pointer +</dd> +</dl> <a NAME="PythonDisViewer.__disItemClicked" ID="PythonDisViewer.__disItemClicked"></a> <h4>PythonDisViewer.__disItemClicked</h4> <b>__disItemClicked</b>(<i>itm, column</i>) @@ -464,12 +554,19 @@ reference to the editor that performed a save action </dd> </dl> -<a NAME="PythonDisViewer.__expandAll" ID="PythonDisViewer.__expandAll"></a> -<h4>PythonDisViewer.__expandAll</h4> -<b>__expandAll</b>(<i></i>) +<a NAME="PythonDisViewer.__expandAllCodeInfo" ID="PythonDisViewer.__expandAllCodeInfo"></a> +<h4>PythonDisViewer.__expandAllCodeInfo</h4> +<b>__expandAllCodeInfo</b>(<i></i>) <p> - Private slot to expand all items. + Private slot to expand all items of the code info widget. +</p> +<a NAME="PythonDisViewer.__expandAllDis" ID="PythonDisViewer.__expandAllDis"></a> +<h4>PythonDisViewer.__expandAllDis</h4> +<b>__expandAllDis</b>(<i></i>) + +<p> + Private slot to expand all items of the disassembly widget. </p> <a NAME="PythonDisViewer.__lastEditorClosed" ID="PythonDisViewer.__lastEditorClosed"></a> <h4>PythonDisViewer.__lastEditorClosed</h4> @@ -487,12 +584,21 @@ Private method to generate the Disassembly from the source of the current editor and visualize it. </p> -<a NAME="PythonDisViewer.__resizeColumns" ID="PythonDisViewer.__resizeColumns"></a> -<h4>PythonDisViewer.__resizeColumns</h4> -<b>__resizeColumns</b>(<i></i>) +<a NAME="PythonDisViewer.__resizeCodeInfoColumns" ID="PythonDisViewer.__resizeCodeInfoColumns"></a> +<h4>PythonDisViewer.__resizeCodeInfoColumns</h4> +<b>__resizeCodeInfoColumns</b>(<i></i>) <p> - Private method to resize the columns to suitable values. + Private method to resize the columns of the code info widget to + suitable values. +</p> +<a NAME="PythonDisViewer.__resizeDisColumns" ID="PythonDisViewer.__resizeDisColumns"></a> +<h4>PythonDisViewer.__resizeDisColumns</h4> +<b>__resizeDisColumns</b>(<i></i>) + +<p> + Private method to resize the columns of the disassembly widget to + suitable values. </p> <a NAME="PythonDisViewer.__selectChildren" ID="PythonDisViewer.__selectChildren"></a> <h4>PythonDisViewer.__selectChildren</h4> @@ -521,6 +627,27 @@ Private slot to select the items corresponding with the cursor line of the current editor. </p> +<a NAME="PythonDisViewer.__showCodeInfo" ID="PythonDisViewer.__showCodeInfo"></a> +<h4>PythonDisViewer.__showCodeInfo</h4> +<b>__showCodeInfo</b>(<i></i>) + +<p> + Private slot handling the context menu action to show code info. +</p> +<a NAME="PythonDisViewer.__showCodeInfoData" ID="PythonDisViewer.__showCodeInfoData"></a> +<h4>PythonDisViewer.__showCodeInfoData</h4> +<b>__showCodeInfoData</b>(<i>codeInfo</i>) + +<p> + Private method to show the passed code info data. +</p> +<dl> + +<dt><i>codeInfo</i> (dict)</dt> +<dd> +dictionary containing the code info data +</dd> +</dl> <a NAME="PythonDisViewer.__styleLabels" ID="PythonDisViewer.__styleLabels"></a> <h4>PythonDisViewer.__styleLabels</h4> <b>__styleLabels</b>(<i></i>) @@ -580,6 +707,24 @@ <p> Public method to clear the display. </p> +<a NAME="PythonDisViewer.createCodeInfoItems" ID="PythonDisViewer.createCodeInfoItems"></a> +<h4>PythonDisViewer.createCodeInfoItems</h4> +<b>createCodeInfoItems</b>(<i>infoList</i>) + +<p> + Function to create code info items for the given list. +</p> +<dl> + +<dt><i>title</i> (str)</dt> +<dd> +title string for the list +</dd> +<dt><i>infoList</i> (list of str)</dt> +<dd> +list of info strings +</dd> +</dl> <a NAME="PythonDisViewer.hide" ID="PythonDisViewer.hide"></a> <h4>PythonDisViewer.hide</h4> <b>hide</b>(<i></i>)