--- a/Documentation/Source/eric6.QScintilla.Editor.html Wed Nov 01 19:22:02 2017 +0100 +++ b/Documentation/Source/eric6.QScintilla.Editor.html Fri Nov 03 12:10:16 2017 +0100 @@ -138,7 +138,7 @@ QsciScintillaCompat <h3>Class Attributes</h3> <table> -<tr><td>AttributeID</td></tr><tr><td>AttributePrivateID</td></tr><tr><td>AttributeProtectedID</td></tr><tr><td>CancelEditToken</td></tr><tr><td>ClassID</td></tr><tr><td>ClassPrivateID</td></tr><tr><td>ClassProtectedID</td></tr><tr><td>EndEditToken</td></tr><tr><td>EnumID</td></tr><tr><td>FromDocumentID</td></tr><tr><td>MethodID</td></tr><tr><td>MethodPrivateID</td></tr><tr><td>MethodProtectedID</td></tr><tr><td>RequestSyncToken</td></tr><tr><td>Separator</td></tr><tr><td>StartEditToken</td></tr><tr><td>SyncToken</td></tr><tr><td>TemplateImageID</td></tr><tr><td>WarningCode</td></tr><tr><td>WarningStyle</td></tr> +<tr><td>AttributeID</td></tr><tr><td>AttributePrivateID</td></tr><tr><td>AttributeProtectedID</td></tr><tr><td>CancelEditToken</td></tr><tr><td>ClassID</td></tr><tr><td>ClassPrivateID</td></tr><tr><td>ClassProtectedID</td></tr><tr><td>EndEditToken</td></tr><tr><td>EnumID</td></tr><tr><td>FromDocumentID</td></tr><tr><td>KeywordsID</td></tr><tr><td>MethodID</td></tr><tr><td>MethodPrivateID</td></tr><tr><td>MethodProtectedID</td></tr><tr><td>ModuleID</td></tr><tr><td>RequestSyncToken</td></tr><tr><td>Separator</td></tr><tr><td>StartEditToken</td></tr><tr><td>SyncToken</td></tr><tr><td>TemplateImageID</td></tr><tr><td>WarningCode</td></tr><tr><td>WarningStyle</td></tr> </table> <h3>Class Methods</h3> <table> @@ -180,6 +180,9 @@ <td><a href="#Editor.__applyTemplate">__applyTemplate</a></td> <td>Private method to apply a template by name.</td> </tr><tr> +<td><a href="#Editor.__autoComplete">__autoComplete</a></td> +<td>Private method to start auto-completion via plug-ins.</td> +</tr><tr> <td><a href="#Editor.__autosaveEnable">__autosaveEnable</a></td> <td>Private slot handling the autosave enable context menu action.</td> </tr><tr> @@ -207,6 +210,9 @@ <td><a href="#Editor.__charAdded">__charAdded</a></td> <td>Private slot called to handle the user entering a character.</td> </tr><tr> +<td><a href="#Editor.__charAddedPermanent">__charAddedPermanent</a></td> +<td>Private slot called to handle the user entering a character.</td> +</tr><tr> <td><a href="#Editor.__checkEncoding">__checkEncoding</a></td> <td>Private method to check the selected encoding of the encodings submenu.</td> </tr><tr> @@ -225,6 +231,9 @@ <td><a href="#Editor.__clearBreakpoints">__clearBreakpoints</a></td> <td>Private slot to clear all breakpoints.</td> </tr><tr> +<td><a href="#Editor.__clearCompletionsCache">__clearCompletionsCache</a></td> +<td>Private method to clear the auto-completions cache.</td> +</tr><tr> <td><a href="#Editor.__clearTypedWarning">__clearTypedWarning</a></td> <td>Private method to clear warnings of a specific kind.</td> </tr><tr> @@ -465,6 +474,9 @@ <td><a href="#Editor.__reopenWithEncodingMenuTriggered">__reopenWithEncodingMenuTriggered</a></td> <td>Private method to handle the rereading of the file with a selected encoding.</td> </tr><tr> +<td><a href="#Editor.__replaceLeadingUnderscores">__replaceLeadingUnderscores</a></td> +<td>Private method to replace the first two underlines for invers sorting.</td> +</tr><tr> <td><a href="#Editor.__resetLanguage">__resetLanguage</a></td> <td>Private method used to reset the language selection.</td> </tr><tr> @@ -537,9 +549,15 @@ <td><a href="#Editor.__showCodeCoverage">__showCodeCoverage</a></td> <td>Private method to handle the code coverage context menu action.</td> </tr><tr> +<td><a href="#Editor.__showCodeInfo">__showCodeInfo</a></td> +<td>Private slot to handle the context menu action to show code info.</td> +</tr><tr> <td><a href="#Editor.__showCodeMetrics">__showCodeMetrics</a></td> <td>Private method to handle the code metrics context menu action.</td> </tr><tr> +<td><a href="#Editor.__showCompletionsList">__showCompletionsList</a></td> +<td>Private method to show the completions list.</td> +</tr><tr> <td><a href="#Editor.__showContextMenu">__showContextMenu</a></td> <td>Private slot handling the aboutToShow signal of the context menu.</td> </tr><tr> @@ -628,7 +646,7 @@ <td>Public method to signal, that this editor has been added to a project.</td> </tr><tr> <td><a href="#Editor.autoComplete">autoComplete</a></td> -<td>Public method to start autocompletion.</td> +<td>Public method to start auto-completion.</td> </tr><tr> <td><a href="#Editor.autoCompleteQScintilla">autoCompleteQScintilla</a></td> <td>Public method to perform an autocompletion using QScintilla methods.</td> @@ -711,6 +729,9 @@ <td><a href="#Editor.commentSelection">commentSelection</a></td> <td>Public slot to comment the current selection.</td> </tr><tr> +<td><a href="#Editor.completionsListReady">completionsListReady</a></td> +<td>Public method to show the completions determined by a completions provider.</td> +</tr><tr> <td><a href="#Editor.contextMenuEvent">contextMenuEvent</a></td> <td>Protected method implementing the context menu event.</td> </tr><tr> @@ -1315,6 +1336,20 @@ name of the language (group) to get the template from (string) </dd> +</dl><a NAME="Editor.__autoComplete" ID="Editor.__autoComplete"></a> +<h4>Editor.__autoComplete</h4> +<b>__autoComplete</b>(<i>auto=True, context=None</i>) +<p> + Private method to start auto-completion via plug-ins. +</p><dl> +<dt><i>auto=</i></dt> +<dd> +flag indicating a call from the __charAdded method + (boolean) +</dd><dt><i>context=</i> (bool or None)</dt> +<dd> +flag indicating to complete a context +</dd> </dl><a NAME="Editor.__autosaveEnable" ID="Editor.__autosaveEnable"></a> <h4>Editor.__autosaveEnable</h4> <b>__autosaveEnable</b>(<i></i>) @@ -1424,6 +1459,19 @@ <dd> value of the character entered (integer) </dd> +</dl><a NAME="Editor.__charAddedPermanent" ID="Editor.__charAddedPermanent"></a> +<h4>Editor.__charAddedPermanent</h4> +<b>__charAddedPermanent</b>(<i>charNumber</i>) +<p> + Private slot called to handle the user entering a character. +</p><p> + Note: This slot is always connected independent of the auto-completion + and calltips handling __charAdded() slot. +</p><dl> +<dt><i>charNumber</i></dt> +<dd> +value of the character entered (integer) +</dd> </dl><a NAME="Editor.__checkEncoding" ID="Editor.__checkEncoding"></a> <h4>Editor.__checkEncoding</h4> <b>__checkEncoding</b>(<i></i>) @@ -1459,7 +1507,12 @@ <dd> name of the file (string) </dd> -</dl><a NAME="Editor.__clearTypedWarning" ID="Editor.__clearTypedWarning"></a> +</dl><a NAME="Editor.__clearCompletionsCache" ID="Editor.__clearCompletionsCache"></a> +<h4>Editor.__clearCompletionsCache</h4> +<b>__clearCompletionsCache</b>(<i></i>) +<p> + Private method to clear the auto-completions cache. +</p><a NAME="Editor.__clearTypedWarning" ID="Editor.__clearTypedWarning"></a> <h4>Editor.__clearTypedWarning</h4> <b>__clearTypedWarning</b>(<i>warningKind</i>) <p> @@ -2227,6 +2280,26 @@ <dd> reference to the action that was triggered (QAction) </dd> +</dl><a NAME="Editor.__replaceLeadingUnderscores" ID="Editor.__replaceLeadingUnderscores"></a> +<h4>Editor.__replaceLeadingUnderscores</h4> +<b>__replaceLeadingUnderscores</b>(<i>txt</i>) +<p> + Private method to replace the first two underlines for invers sorting. +</p><dl> +<dt><i>txt</i> (str)</dt> +<dd> +completion text +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +modified completion text +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +str +</dd> </dl><a NAME="Editor.__resetLanguage" ID="Editor.__resetLanguage"></a> <h4>Editor.__resetLanguage</h4> <b>__resetLanguage</b>(<i>propagate=True</i>) @@ -2386,12 +2459,27 @@ <b>__showCodeCoverage</b>(<i></i>) <p> Private method to handle the code coverage context menu action. +</p><a NAME="Editor.__showCodeInfo" ID="Editor.__showCodeInfo"></a> +<h4>Editor.__showCodeInfo</h4> +<b>__showCodeInfo</b>(<i></i>) +<p> + Private slot to handle the context menu action to show code info. </p><a NAME="Editor.__showCodeMetrics" ID="Editor.__showCodeMetrics"></a> <h4>Editor.__showCodeMetrics</h4> <b>__showCodeMetrics</b>(<i></i>) <p> Private method to handle the code metrics context menu action. -</p><a NAME="Editor.__showContextMenu" ID="Editor.__showContextMenu"></a> +</p><a NAME="Editor.__showCompletionsList" ID="Editor.__showCompletionsList"></a> +<h4>Editor.__showCompletionsList</h4> +<b>__showCompletionsList</b>(<i>completions</i>) +<p> + Private method to show the completions list. +</p><dl> +<dt><i>completions</i> (list of str or set of str)</dt> +<dd> +completions to be shown +</dd> +</dl><a NAME="Editor.__showContextMenu" ID="Editor.__showContextMenu"></a> <h4>Editor.__showContextMenu</h4> <b>__showContextMenu</b>(<i></i>) <p> @@ -2601,19 +2689,24 @@ </dd> </dl><a NAME="Editor.addCompletionListHook" ID="Editor.addCompletionListHook"></a> <h4>Editor.addCompletionListHook</h4> -<b>addCompletionListHook</b>(<i>key, func</i>) +<b>addCompletionListHook</b>(<i>key, func, async=False</i>) <p> Public method to set an auto-completion list provider. </p><dl> <dt><i>key</i> (str)</dt> <dd> name of the provider -</dd><dt><i>func</i> (function(editor, bool) -> list of str)</dt> +</dd><dt><i>func</i> (function(editor, bool) -> list of str in case async is False)</dt> <dd> function providing completion list. func should be a function taking a reference to the editor and a boolean indicating to complete a context. It should return the possible completions as a list of strings. + and function(editor, bool, str) returning nothing in case async + is True +</dd><dt><i>async</i> (bool)</dt> +<dd> +flag indicating an asynchroneous function </dd> </dl><a NAME="Editor.addedToProject" ID="Editor.addedToProject"></a> <h4>Editor.addedToProject</h4> @@ -2624,7 +2717,7 @@ <h4>Editor.autoComplete</h4> <b>autoComplete</b>(<i>auto=False, context=True</i>) <p> - Public method to start autocompletion. + Public method to start auto-completion. </p><dl> <dt><i>auto=</i></dt> <dd> @@ -2835,7 +2928,21 @@ <b>commentSelection</b>(<i></i>) <p> Public slot to comment the current selection. -</p><a NAME="Editor.contextMenuEvent" ID="Editor.contextMenuEvent"></a> +</p><a NAME="Editor.completionsListReady" ID="Editor.completionsListReady"></a> +<h4>Editor.completionsListReady</h4> +<b>completionsListReady</b>(<i>completions, acText</i>) +<p> + Public method to show the completions determined by a completions + provider. +</p><dl> +<dt><i>completions</i> (list of str or set of str)</dt> +<dd> +list of possible completions +</dd><dt><i>acText</i> (str)</dt> +<dd> +text to be completed +</dd> +</dl><a NAME="Editor.contextMenuEvent" ID="Editor.contextMenuEvent"></a> <h4>Editor.contextMenuEvent</h4> <b>contextMenuEvent</b>(<i>evt</i>) <p>