# eric6.QScintilla.Editor

Module implementing the editor component of the eric6 IDE.

### Global Attributes

EditorAutoCompletionListID
TemplateCompletionListID

### Classes

Editor | Class implementing the editor component of the eric6 IDE.

### Functions

None

## Editor

Class implementing the editor component of the eric6 IDE.

### Signals

autoCompletionAPIsAvailable(bool)
  emitted after the autocompletion function has been configured
bookmarkToggled(QsciScintillaCompat)
  emitted when a bookmark is toggled
breakpointToggled(QsciScintillaCompat)
  emitted when a breakpoint is toggled
captionChanged(str, QsciScintillaCompat)
  emitted when the caption is updated. Typically due to a readOnly attribute change.
changeMarkersUpdated(QsciScintillaCompat)
  emitted when the change markers were updated
coverageMarkersShown(bool)
  emitted after the coverage markers have been shown or cleared
cursorChanged(str, int, int)
  emitted when the cursor position was changed
cursorLineChanged(int)
  emitted when the cursor line was changed
editorAboutToBeSaved(str)
  emitted before the editor is saved
editorRenamed(str)
  emitted after the editor got a new name (i.e. after a 'Save As')
editorSaved(str)
  emitted after the editor has been saved
encodingChanged(str)
  emitted when the editors encoding was set. The encoding name is passed as a parameter.
eolChanged(str)
  emitted when the editors eol type was set. The eol string is passed as a parameter.
languageChanged(str)
  emitted when the editors language was set. The language is passed as a parameter.
lastEditPositionAvailable()
  emitted when a last edit position is available
modificationStatusChanged(bool, QsciScintillaCompat)
  emitted when the modification status has changed
mouseDoubleClick(position, buttons)
  emitted to signal a mouse double click somewhere in the editor area
redoAvailable(bool)
  emitted to signal the redo availability
refreshed()
  emitted to signal a refresh of the editor contents
settingsRead()
  emitted to signal, that the settings have been read and set
showMenu(str, QMenu, QsciScintillaCompat)
  emitted when a menu is about to be shown. The name of the menu, a reference to the menu and a reference to the editor are given.
syntaxerrorToggled(QsciScintillaCompat)
  emitted when a syntax error was discovered
taskMarkersUpdated(QsciScintillaCompat)
  emitted when the task markers were updated
undoAvailable(bool)
  emitted to signal the undo availability

### Derived from

QsciScintillaCompat

### Class Attributes

AttributeID
AttributePrivateID
AttributeProtectedID
CancelEditToken
ClassID
ClassPrivateID
ClassProtectedID
EndEditToken
EnumID
FromDocumentID
KeywordsID
MethodID
MethodPrivateID
MethodProtectedID
ModuleID
RequestSyncToken
Separator
StartEditToken
SyncToken
TemplateImageID
VcsConflictMarkerLineRegExpList
WarningCode
WarningStyle

### Class Methods

None

### Methods

Editor | Constructor
__addBreakPoint | Private method to add a new breakpoint.
__addBreakPoints | Private slot to add breakpoints.
__addFileAliasResource | Private method to handle the Add aliased file context menu action.
__addFileResource | Private method to handle the Add file context menu action.
__addFileResources | Private method to handle the Add files context menu action.
__addLocalizedResource | Private method to handle the Add localized resource context menu action.
__addResourceFrame | Private method to handle the Add resource frame context menu action.
__addToSpellingDictionary | Private slot to add the word below the spelling context menu to the dictionary.
__adjustedCallTipPosition | Private method to calculate an adjusted position for showing calltips.
__applyTemplate | Private method to apply a template by name.
__autoComplete | Private method to start auto-completion via plug-ins.
__autocompletionCancelled | Private slot to handle the cancellation of an auto-completion list.
__autosaveEnable | Private slot handling the autosave enable context menu action.
__bindCompleter | Private slot to set the correct typing completer depending on language.
__bindLexer | Private slot to set the correct lexer depending on language.
__bindName | Private method to generate a dummy filename for binding a lexer.
__breakPointDataAboutToBeChanged | Private slot to handle the dataAboutToBeChanged signal of the breakpoint model.
__calculateChanges | Private method to determine change commands to convert old text into new text.
__callTip | Private method to show call tips provided by a plugin.
__changeBreakPoints | Private slot to set changed breakpoints.
__charAdded | Private slot called to handle the user entering a character.
__checkEncoding | Private method to check the selected encoding of the encodings submenu.
__checkEol | Private method to check the selected eol type of the eol submenu.
__checkLanguage | Private method to check the selected language of the language submenu.
__checkSpellingSelection | Private slot to spell check the current selection.
__checkSpellingWord | Private slot to check the word below the spelling context menu.
__clearBreakpoints | Private slot to clear all breakpoints.
__clearCompletionsCache | Private method to clear the auto-completions cache.
__clearTypedWarning | Private method to clear warnings of a specific kind.
__codeCoverageHideAnnotations | Private method to handle the hide code coverage annotations context menu action.
__completionListSelected | Private slot to handle the selection from the completion list.
__contextClose | Private slot handling the close context menu entry.
__contextMenuCollapseFoldWithChildren | Private slot to handle the context menu collapse with children action.
__contextMenuExpandFoldWithChildren | Private slot to handle the context menu expand with children action.
__contextMenuSpellingTriggered | Private slot to handle the selection of a suggestion of the spelling context menu.
__contextOpenRejections | Private slot handling the open rejections file context menu entry.
__contextSave | Private slot handling the save context menu entry.
__contextSaveAs | Private slot handling the save as context menu entry.
__contextSaveCopy | Private slot handling the save copy context menu entry.
__createChangeMarkerPixmap | Private method to create a pixmap for the change markers.
__cursorPositionChanged | Private slot to handle the cursorPositionChanged signal.
__deleteAllChangeMarkers | Private slot to delete all change markers.
__deleteBreakPoints | Private slot to delete breakpoints.
__deselectAll | Private slot handling the deselect all context menu action.
__dispatchCommand | Private method to dispatch received commands.
__encodingChanged | Private slot to handle a change of the encoding.
__encodingsMenuTriggered | Private method to handle the selection of an encoding.
__eolChanged | Private slot to handle a change of the eol mode.
__eolMenuTriggered | Private method to handle the selection of an eol type.
__executeSelection | Private slot to execute the selected text in the shell window.
__exportMenuTriggered | Private method to handle the selection of an export format.
__getAcText | Private method to get the text from cursor position for autocompleting.
__getCharacter | Private method to get the character to the left of the current position in the current line.
__getCodeCoverageFile | Private method to get the file name of the file containing coverage info.
__getEditorConfig | Private method to get the requested option via EditorConfig.
__getMacroName | Private method to select a macro name from the list of macros.
__getPyVersion | Private method to return the Python main version (2 or 3) or 0 if it's not a Python file at all.
__getSaveFileName | Private method to get the name of the file to be saved.
__ignoreSpellingAlways | Private to always ignore the word below the spelling context menu.
__indentLine | Private method to indent or unindent the current line.
__indentSelection | Private method to indent or unindent the current selection.
__initContextMenu | Private method used to setup the context menu.
__initContextMenuAutocompletion | Private method used to setup the Checks context sub menu.
__initContextMenuChecks | Private method used to setup the Checks context sub menu.
__initContextMenuEncodings | Private method used to setup the Encodings context sub menu.
__initContextMenuEol | Private method to setup the eol context sub menu.
__initContextMenuExporters | Private method used to setup the Exporters context sub menu.
__initContextMenuGraphics | Private method used to setup the diagrams context sub menu.
__initContextMenuLanguages | Private method used to setup the Languages context sub menu.
__initContextMenuMargins | Private method used to setup the context menu for the margins.
__initContextMenuReopenWithEncoding | Private method used to setup the Reopen With Encoding context sub menu.
__initContextMenuResources | Private method used to setup the Resources context sub menu.
__initContextMenuShow | Private method used to setup the Show context sub menu.
__initContextMenuTools | Private method used to setup the Tools context sub menu.
__initOnlineChangeTrace | Private slot to initialize the online change trace.
__initOnlineSyntaxCheck | Private slot to initialize the online syntax check.
__isCommentedLine | Private method to check, if the given line is a comment line as produced by the configured comment rules.
__isStartChar | Private method to check, if a character is an autocompletion start character.
__languageChanged | Private slot handling a change of a connected editor's language.
__languageMenuTriggered | Private method to handle the selection of a lexer language.
__lmBbookmarks | Private method to handle the 'LMB toggles bookmark' context menu action.
__lmBbreakpoints | Private method to handle the 'LMB toggles breakpoint' context menu action.
__loadDiagram | Private slot to load a diagram from file.
__loadEditorConfig | Private method to load the EditorConfig properties.
__loadEditorConfigObject | Private method to load the EditorConfig properties for the given file name.
__marginClicked | Private slot to handle the marginClicked signal.
__marginNumber | Private method to calculate the margin number based on a x position.
__markOccurrences | Private method to mark all occurrences of the current word.
__menuClearBreakpoints | Private slot to handle the 'Clear all breakpoints' context menu action.
__menuToggleBreakpointEnabled | Private slot to handle the 'Enable/Disable breakpoint' context menu action.
__menuToggleTemporaryBreakpoint | Private slot to handle the 'Toggle temporary breakpoint' context menu action.
__modificationChanged | Private slot to handle the modificationChanged signal.
__modificationReadOnly | Private slot to handle the modificationAttempted signal.
__modified | Private method to handle changes of the number of lines.
__newView | Private slot to create a new view to an open document.
__newViewNewSplit | Private slot to create a new view to an open document.
__normalizedEncoding | Private method to calculate the normalized encoding string.
__onlineChangeTraceTimerTimeout | Private slot to mark added and changed lines.
__printPreview | Private slot to generate a print preview.
__processEndEditCommand | Private slot to process a remote EndEdit command.
__processFlags | Private method to extract flags and process them.
__processRequestSyncCommand | Private slot to process a remote RequestSync command.
__processStartEditCommand | Private slot to process a remote StartEdit command.
__processSyncCommand | Private slot to process a remote Sync command.
__processSyntaxCheckError | Private slot to report an error message of a syntax check.
__processSyntaxCheckResult | Private slot to report the resulting messages of a syntax check.
__projectPropertiesChanged | Private slot to handle changes of the project properties.
__refreshAnnotations | Private method to refresh the annotations.
__registerImages | Private method to register images for autocompletion lists.
__reinitOnlineChangeTrace | Private slot to re-initialize the online change trace.
__removeFromSpellingDictionary | Private slot to remove the word below the context menu to the dictionary.
__removeTrailingWhitespace | Private method to remove trailing whitespace.
__reopenWithEncodingMenuTriggered | Private method to handle the rereading of the file with a selected encoding.
__replaceLeadingUnderscores | Private method to replace the first two underlines for invers sorting.
__resetLanguage | Private method used to reset the language selection.
__resetOnlineChangeTraceInfo | Private slot to reset the online change trace info.
__resetOnlineChangeTraceTimer | Private method to reset the online syntax check timer.
__resetOnlineSyntaxCheckTimer | Private method to reset the online syntax check timer.
__resizeLinenoMargin | Private slot to resize the line numbers margin.
__restoreBreakpoints | Private method to restore the breakpoints.
__saveLastEditPosition | Private slot to record the last edit position.
__searchCurrentWord | Private slot to search the next occurrence of the current word.
__selectAll | Private slot handling the select all context menu action.
__selectPygmentsLexer | Private method to select a specific pygments lexer.
__send | Private method to send an editor command to remote editors.
__setAnnotation | Private method to set the annotations for the given line.
__setAnnotationStyles | Private slot to define the style used by inline annotations.
__setAutoCompletion | Private method to configure the autocompletion function.
__setCallTips | Private method to configure the calltips function.
__setEolMode | Private method to configure the eol mode of the editor.
__setLineMarkerColours | Private method to set the line marker colours.
__setMarginsDisplay | Private method to configure margins 0 and 2.
__setSpelling | Private method to initialize the spell checking functionality.
__setSpellingLanguage | Private slot to set the spell checking language.
__setTabAndIndent | Private method to set indentation size and style and tab width.
__setTextDisplay | Private method to configure the text display.
__showApplicationDiagram | Private method to handle the Imports Diagram context menu action.
__showClassDiagram | Private method to handle the Class Diagram context menu action.
__showCodeCoverage | Private method to handle the code coverage context menu action.
__showCodeInfo | Private slot to handle the context menu action to show code info.
__showCodeMetrics | Private method to handle the code metrics context menu action.
__showCompletionsList | Private method to show the completions list.
__showContextMenu | Private slot handling the aboutToShow signal of the context menu.
__showContextMenuAutocompletion | Private slot called before the autocompletion menu is shown.
__showContextMenuChecks | Private slot handling the aboutToShow signal of the checks context menu.
__showContextMenuEncodings | Private slot handling the aboutToShow signal of the encodings context menu.
__showContextMenuEol | Private slot handling the aboutToShow signal of the eol context menu.
__showContextMenuGraphics | Private slot handling the aboutToShow signal of the diagrams context menu.
__showContextMenuLanguages | Private slot handling the aboutToShow signal of the languages context menu.
__showContextMenuMargin | Private slot handling the aboutToShow signal of the margins context menu.
__showContextMenuResources | Private slot handling the aboutToShow signal of the resources context menu.
__showContextMenuShow | Private slot called before the show menu is shown.
__showContextMenuSpelling | Private slot to set up the spelling menu before it is shown.
__showContextMenuTools | Private slot handling the aboutToShow signal of the tools context menu.
__showImportsDiagram | Private method to handle the Imports Diagram context menu action.
__showPackageDiagram | Private method to handle the Package Diagram context menu action.
__showProfileData | Private method to handle the show profile data context menu action.
__showSyntaxError | Private slot to handle the 'Show syntax error message' context menu action.
__showWarning | Private slot to handle the 'Show warning' context menu action.
__spellCharAdded | Private slot called to handle the user entering a character.
__styleNeeded | Private slot to handle the need for more styling.
__textChanged | Private slot to handle a change of the editor text.
__toggleAutoCompletionEnable | Private slot to handle the Enable Autocompletion context menu entry.
__toggleBreakpoint | Private method to toggle a breakpoint.
__toggleBreakpointEnabled | Private method to toggle a breakpoints enabled status.
__toggleTypingAids | Private slot to toggle the typing aids.
__updateReadOnly | Private method to update the readOnly information for this editor.
addCallTipHook | Public method to set a calltip provider.
addClone | Public method to add a clone to our list.
addCompletionListHook | Public method to set an auto-completion list provider.
addedToProject | Public method to signal, that this editor has been added to a project.
autoComplete | Public method to start auto-completion.
autoCompleteQScintilla | Public method to perform an autocompletion using QScintilla methods.
boxCommentLine | Public slot to box comment the current line.
boxCommentLineOrSelection | Public slot to box comment the current line or current selection.
boxCommentSelection | Public slot to box comment the current selection.
callTip | Public method to show calltips.
canAutoCompleteFromAPIs | Public method to check for API availablity.
canProvideCallTipps | Public method to test the calltips availability.
canProvideDynamicAutoCompletion | Public method to test the dynamic auto-completion availability.
cancelSharedEdit | Public slot to cancel a shared edit session for the editor.
changeEvent | Protected method called to process an event.
checkDirty | Public method to check dirty status and open a message window.
checkSpelling | Public slot to perform an interactive spell check of the document.
checkSyntax | Public method to perform an automatic syntax check of the file.
clearAllHighlights | Public method to clear all highlights.
clearBookmarks | Public slot to handle the 'Clear all bookmarks' context menu action.
clearBreakpoint | Public method to clear a breakpoint.
clearFlakesWarnings | Public slot to clear all pyflakes warnings.
clearHighlight | Public method to clear a text highlight.
clearSearchIndicators | Public method to clear all search indicators.
clearStyleWarnings | Public slot to clear all style warnings.
clearStyles | Public method to set the styles according the selected Qt style or the selected editor colours.
clearSyntaxError | Public slot to handle the 'Clear all syntax error' context menu action.
clearWarnings | Public slot to clear all warnings.
close | Public method called when the window gets closed.
closeIt | Public method called by the viewmanager to finally get rid of us.
codeCoverageShowAnnotations | Public method to handle the show code coverage annotations context menu action.
collapseFoldWithChildren | Public slot to collapse the current fold including its children.
commentLine | Public slot to comment the current line.
commentLineOrSelection | Public slot to comment the current line or current selection.
commentSelection | Public slot to comment the current selection.
completionsListReady | Public method to show the completions determined by a completions provider.
contextMenuEvent | Protected method implementing the context menu event.
curLineHasBreakpoint | Public method to check for the presence of a breakpoint at the current line.
determineFileType | Public method to determine the file type using various tests.
dragEnterEvent | Protected method to handle the drag enter event.
dragLeaveEvent | Protected method to handle the drag leave event.
dragMoveEvent | Protected method to handle the drag move event.
dropEvent | Protected method to handle the drop event.
editorCommand | Public method to perform a simple editor command.
ensureVisible | Public slot to ensure, that the specified line is visible.
ensureVisibleTop | Public slot to ensure, that the specified line is visible at the top of the editor.
event | Public method handling events.
expandFoldWithChildren | Public slot to expand the current fold including its children.
exportFile | Public method to export the file.
extractTasks | Public slot to extract all tasks.
fileRenamed | Public slot to handle the editorRenamed signal.
focusInEvent | Protected method called when the editor receives focus.
focusOutEvent | Protected method called when the editor loses focus.
gestureEvent | Protected method handling gesture events.
getApiLanguage | Public method to get the API language of the editor.
getBookmarkLines | Public method to get the lines containing a bookmark.
getBookmarks | Public method to retrieve the bookmarks.
getBreakpointLines | Public method to get the lines containing a breakpoint.
getCallTipHook | Public method to get the registered calltip provider.
getChangeLines | Public method to get the lines containing a change.
getCompleter | Public method to retrieve a reference to the completer object.
getCompletionListHook | Public method to get the registered completion list provider.
getCoverageLines | Public method to get the lines containing a coverage marker.
getCurrentWord | Public method to get the word at the current position.
getCurrentWordBoundaries | Public method to get the word boundaries at the current position.
getEditorConfig | Public method to get the requested option via EditorConfig.
getEncoding | Public method to return the current encoding.
getFileName | Public method to return the name of the file being displayed.
getFileType | Public method to return the type of the file being displayed.
getFileTypeByFlag | Public method to return the type of the file, if it was set by an eflag: marker.
getHighlightPosition | Public method to return the position of the highlight bar.
getLanguage | Public method to retrieve the language of the editor.
getLexer | Public method to retrieve a reference to the lexer object.
getMenu | Public method to get a reference to the main context menu or a submenu.
getMouseClickHandler | Public method to get a registered mouse click handler.
getMouseClickHandlers | Public method to get all registered mouse click handlers of a plug-in.
getNoName | Public method to get the display string for an unnamed editor.
getSearchIndicatorLines | Public method to get the lines containing a search indicator.
getSearchText | Public method to determine the selection or the current word for the next search operation.
getSharingStatus | Public method to get some share status info.
getSyntaxErrorLines | Public method to get the lines containing a syntax error.
getSyntaxErrors | Public method to retrieve the syntax error markers.
getTaskLines | Public method to get the lines containing a task.
getVcsConflictMarkerLines | Public method to determine the lines containing a VCS conflict marker.
getWarningLines | Public method to get the lines containing a warning.
getWarnings | Public method to retrieve the warning markers.
getWord | Public method to get the word at a position.
getWordBoundaries | Public method to get the word boundaries at a position.
getWordLeft | Public method to get the word to the left of a position.
getWordRight | Public method to get the word to the right of a position.
gotoLastEditPosition | Public method to move the cursor to the last edit position.
gotoLine | Public slot to jump to the beginning of a line.
gotoMethodClass | Public method to go to the next Python method or class definition.
gotoSyntaxError | Public slot to handle the 'Goto syntax error' context menu action.
handleMonospacedEnable | Public slot to handle the Use Monospaced Font context menu entry.
handleRenamed | Public slot to handle the editorRenamed signal.
hasBookmarks | Public method to check for the presence of bookmarks.
hasBreakpoints | Public method to check for the presence of breakpoints.
hasChangeMarkers | Public method to determine, if this editor contains any change markers.
hasCoverageMarkers | Public method to test, if there are coverage markers.
hasMiniMenu | Public method to check the miniMenu flag.
hasSyntaxErrors | Public method to check for the presence of syntax errors.
hasTaskMarkers | Public method to determine, if this editor contains any task markers.
hasWarnings | Public method to check for the presence of warnings.
highlight | Public method to highlight [or de-highlight] a particular line.
highlightVisible | Public method to make sure that the highlight is visible.
indentLineOrSelection | Public slot to indent the current line or current selection.
isClone | Public method to test, if the given editor is a clone.
isJavascriptFile | Public method to return a flag indicating a Javascript file.
isLastEditPositionAvailable | Public method to check, if a last edit position is available.
isPy2File | Public method to return a flag indicating a Python2 file.
isPy3File | Public method to return a flag indicating a Python3 file.
isPyFile | Public method to return a flag indicating a Python (2 or 3) file.
isRubyFile | Public method to return a flag indicating a Ruby file.
isSpellCheckRegion | Public method to check, if the given position is within a region, that should be spell checked.
joinLines | Public slot to join the current line with the next one.
keyPressEvent | Protected method to handle the user input a key at a time.
macroDelete | Public method to delete a macro.
macroLoad | Public method to load a macro from a file.
macroRecordingStart | Public method to start macro recording.
macroRecordingStop | Public method to stop macro recording.
macroRun | Public method to execute a macro.
macroSave | Public method to save a macro to a file.
menuEditBreakpoint | Public slot to handle the 'Edit breakpoint' context menu action.
menuNextBreakpoint | Public slot to handle the 'Next breakpoint' context menu action.
menuPreviousBreakpoint | Public slot to handle the 'Previous breakpoint' context menu action.
menuToggleBookmark | Public slot to handle the 'Toggle bookmark' context menu action.
menuToggleBreakpoint | Public slot to handle the 'Toggle breakpoint' context menu action.
mouseDoubleClickEvent | Protected method to handle mouse double click events.
mousePressEvent | Protected method to handle the mouse press event.
mouseReleaseEvent | Protected method calling a registered mouse click handler function.
newBreakpointWithProperties | Public method to set a new breakpoint and its properties.
nextBookmark | Public slot to handle the 'Next bookmark' context menu action.
nextChange | Public slot to handle the 'Next change' context menu action.
nextTask | Public slot to handle the 'Next task' context menu action.
nextUncovered | Public slot to handle the 'Next uncovered' context menu action.
nextWarning | Public slot to handle the 'Next warning' context menu action.
previousBookmark | Public slot to handle the 'Previous bookmark' context menu action.
previousChange | Public slot to handle the 'Previous change' context menu action.
previousTask | Public slot to handle the 'Previous task' context menu action.
previousUncovered | Public slot to handle the 'Previous uncovered' context menu action.
previousWarning | Public slot to handle the 'Previous warning' context menu action.
printFile | Public slot to print the text.
printPreviewFile | Public slot to show a print preview of the text.
projectClosed | Public slot to handle the closing of a project.
projectLexerAssociationsChanged | Public slot to handle changes of the project lexer associations.
projectOpened | Public slot to handle the opening of a project.
readFile | Public slot to read the text from a file.
readSettings | Public slot to read the settings into our lexer.
receive | Public slot to handle received editor commands.
redo | Public method to redo the last recorded change.
refresh | Public slot to refresh the editor contents.
refreshCoverageAnnotations | Public method to refresh the code coverage annotations.
removeCallTipHook | Public method to remove a previously registered calltip provider.
removeClone | Public method to remove a clone from our list.
removeCompletionListHook | Public method to remove a previously registered completion list provider.
removeMouseClickHandler | Public method to un-registered a mouse click handler.
removeMouseClickHandlers | Public method to un-registered all mouse click handlers of a plug-in.
resizeEvent | Protected method handling resize events.
revertToUnmodified | Public method to revert back to the last saved state.
saveFile | Public method to save the text to a file.
saveFileAs | Public slot to save a file with a new name.
saveFileCopy | Public method to save a copy of the file.
searchCurrentWordBackward | Public slot to search the current word backward.
searchCurrentWordForward | Public slot to search the current word forward.
selectCurrentWord | Public method to select the current word.
selectWord | Public method to select the word at a position.
sendSharedEdit | Public slot to end a shared edit session for the editor and send the changes.
setAutoCompletionEnabled | Public method to enable/disable autocompletion.
setAutoSpellChecking | Public method to set the automatic spell checking.
setHighlight | Public method to set a text highlight.
setLanguage | Public method to set a lexer language.
setMonospaced | Public method to set/reset a monospaced font.
setMouseClickHandler | Public method to set a mouse click handler.
setNoName | Public method to set the display string for an unnamed editor.
setSearchIndicator | Public method to set a search indicator for the given range.
setSpellingForProject | Public method to set the spell checking options for files belonging to the current project.
shareConnected | Public slot to handle a change of the connected state.
shareEditor | Public slot to set the shared status of the editor.
shortenEmptyLines | Public slot to compress lines consisting solely of whitespace characters.
shouldAutosave | Public slot to check the autosave flags.
smartIndentLineOrSelection | Public slot to indent current line smartly.
sortLines | Public slot to sort the lines spanned by a rectangular selection.
startSharedEdit | Public slot to start a shared edit session for the editor.
streamCommentLine | Public slot to stream comment the current line.
streamCommentLineOrSelection | Public slot to stream comment the current line or current selection.
streamCommentSelection | Public slot to comment the current selection.
toggleBookmark | Public method to toggle a bookmark.
toggleCommentBlock | Public slot to toggle the comment of a block.
toggleCurrentFold | Public slot to toggle the fold containing the current line.
toggleSyntaxError | Public method to toggle a syntax error indicator.
toggleWarning | Public method to toggle a warning indicator.
uncommentLine | Public slot to uncomment the current line.
uncommentLineOrSelection | Public slot to uncomment the current line or current selection.
uncommentSelection | Public slot to uncomment the current selection.
undo | Public method to undo the last recorded change.
unindentLineOrSelection | Public slot to unindent the current line or current selection.
updateMarkerMap | Public method to initiate an update of the marker map.
viewportEvent | Protected method handling event of the viewport.
wheelEvent | Protected method to handle wheel events.
writeFile | Public slot to write the text to a file.

### Static Methods

None

#### Editor (Constructor)

Editor(dbs, fn="", vm=None, filetype="", editor=None, tv=None)

Constructor

dbs
  reference to the debug server object
fn
  name of the file to be opened (string). If it is None, a new (empty) editor is opened
vm
  reference to the view manager object (ViewManager.ViewManager)
filetype
  type of the source file (string)
editor
  reference to an Editor object, if this is a cloned view
tv
  reference to the task viewer object

Raises IOError:
  raised to indicate an issue accessing the file

#### Editor.__addBreakPoint

__addBreakPoint(line, temporary)

Private method to add a new breakpoint.

line
  line number of the breakpoint (integer)
temporary
  flag indicating a temporary breakpoint (boolean)

#### Editor.__addBreakPoints

__addBreakPoints(parentIndex, start, end)

Private slot to add breakpoints.

parentIndex
  index of parent item (QModelIndex)
start
  start row (integer)
end
  end row (integer)

#### Editor.__addFileAliasResource

__addFileAliasResource()

Private method to handle the Add aliased file context menu action.

#### Editor.__addFileResource

__addFileResource()

Private method to handle the Add file context menu action.

#### Editor.__addFileResources

__addFileResources()

Private method to handle the Add files context menu action.

#### Editor.__addLocalizedResource

__addLocalizedResource()

Private method to handle the Add localized resource context menu action.

#### Editor.__addResourceFrame

__addResourceFrame()

Private method to handle the Add resource frame context menu action.

#### Editor.__addToSpellingDictionary

__addToSpellingDictionary()

Private slot to add the word below the spelling context menu to the dictionary.

#### Editor.__adjustedCallTipPosition

__adjustedCallTipPosition(ctshift, pos)

Private method to calculate an adjusted position for showing calltips.

ctshift
  amount the calltip shall be shifted (integer)
pos
  position into the text (integer)

Returns:
  new position for the calltip (integer)

#### Editor.__applyTemplate

__applyTemplate(templateName, language)

Private method to apply a template by name.

templateName
  name of the template to apply (string)
language
  name of the language (group) to get the template from (string)

#### Editor.__autoComplete

__autoComplete(auto=True, context=None)

Private method to start auto-completion via plug-ins.

auto=
  flag indicating a call from the __charAdded method (boolean)
context= (bool or None)
  flag indicating to complete a context

#### Editor.__autocompletionCancelled

__autocompletionCancelled()

Private slot to handle the cancellation of an auto-completion list.

#### Editor.__autosaveEnable

__autosaveEnable()

Private slot handling the autosave enable context menu action.

#### Editor.__bindCompleter

__bindCompleter(filename)

Private slot to set the correct typing completer depending on language.

filename
  filename used to determine the associated typing completer language (string)

#### Editor.__bindLexer

__bindLexer(filename, pyname="")

Private slot to set the correct lexer depending on language.

filename
  filename used to determine the associated lexer language (string)
pyname=
  name of the pygments lexer to use (string)

#### Editor.__bindName

__bindName(line0)

Private method to generate a dummy filename for binding a lexer.

line0
  first line of text to use in the generation process (string)

Returns:
  dummy file name to be used for binding a lexer (string)

#### Editor.__breakPointDataAboutToBeChanged

__breakPointDataAboutToBeChanged(startIndex, endIndex)

Private slot to handle the dataAboutToBeChanged signal of the breakpoint model.

startIndex
  start index of the rows to be changed (QModelIndex)
endIndex
  end index of the rows to be changed (QModelIndex)

#### Editor.__calculateChanges

__calculateChanges(old, new)

Private method to determine change commands to convert old text into new text.

old
  old text (string)
new
  new text (string)

Returns:
  commands to change old into new (string)

#### Editor.__callTip

__callTip()

Private method to show call tips provided by a plugin.

#### Editor.__changeBreakPoints

__changeBreakPoints(startIndex, endIndex)

Private slot to set changed breakpoints.

startIndex
  start index of the breakpoints being changed (QModelIndex)
endIndex
  end index of the breakpoints being changed (QModelIndex)

#### Editor.__charAdded

__charAdded(charNumber)

Private slot called to handle the user entering a character.

charNumber
  value of the character entered (integer)

#### Editor.__checkEncoding

__checkEncoding()

Private method to check the selected encoding of the encodings submenu.

#### Editor.__checkEol

__checkEol()

Private method to check the selected eol type of the eol submenu.

#### Editor.__checkLanguage

__checkLanguage()

Private method to check the selected language of the language submenu.

#### Editor.__checkSpellingSelection

__checkSpellingSelection()

Private slot to spell check the current selection.

#### Editor.__checkSpellingWord

__checkSpellingWord()

Private slot to check the word below the spelling context menu.

#### Editor.__clearBreakpoints

__clearBreakpoints(fileName)

Private slot to clear all breakpoints.

fileName
  name of the file (string)

#### Editor.__clearCompletionsCache

__clearCompletionsCache()

Private method to clear the auto-completions cache.

#### Editor.__clearTypedWarning

__clearTypedWarning(warningKind)

Private method to clear warnings of a specific kind.

warningKind
  kind of warning to clear (Editor.WarningCode, Editor.WarningStyle)

#### Editor.__codeCoverageHideAnnotations

__codeCoverageHideAnnotations()

Private method to handle the hide code coverage annotations context menu action.

#### Editor.__completionListSelected

__completionListSelected(listId, txt)

Private slot to handle the selection from the completion list.

listId
  the ID of the user list (should be 1 or 2) (integer)
txt
  the selected text (string)

#### Editor.__contextClose

__contextClose()

Private slot handling the close context menu entry.

#### Editor.__contextMenuCollapseFoldWithChildren

__contextMenuCollapseFoldWithChildren()

Private slot to handle the context menu collapse with children action.

#### Editor.__contextMenuExpandFoldWithChildren

__contextMenuExpandFoldWithChildren()

Private slot to handle the context menu expand with children action.

#### Editor.__contextMenuSpellingTriggered

__contextMenuSpellingTriggered(action)

Private slot to handle the selection of a suggestion of the spelling context menu.

action
  reference to the action that was selected (QAction)

#### Editor.__contextOpenRejections

__contextOpenRejections()

Private slot handling the open rejections file context menu entry.

#### Editor.__contextSave

__contextSave()

Private slot handling the save context menu entry.

#### Editor.__contextSaveAs

__contextSaveAs()

Private slot handling the save as context menu entry.

#### Editor.__contextSaveCopy

__contextSaveCopy()

Private slot handling the save copy context menu entry.

#### Editor.__createChangeMarkerPixmap

__createChangeMarkerPixmap(key, size=16, width=4)

Private method to create a pixmap for the change markers.

key
  key of the color to use (string)
size
  size of the pixmap (integer)
width
  width of the marker line (integer)

Returns:
  create pixmap (QPixmap)

#### Editor.__cursorPositionChanged

__cursorPositionChanged(line, index)

Private slot to handle the cursorPositionChanged signal.

It emits the signal cursorChanged with parameters fileName, line and pos.

line
  line number of the cursor
index
  position in line of the cursor

#### Editor.__deleteAllChangeMarkers

__deleteAllChangeMarkers()

Private slot to delete all change markers.

#### Editor.__deleteBreakPoints

__deleteBreakPoints(parentIndex, start, end)

Private slot to delete breakpoints.

parentIndex
  index of parent item (QModelIndex)
start
  start row (integer)
end
  end row (integer)

#### Editor.__deselectAll

__deselectAll()

Private slot handling the deselect all context menu action.

#### Editor.__dispatchCommand

__dispatchCommand(command)

Private method to dispatch received commands.

command
  command to be processed (string)

#### Editor.__encodingChanged

__encodingChanged(encoding, propagate=True)

Private slot to handle a change of the encoding.

encoding
  changed encoding (string)
propagate=
  flag indicating to propagate the change (boolean)

#### Editor.__encodingsMenuTriggered

__encodingsMenuTriggered(act)

Private method to handle the selection of an encoding.

act
  reference to the action that was triggered (QAction)

#### Editor.__eolChanged

__eolChanged()

Private slot to handle a change of the eol mode.

#### Editor.__eolMenuTriggered

__eolMenuTriggered(act)

Private method to handle the selection of an eol type.

act
  reference to the action that was triggered (QAction)

#### Editor.__executeSelection

__executeSelection()

Private slot to execute the selected text in the shell window.

#### Editor.__exportMenuTriggered

__exportMenuTriggered(act)

Private method to handle the selection of an export format.

act
  reference to the action that was triggered (QAction)

#### Editor.__getAcText

__getAcText()

Private method to get the text from cursor position for autocompleting.

Returns:
  text left of cursor position

Return Type:
  str

#### Editor.__getCharacter

__getCharacter(pos)

Private method to get the character to the left of the current position in the current line.

pos
  position to get character at (integer)

Returns:
  requested character or "", if there are no more (string) and the next position (i.e. pos - 1)

#### Editor.__getCodeCoverageFile

__getCodeCoverageFile()

Private method to get the file name of the file containing coverage info.

Returns:
  file name of the coverage file (string)

#### Editor.__getEditorConfig

__getEditorConfig(option, nodefault=False, config=None)

Private method to get the requested option via EditorConfig.

If there is no EditorConfig defined, the equivalent built-in option will be used (Preferences.getEditor() ). The option must be given as the Preferences option key. The mapping to the EditorConfig option name will be done within this method.

option (str)
  Preferences option key
nodefault (bool)
  flag indicating to not get the default value from Preferences but return None instead
config (dict)
  reference to an EditorConfig object or None

Returns:
  value of requested setting or None if nothing was found and nodefault parameter was True

Return Type:
  any

#### Editor.__getMacroName

__getMacroName()

Private method to select a macro name from the list of macros.

Returns:
  Tuple of macro name and a flag, indicating, if the user pressed ok or canceled the operation. (string, boolean)

#### Editor.__getPyVersion

__getPyVersion()

Private method to return the Python main version (2 or 3) or 0 if it's not a Python file at all.

Returns:
  Python version (2 or 3) or 0 if it's not a Python file (int)

#### Editor.__getSaveFileName

__getSaveFileName(path=None)

Private method to get the name of the file to be saved.

path
  directory to save the file in (string)

Returns:
  file name (string)

#### Editor.__ignoreSpellingAlways

__ignoreSpellingAlways()

Private to always ignore the word below the spelling context menu.

#### Editor.__indentLine

__indentLine(indent=True)

Private method to indent or unindent the current line.

indent
  flag indicating an indent operation (boolean)
  If the flag is true, an indent operation is performed. Otherwise the current line is unindented.

#### Editor.__indentSelection

__indentSelection(indent=True)

Private method to indent or unindent the current selection.

indent
  flag indicating an indent operation (boolean)
  If the flag is true, an indent operation is performed. Otherwise the current line is unindented.

#### Editor.__initContextMenu

__initContextMenu()

Private method used to setup the context menu.

#### Editor.__initContextMenuAutocompletion

__initContextMenuAutocompletion()

Private method used to setup the Checks context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuChecks

__initContextMenuChecks()

Private method used to setup the Checks context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuEncodings

__initContextMenuEncodings()

Private method used to setup the Encodings context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuEol

__initContextMenuEol()

Private method to setup the eol context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuExporters

__initContextMenuExporters()

Private method used to setup the Exporters context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuGraphics

__initContextMenuGraphics()

Private method used to setup the diagrams context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuLanguages

__initContextMenuLanguages()

Private method used to setup the Languages context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuMargins

__initContextMenuMargins()

Private method used to setup the context menu for the margins.

#### Editor.__initContextMenuReopenWithEncoding

__initContextMenuReopenWithEncoding()

Private method used to setup the Reopen With Encoding context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuResources

__initContextMenuResources()

Private method used to setup the Resources context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuShow

__initContextMenuShow()

Private method used to setup the Show context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initContextMenuTools

__initContextMenuTools()

Private method used to setup the Tools context sub menu.

Returns:
  reference to the generated menu (QMenu)

#### Editor.__initOnlineChangeTrace

__initOnlineChangeTrace()

Private slot to initialize the online change trace.

#### Editor.__initOnlineSyntaxCheck

__initOnlineSyntaxCheck()

Private slot to initialize the online syntax check.

#### Editor.__isCommentedLine

__isCommentedLine(line, commentStr)

Private method to check, if the given line is a comment line as produced by the configured comment rules.

line
  text of the line to check (string)
commentStr
  comment string to check against (string)

Returns:
  flag indicating a commented line (boolean)

#### Editor.__isStartChar

__isStartChar(ch)

Private method to check, if a character is an autocompletion start character.

ch
  character to be checked (one character string)

Returns:
  flag indicating the result (boolean)

#### Editor.__languageChanged

__languageChanged(language, propagate=True)

Private slot handling a change of a connected editor's language.

language
  language to be set (string)
propagate=
  flag indicating to propagate the change (boolean)

#### Editor.__languageMenuTriggered

__languageMenuTriggered(act)

Private method to handle the selection of a lexer language.

act
  reference to the action that was triggered (QAction)

#### Editor.__lmBbookmarks

__lmBbookmarks()

Private method to handle the 'LMB toggles bookmark' context menu action.

#### Editor.__lmBbreakpoints

__lmBbreakpoints()

Private method to handle the 'LMB toggles breakpoint' context menu action.

#### Editor.__loadDiagram

__loadDiagram()

Private slot to load a diagram from file.

#### Editor.__loadEditorConfig

__loadEditorConfig(fileName="")

Private method to load the EditorConfig properties.

fileName (str)
  name of the file

#### Editor.__loadEditorConfigObject

__loadEditorConfigObject(fileName)

Private method to load the EditorConfig properties for the given file name.

fileName (str)
  name of the file

Returns:
  EditorConfig dictionary

Return Type:
  dict

#### Editor.__marginClicked

__marginClicked(margin, line, modifiers)

Private slot to handle the marginClicked signal.

margin
  id of the clicked margin (integer)
line
  line number of the click (integer)
modifiers
  keyboard modifiers (Qt.KeyboardModifiers)

#### Editor.__marginNumber

__marginNumber(xPos)

Private method to calculate the margin number based on a x position.

xPos
  x position (integer)

Returns:
  margin number (integer, -1 for no margin)

#### Editor.__markOccurrences

__markOccurrences()

Private method to mark all occurrences of the current word.

#### Editor.__menuClearBreakpoints

__menuClearBreakpoints()

Private slot to handle the 'Clear all breakpoints' context menu action.

#### Editor.__menuToggleBreakpointEnabled

__menuToggleBreakpointEnabled()

Private slot to handle the 'Enable/Disable breakpoint' context menu action.

#### Editor.__menuToggleTemporaryBreakpoint

__menuToggleTemporaryBreakpoint()

Private slot to handle the 'Toggle temporary breakpoint' context menu action.

#### Editor.__modificationChanged

__modificationChanged(m)

Private slot to handle the modificationChanged signal.

It emits the signal modificationStatusChanged with parameters m and self.

m
  modification status

#### Editor.__modificationReadOnly

__modificationReadOnly()

Private slot to handle the modificationAttempted signal.

#### Editor.__modified

__modified(pos, mtype, text, length, linesAdded, line, foldNow, foldPrev, token, annotationLinesAdded)

Private method to handle changes of the number of lines.

pos
  start position of change (integer)
mtype
  flags identifying the change (integer)
text
  text that is given to the Undo system (string)
length
  length of the change (integer)
linesAdded
  number of added/deleted lines (integer)
line
  line number of a fold level or marker change (integer)
foldNow
  new fold level (integer)
foldPrev
  previous fold level (integer)
token
  ???
annotationLinesAdded
  number of added/deleted annotation lines (integer)

#### Editor.__newView

__newView()

Private slot to create a new view to an open document.

#### Editor.__newViewNewSplit

__newViewNewSplit()

Private slot to create a new view to an open document.

#### Editor.__normalizedEncoding

__normalizedEncoding(encoding="")

Private method to calculate the normalized encoding string.

encoding
  encoding to be normalized (string)

Returns:
  normalized encoding (string)

#### Editor.__onlineChangeTraceTimerTimeout

__onlineChangeTraceTimerTimeout()

Private slot to mark added and changed lines.

#### Editor.__printPreview

__printPreview(printer)

Private slot to generate a print preview.

printer
  reference to the printer object (QScintilla.Printer.Printer)

#### Editor.__processEndEditCommand

__processEndEditCommand(argsString)

Private slot to process a remote EndEdit command.

argsString
  string containing the command parameters (string)

#### Editor.__processFlags

__processFlags()

Private method to extract flags and process them.

Returns:
  list of change flags (list of string)

#### Editor.__processRequestSyncCommand

__processRequestSyncCommand(argsString)

Private slot to process a remote RequestSync command.

argsString
  string containing the command parameters (string)

#### Editor.__processStartEditCommand

__processStartEditCommand(argsString)

Private slot to process a remote StartEdit command.

argsString
  string containing the command parameters (string)

#### Editor.__processSyncCommand

__processSyncCommand(argsString)

Private slot to process a remote Sync command.

argsString
  string containing the command parameters (string)

#### Editor.__processSyntaxCheckError

__processSyntaxCheckError(fn, msg)

Private slot to report an error message of a syntax check.

fn (str)
  filename of the file
msg (str)
  error message

#### Editor.__processSyntaxCheckResult

__processSyntaxCheckResult(fn, problems)

Private slot to report the resulting messages of a syntax check.

fn
  filename of the checked file (str)
problems
  dictionary with the keys 'error' and 'warnings' which hold a list containing details about the error/ warnings (file name, line number, column, codestring (only at syntax errors), the message) (dict)

#### Editor.__projectPropertiesChanged

__projectPropertiesChanged()

Private slot to handle changes of the project properties.

#### Editor.__refreshAnnotations

__refreshAnnotations()

Private method to refresh the annotations.

#### Editor.__registerImages

__registerImages()

Private method to register images for autocompletion lists.

#### Editor.__reinitOnlineChangeTrace

__reinitOnlineChangeTrace()

Private slot to re-initialize the online change trace.

#### Editor.__removeFromSpellingDictionary

__removeFromSpellingDictionary()

Private slot to remove the word below the context menu to the dictionary.

#### Editor.__removeTrailingWhitespace

__removeTrailingWhitespace()

Private method to remove trailing whitespace.

#### Editor.__reopenWithEncodingMenuTriggered

__reopenWithEncodingMenuTriggered(act)

Private method to handle the rereading of the file with a selected encoding.

act
  reference to the action that was triggered (QAction)

#### Editor.__replaceLeadingUnderscores

__replaceLeadingUnderscores(txt)

Private method to replace the first two underlines for invers sorting.

txt (str)
  completion text

Returns:
  modified completion text

Return Type:
  str

#### Editor.__resetLanguage

__resetLanguage(propagate=True)

Private method used to reset the language selection.

propagate=
  flag indicating to propagate the change (boolean)

#### Editor.__resetOnlineChangeTraceInfo

__resetOnlineChangeTraceInfo()

Private slot to reset the online change trace info.

#### Editor.__resetOnlineChangeTraceTimer

__resetOnlineChangeTraceTimer()

Private method to reset the online syntax check timer.

#### Editor.__resetOnlineSyntaxCheckTimer

__resetOnlineSyntaxCheckTimer()

Private method to reset the online syntax check timer.

#### Editor.__resizeLinenoMargin

__resizeLinenoMargin()

Private slot to resize the line numbers margin.

#### Editor.__restoreBreakpoints

__restoreBreakpoints()

Private method to restore the breakpoints.

#### Editor.__saveLastEditPosition

__saveLastEditPosition()

Private slot to record the last edit position.

#### Editor.__searchCurrentWord

__searchCurrentWord(forward=True)

Private slot to search the next occurrence of the current word.

forward
  flag indicating the search direction (boolean)

#### Editor.__selectAll

__selectAll()

Private slot handling the select all context menu action.

#### Editor.__selectPygmentsLexer

__selectPygmentsLexer()

Private method to select a specific pygments lexer.

Returns:
  name of the selected pygments lexer (string)

#### Editor.__send

__send(token, args=None)

Private method to send an editor command to remote editors.

token
  command token (string)
args
  arguments for the command (string)

#### Editor.__setAnnotation

__setAnnotation(line)

Private method to set the annotations for the given line.

line
  number of the line that needs annotation (integer)

#### Editor.__setAnnotationStyles

__setAnnotationStyles()

Private slot to define the style used by inline annotations.

#### Editor.__setAutoCompletion

__setAutoCompletion()

Private method to configure the autocompletion function.

#### Editor.__setCallTips

__setCallTips()

Private method to configure the calltips function.

#### Editor.__setEolMode

__setEolMode()

Private method to configure the eol mode of the editor.

#### Editor.__setLineMarkerColours

__setLineMarkerColours()

Private method to set the line marker colours.

#### Editor.__setMarginsDisplay

__setMarginsDisplay()

Private method to configure margins 0 and 2.

#### Editor.__setSpelling

__setSpelling()

Private method to initialize the spell checking functionality.

#### Editor.__setSpellingLanguage

__setSpellingLanguage(language, pwl="", pel="")

Private slot to set the spell checking language.

language
  spell checking language to be set (string)
pwl=
  name of the personal/project word list (string)
pel=
  name of the personal/project exclude list (string)

#### Editor.__setTabAndIndent

__setTabAndIndent()

Private method to set indentation size and style and tab width.

#### Editor.__setTextDisplay

__setTextDisplay()

Private method to configure the text display.

#### Editor.__showApplicationDiagram

__showApplicationDiagram()

Private method to handle the Imports Diagram context menu action.

#### Editor.__showClassDiagram

__showClassDiagram()

Private method to handle the Class Diagram context menu action.

#### Editor.__showCodeCoverage

__showCodeCoverage()

Private method to handle the code coverage context menu action.

#### Editor.__showCodeInfo

__showCodeInfo()

Private slot to handle the context menu action to show code info.

#### Editor.__showCodeMetrics

__showCodeMetrics()

Private method to handle the code metrics context menu action.

#### Editor.__showCompletionsList

__showCompletionsList(completions)

Private method to show the completions list.

completions (list of str or set of str)
  completions to be shown

#### Editor.__showContextMenu

__showContextMenu()

Private slot handling the aboutToShow signal of the context menu.

#### Editor.__showContextMenuAutocompletion

__showContextMenuAutocompletion()

Private slot called before the autocompletion menu is shown.

#### Editor.__showContextMenuChecks

__showContextMenuChecks()

Private slot handling the aboutToShow signal of the checks context menu.

#### Editor.__showContextMenuEncodings

__showContextMenuEncodings()

Private slot handling the aboutToShow signal of the encodings context menu.

#### Editor.__showContextMenuEol

__showContextMenuEol()

Private slot handling the aboutToShow signal of the eol context menu.

#### Editor.__showContextMenuGraphics

__showContextMenuGraphics()

Private slot handling the aboutToShow signal of the diagrams context menu.

#### Editor.__showContextMenuLanguages

__showContextMenuLanguages()

Private slot handling the aboutToShow signal of the languages context menu.

#### Editor.__showContextMenuMargin

__showContextMenuMargin(menu)

Private slot handling the aboutToShow signal of the margins context menu.

menu (QMenu)
  reference to the menu to be shown

#### Editor.__showContextMenuResources

__showContextMenuResources()

Private slot handling the aboutToShow signal of the resources context menu.

#### Editor.__showContextMenuShow

__showContextMenuShow()

Private slot called before the show menu is shown.

#### Editor.__showContextMenuSpelling

__showContextMenuSpelling()

Private slot to set up the spelling menu before it is shown.

#### Editor.__showContextMenuTools

__showContextMenuTools()

Private slot handling the aboutToShow signal of the tools context menu.

#### Editor.__showImportsDiagram

__showImportsDiagram()

Private method to handle the Imports Diagram context menu action.

#### Editor.__showPackageDiagram

__showPackageDiagram()

Private method to handle the Package Diagram context menu action.

#### Editor.__showProfileData

__showProfileData()

Private method to handle the show profile data context menu action.

#### Editor.__showSyntaxError

__showSyntaxError(line=-1)

Private slot to handle the 'Show syntax error message' context menu action.

line
  line number to show the syntax error for (integer)

#### Editor.__showWarning

__showWarning(line=-1)

Private slot to handle the 'Show warning' context menu action.

line
  line number to show the warning for (integer)

#### Editor.__spellCharAdded

__spellCharAdded(charNumber)

Private slot called to handle the user entering a character.

charNumber
  value of the character entered (integer)

#### Editor.__styleNeeded

__styleNeeded(position)

Private slot to handle the need for more styling.

position
  end position, that needs styling (integer)

#### Editor.__textChanged

__textChanged()

Private slot to handle a change of the editor text.

This slot defers the handling to the next time the event loop is run in order to ensure, that cursor position has been updated by the underlying Scintilla editor.

#### Editor.__toggleAutoCompletionEnable

__toggleAutoCompletionEnable()

Private slot to handle the Enable Autocompletion context menu entry.

#### Editor.__toggleBreakpoint

__toggleBreakpoint(line, temporary=False)

Private method to toggle a breakpoint.

line
  line number of the breakpoint (integer)
temporary
  flag indicating a temporary breakpoint (boolean)

#### Editor.__toggleBreakpointEnabled

__toggleBreakpointEnabled(line)

Private method to toggle a breakpoints enabled status.

line
  line number of the breakpoint (integer)

#### Editor.__toggleTypingAids

__toggleTypingAids()

Private slot to toggle the typing aids.

#### Editor.__updateReadOnly

__updateReadOnly(bForce=True)

Private method to update the readOnly information for this editor.

If bForce is True, then updates everything regardless if the attributes have actually changed, such as during initialization time. A signal is emitted after the caption change.

bForce
  True to force change, False to only update and emit signal if there was an attribute change.

#### Editor.addCallTipHook

addCallTipHook(key, func)

Public method to set a calltip provider.

key (str)
  name of the provider
func (function(editor, int, int) -> list of str)
  function providing calltips. func should be a function taking a reference to the editor, a position into the text and the amount of commas to the left of the cursor. It should return the possible calltips as a list of strings.

#### Editor.addClone

addClone(editor)

Public method to add a clone to our list.

editor (Editor)
  reference to the cloned editor

#### Editor.addCompletionListHook

addCompletionListHook(key, func, asynchroneous=False)

Public method to set an auto-completion list provider.

key (str)
  name of the provider
func (function(editor, bool) -> list of str in case async is False)
  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
asynchroneous (bool)
  flag indicating an asynchroneous function

#### Editor.addedToProject

addedToProject()

Public method to signal, that this editor has been added to a project.

#### Editor.autoComplete

autoComplete(auto=False, context=True)

Public method to start auto-completion.

auto=
  flag indicating a call from the __charAdded method (boolean)
context=
  flag indicating to complete a context (boolean)

#### Editor.autoCompleteQScintilla

autoCompleteQScintilla()

Public method to perform an autocompletion using QScintilla methods.

#### Editor.boxCommentLine

boxCommentLine()

Public slot to box comment the current line.

#### Editor.boxCommentLineOrSelection

boxCommentLineOrSelection()

Public slot to box comment the current line or current selection.

#### Editor.boxCommentSelection

boxCommentSelection()

Public slot to box comment the current selection.

#### Editor.callTip

callTip()

Public method to show calltips.

#### Editor.canAutoCompleteFromAPIs

canAutoCompleteFromAPIs()

Public method to check for API availablity.

Returns:
  flag indicating autocompletion from APIs is available (boolean)

#### Editor.canProvideCallTipps

canProvideCallTipps()

Public method to test the calltips availability.

Returns:
  flag indicating the availability of calltips (boolean)

#### Editor.canProvideDynamicAutoCompletion

canProvideDynamicAutoCompletion()

Public method to test the dynamic auto-completion availability.

Returns:
  flag indicating the availability of dynamic auto-completion (boolean)

#### Editor.cancelSharedEdit

cancelSharedEdit(send=True)

Public slot to cancel a shared edit session for the editor.

send=
  flag indicating to send the CancelEdit command (boolean)

#### Editor.changeEvent

changeEvent(evt)

Protected method called to process an event.

This implements special handling for the events showMaximized, showMinimized and showNormal. The windows caption is shortened for the minimized mode and reset to the full filename for the other modes. This is to make the editor windows work nicer with the QWorkspace.

evt
  the event, that was generated (QEvent)

#### Editor.checkDirty

checkDirty()

Public method to check dirty status and open a message window.

Returns:
  flag indicating successful reset of the dirty flag (boolean)

#### Editor.checkSpelling

checkSpelling()

Public slot to perform an interactive spell check of the document.

#### Editor.checkSyntax

checkSyntax()

Public method to perform an automatic syntax check of the file.

#### Editor.clearAllHighlights

clearAllHighlights()

Public method to clear all highlights.

#### Editor.clearBookmarks

clearBookmarks()

Public slot to handle the 'Clear all bookmarks' context menu action.

#### Editor.clearBreakpoint

clearBreakpoint(line)

Public method to clear a breakpoint.

Note: This doesn't clear the breakpoint in the debugger, it just deletes it from the editor internal list of breakpoints.

line
  line number of the breakpoint (integer)

#### Editor.clearFlakesWarnings

clearFlakesWarnings()

Public slot to clear all pyflakes warnings.

#### Editor.clearHighlight

clearHighlight(startLine, startIndex, endLine, endIndex)

Public method to clear a text highlight.

startLine (int)
  line of the highlight start
startIndex (int)
  index of the highlight start
endLine (int)
  line of the highlight end
endIndex (int)
  index of the highlight end

#### Editor.clearSearchIndicators

clearSearchIndicators()

Public method to clear all search indicators.

#### Editor.clearStyleWarnings

clearStyleWarnings()

Public slot to clear all style warnings.

#### Editor.clearStyles

clearStyles()

Public method to set the styles according the selected Qt style or the selected editor colours.

#### Editor.clearSyntaxError

clearSyntaxError()

Public slot to handle the 'Clear all syntax error' context menu action.

#### Editor.clearWarnings

clearWarnings()

Public slot to clear all warnings.

#### Editor.close

close(alsoDelete=False)

Public method called when the window gets closed.

This overwritten method redirects the action to our ViewManager.closeEditor, which in turn calls our closeIt method.

alsoDelete
  ignored

Returns:
  flag indicating a successful close of the editor (boolean)

#### Editor.closeIt

closeIt()

Public method called by the viewmanager to finally get rid of us.

#### Editor.codeCoverageShowAnnotations

codeCoverageShowAnnotations(silent=False)

Public method to handle the show code coverage annotations context menu action.

silent
  flag indicating to not show any dialog (boolean)

#### Editor.collapseFoldWithChildren

collapseFoldWithChildren(line=-1)

Public slot to collapse the current fold including its children.

line (int)
  number of line to be expanded

#### Editor.commentLine

commentLine()

Public slot to comment the current line.

#### Editor.commentLineOrSelection

commentLineOrSelection()

Public slot to comment the current line or current selection.

#### Editor.commentSelection

commentSelection()

Public slot to comment the current selection.

#### Editor.completionsListReady

completionsListReady(completions, acText)

Public method to show the completions determined by a completions provider.

completions (list of str or set of str)
  list of possible completions
acText (str)
  text to be completed

#### Editor.contextMenuEvent

contextMenuEvent(evt)

Protected method implementing the context menu event.

evt
  the context menu event (QContextMenuEvent)

#### Editor.curLineHasBreakpoint

curLineHasBreakpoint()

Public method to check for the presence of a breakpoint at the current line.

Returns:
  flag indicating the presence of a breakpoint (boolean)

#### Editor.determineFileType

determineFileType()

Public method to determine the file type using various tests.

Returns:
  type of the displayed file or an empty string (string)

#### Editor.dragEnterEvent

dragEnterEvent(event)

Protected method to handle the drag enter event.

event
  the drag enter event (QDragEnterEvent)

#### Editor.dragLeaveEvent

dragLeaveEvent(event)

Protected method to handle the drag leave event.

event
  the drag leave event (QDragLeaveEvent)

#### Editor.dragMoveEvent

dragMoveEvent(event)

Protected method to handle the drag move event.

event
  the drag move event (QDragMoveEvent)

#### Editor.dropEvent

dropEvent(event)

Protected method to handle the drop event.

event
  the drop event (QDropEvent)

#### Editor.editorCommand

editorCommand(cmd)

Public method to perform a simple editor command.

cmd
  the scintilla command to be performed

#### Editor.ensureVisible

ensureVisible(line, expand=False)

Public slot to ensure, that the specified line is visible.

line (int)
  line number to make visible
expand= (bool)
  flag indicating to expand all folds

#### Editor.ensureVisibleTop

ensureVisibleTop(line, expand=False)

Public slot to ensure, that the specified line is visible at the top of the editor.

line (int)
  line number to make visible
expand= (bool)
  flag indicating to expand all folds

#### Editor.event

event(evt)

Public method handling events.

evt
  reference to the event (QEvent)

Returns:
  flag indicating, if the event was handled (boolean)

#### Editor.expandFoldWithChildren

expandFoldWithChildren(line=-1)

Public slot to expand the current fold including its children.

line (int)
  number of line to be expanded

#### Editor.exportFile

exportFile(exporterFormat)

Public method to export the file.

exporterFormat
  format the file should be exported into (string)

#### Editor.extractTasks

extractTasks()

Public slot to extract all tasks.

#### Editor.fileRenamed

fileRenamed(fn)

Public slot to handle the editorRenamed signal.

fn
  filename to be set for the editor (string).

#### Editor.focusInEvent

focusInEvent(event)

Protected method called when the editor receives focus.

This method checks for modifications of the current file and rereads it upon request. The cursor is placed at the current position assuming, that it is in the vicinity of the old position after the reread.

event
  the event object (QFocusEvent)

#### Editor.focusOutEvent

focusOutEvent(event)

Protected method called when the editor loses focus.

event
  the event object (QFocusEvent)

#### Editor.gestureEvent

gestureEvent(evt)

Protected method handling gesture events.

evt
  reference to the gesture event (QGestureEvent

#### Editor.getApiLanguage

getApiLanguage()

Public method to get the API language of the editor.

Returns:
  API language

Return Type:
  str

#### Editor.getBookmarkLines

getBookmarkLines()

Public method to get the lines containing a bookmark.

Returns:
  list of lines containing a bookmark (list of integer)

#### Editor.getBookmarks

getBookmarks()

Public method to retrieve the bookmarks.

Returns:
  sorted list of all lines containing a bookmark (list of integer)

#### Editor.getBreakpointLines

getBreakpointLines()

Public method to get the lines containing a breakpoint.

Returns:
  list of lines containing a breakpoint (list of integer)

#### Editor.getCallTipHook

getCallTipHook(key)

Public method to get the registered calltip provider.

key (str)
  name of the provider

Returns:
  function providing calltips

Return Type:
  function or None

#### Editor.getChangeLines

getChangeLines()

Public method to get the lines containing a change.

Returns:
  list of lines containing a change (list of integer)

#### Editor.getCompleter

getCompleter()

Public method to retrieve a reference to the completer object.

Returns:
  the completer object (CompleterBase)

#### Editor.getCompletionListHook

getCompletionListHook(key)

Public method to get the registered completion list provider.

key (str)
  name of the provider

Returns:
  function providing completion list

Return Type:
  function or None

#### Editor.getCoverageLines

getCoverageLines()

Public method to get the lines containing a coverage marker.

Returns:
  list of lines containing a coverage marker (list of integer)

#### Editor.getCurrentWord

getCurrentWord()

Public method to get the word at the current position.

Returns:
  the word at that current position (string)

#### Editor.getCurrentWordBoundaries

getCurrentWordBoundaries()

Public method to get the word boundaries at the current position.

Returns:
  tuple with start and end indexes of the current word (integer, integer)

#### Editor.getEditorConfig

getEditorConfig(option)

Public method to get the requested option via EditorConfig.

option (str)
  Preferences option key

Returns:
  value of requested setting

Return Type:
  any

#### Editor.getEncoding

getEncoding()

Public method to return the current encoding.

Returns:
  current encoding (string)

#### Editor.getFileName

getFileName()

Public method to return the name of the file being displayed.

Returns:
  filename of the displayed file (string)

#### Editor.getFileType

getFileType()

Public method to return the type of the file being displayed.

Returns:
  type of the displayed file (string)

#### Editor.getFileTypeByFlag

getFileTypeByFlag()

Public method to return the type of the file, if it was set by an eflag: marker.

Returns:
  type of the displayed file, if set by an eflag: marker or an empty string (string)

#### Editor.getHighlightPosition

getHighlightPosition()

Public method to return the position of the highlight bar.

Returns:
  line number of the highlight bar (integer)

#### Editor.getLanguage

getLanguage(normalized=True, forPygments=False)

Public method to retrieve the language of the editor.

normalized=
  flag indicating to normalize some Pygments lexer names (boolean)
forPygments=
  flag indicating to normalize some lexer names for Pygments (boolean)

Returns:
  language of the editor (string)

#### Editor.getLexer

getLexer()

Public method to retrieve a reference to the lexer object.

Returns:
  the lexer object (Lexer)

#### Editor.getMenu

getMenu(menuName)

Public method to get a reference to the main context menu or a submenu.

menuName
  name of the menu (string)

Returns:
  reference to the requested menu (QMenu) or None

#### Editor.getMouseClickHandler

getMouseClickHandler(modifiers, button)

Public method to get a registered mouse click handler.

modifiers (Qt.KeyboardModifiers)
  keyboard modifiers of the handler
button (Qt.MouseButton)
  mouse button of the handler

Returns:
  plug-in name and registered function

Return Type:
  tuple of str and func

#### Editor.getMouseClickHandlers

getMouseClickHandlers(name)

Public method to get all registered mouse click handlers of a plug-in.

name (str)
  name of the plug-in

Returns:
  registered mouse click handlers as list of modifiers, mouse button and function

Return Type:
  list of tuple of (Qt.KeyboardModifiers, Qt.MouseButton,func)

#### Editor.getNoName

getNoName()

Public method to get the display string for an unnamed editor.

Returns:
  display string for this unnamed editor (string)

#### Editor.getSearchIndicatorLines

getSearchIndicatorLines()

Public method to get the lines containing a search indicator.

Returns:
  list of lines containing a search indicator (list of integer)

#### Editor.getSearchText

getSearchText(selectionOnly=False)

Public method to determine the selection or the current word for the next search operation.

selectionOnly
  flag indicating that only selected text should be returned (boolean)

Returns:
  selection or current word (string)

#### Editor.getSharingStatus

getSharingStatus()

Public method to get some share status info.

Returns:
  tuple indicating, if the editor is sharable, the sharing status, if it is inside a locally initiated shared edit session and if it is inside a remotely initiated shared edit session (boolean, boolean, boolean, boolean)

#### Editor.getSyntaxErrorLines

getSyntaxErrorLines()

Public method to get the lines containing a syntax error.

Returns:
  list of lines containing a syntax error (list of integer)

#### Editor.getSyntaxErrors

getSyntaxErrors()

Public method to retrieve the syntax error markers.

Returns:
  sorted list of all lines containing a syntax error (list of integer)

#### Editor.getTaskLines

getTaskLines()

Public method to get the lines containing a task.

Returns:
  list of lines containing a task (list of integer)

#### Editor.getVcsConflictMarkerLines

getVcsConflictMarkerLines()

Public method to determine the lines containing a VCS conflict marker.

Returns:
  list of line numbers containg a VCS conflict marker

Return Type:
  list of int

#### Editor.getWarningLines

getWarningLines()

Public method to get the lines containing a warning.

Returns:
  list of lines containing a warning (list of integer)

#### Editor.getWarnings

getWarnings()

Public method to retrieve the warning markers.

Returns:
  sorted list of all lines containing a warning (list of integer)

#### Editor.getWord

getWord(line, index, direction=0, useWordChars=True)

Public method to get the word at a position.

line
  number of line to look at (int)
index
  position to look at (int)
direction
  direction to look in (0 = whole word, 1 = left, 2 = right)
useWordChars=
  flag indicating to use the wordCharacters method (boolean)

Returns:
  the word at that position (string)

#### Editor.getWordBoundaries

getWordBoundaries(line, index, useWordChars=True)

Public method to get the word boundaries at a position.

line
  number of line to look at (int)
index
  position to look at (int)
useWordChars=
  flag indicating to use the wordCharacters method (boolean)

Returns:
  tuple with start and end indexes of the word at the position (integer, integer)

#### Editor.getWordLeft

getWordLeft(line, index)

Public method to get the word to the left of a position.

line
  number of line to look at (int)
index
  position to look at (int)

Returns:
  the word to the left of that position (string)

#### Editor.getWordRight

getWordRight(line, index)

Public method to get the word to the right of a position.

line
  number of line to look at (int)
index
  position to look at (int)

Returns:
  the word to the right of that position (string)

#### Editor.gotoLastEditPosition

gotoLastEditPosition()

Public method to move the cursor to the last edit position.

#### Editor.gotoLine

gotoLine(line, pos=1, firstVisible=False, expand=False)

Public slot to jump to the beginning of a line.

line (int)
  line number to go to
pos= (int)
  position in line to go to
firstVisible= (bool)
  flag indicating to make the line the first visible line
expand= (bool)
  flag indicating to expand all folds

#### Editor.gotoMethodClass

gotoMethodClass(goUp=False)

Public method to go to the next Python method or class definition.

goUp
  flag indicating the move direction (boolean)

#### Editor.gotoSyntaxError

gotoSyntaxError()

Public slot to handle the 'Goto syntax error' context menu action.

#### Editor.handleMonospacedEnable

handleMonospacedEnable()

Public slot to handle the Use Monospaced Font context menu entry.

#### Editor.handleRenamed

handleRenamed(fn)

Public slot to handle the editorRenamed signal.

fn
  filename to be set for the editor (string).

#### Editor.hasBookmarks

hasBookmarks()

Public method to check for the presence of bookmarks.

Returns:
  flag indicating the presence of bookmarks (boolean)

#### Editor.hasBreakpoints

hasBreakpoints()

Public method to check for the presence of breakpoints.

Returns:
  flag indicating the presence of breakpoints (boolean)

#### Editor.hasChangeMarkers

hasChangeMarkers()

Public method to determine, if this editor contains any change markers.

Returns:
  flag indicating the presence of change markers (boolean)

#### Editor.hasCoverageMarkers

hasCoverageMarkers()

Public method to test, if there are coverage markers.

Returns:
  flag indicating the presence of coverage markers (boolean)

#### Editor.hasMiniMenu

hasMiniMenu()

Public method to check the miniMenu flag.

Returns:
  flag indicating a minimized context menu (boolean)

#### Editor.hasSyntaxErrors

hasSyntaxErrors()

Public method to check for the presence of syntax errors.

Returns:
  flag indicating the presence of syntax errors (boolean)

#### Editor.hasTaskMarkers

hasTaskMarkers()

Public method to determine, if this editor contains any task markers.

Returns:
  flag indicating the presence of task markers (boolean)

#### Editor.hasWarnings

hasWarnings()

Public method to check for the presence of warnings.

Returns:
  flag indicating the presence of warnings (boolean)

#### Editor.highlight

highlight(line=None, error=False, syntaxError=False)

Public method to highlight [or de-highlight] a particular line.

line
  line number to highlight (integer)
error
  flag indicating whether the error highlight should be used (boolean)
syntaxError
  flag indicating a syntax error (boolean)

#### Editor.highlightVisible

highlightVisible()

Public method to make sure that the highlight is visible.

#### Editor.indentLineOrSelection

indentLineOrSelection()

Public slot to indent the current line or current selection.

#### Editor.isClone

isClone(editor)

Public method to test, if the given editor is a clone.

editor (Editor)
  reference to the cloned editor

Returns:
  flag indicating a clone

Return Type:
  bool

#### Editor.isJavascriptFile

isJavascriptFile()

Public method to return a flag indicating a Javascript file.

Returns:
  flag indicating a Javascript file (boolean)

#### Editor.isLastEditPositionAvailable

isLastEditPositionAvailable()

Public method to check, if a last edit position is available.

Returns:
  flag indicating availability (boolean)

#### Editor.isPy2File

isPy2File()

Public method to return a flag indicating a Python2 file.

Returns:
  flag indicating a Python2 file (boolean)

#### Editor.isPy3File

isPy3File()

Public method to return a flag indicating a Python3 file.

Returns:
  flag indicating a Python3 file (boolean)

#### Editor.isPyFile

isPyFile()

Public method to return a flag indicating a Python (2 or 3) file.

Returns:
  flag indicating a Python (2 or 3) file (boolean)

#### Editor.isRubyFile

isRubyFile()

Public method to return a flag indicating a Ruby file.

Returns:
  flag indicating a Ruby file (boolean)

#### Editor.isSpellCheckRegion

isSpellCheckRegion(pos)

Public method to check, if the given position is within a region, that should be spell checked.

pos
  position to be checked (integer)

Returns:
  flag indicating pos is in a spell check region (boolean)

#### Editor.joinLines

joinLines()

Public slot to join the current line with the next one.

#### Editor.keyPressEvent

keyPressEvent(ev)

Protected method to handle the user input a key at a time.

ev
  key event (QKeyEvent)

#### Editor.macroDelete

macroDelete()

Public method to delete a macro.

#### Editor.macroLoad

macroLoad()

Public method to load a macro from a file.

#### Editor.macroRecordingStart

macroRecordingStart()

Public method to start macro recording.

#### Editor.macroRecordingStop

macroRecordingStop()

Public method to stop macro recording.

#### Editor.macroRun

macroRun()

Public method to execute a macro.

#### Editor.macroSave

macroSave()

Public method to save a macro to a file.

#### Editor.menuEditBreakpoint

menuEditBreakpoint(line=None)

Public slot to handle the 'Edit breakpoint' context menu action.

line
  linenumber of the breakpoint to edit

#### Editor.menuNextBreakpoint

menuNextBreakpoint()

Public slot to handle the 'Next breakpoint' context menu action.

#### Editor.menuPreviousBreakpoint

menuPreviousBreakpoint()

Public slot to handle the 'Previous breakpoint' context menu action.

#### Editor.menuToggleBookmark

menuToggleBookmark()

Public slot to handle the 'Toggle bookmark' context menu action.

#### Editor.menuToggleBreakpoint

menuToggleBreakpoint()

Public slot to handle the 'Toggle breakpoint' context menu action.

#### Editor.mouseDoubleClickEvent

mouseDoubleClickEvent(evt)

Protected method to handle mouse double click events.

evt (QMouseEvent)
  reference to the mouse event

#### Editor.mousePressEvent

mousePressEvent(event)

Protected method to handle the mouse press event.

event
  the mouse press event (QMouseEvent)

#### Editor.mouseReleaseEvent

mouseReleaseEvent(evt)

Protected method calling a registered mouse click handler function.

evt (QMouseEvent)
  event object

#### Editor.newBreakpointWithProperties

newBreakpointWithProperties(line, properties)

Public method to set a new breakpoint and its properties.

line
  line number of the breakpoint (integer)
properties
  properties for the breakpoint (tuple) (condition, temporary flag, enabled flag, ignore count)

#### Editor.nextBookmark

nextBookmark()

Public slot to handle the 'Next bookmark' context menu action.

#### Editor.nextChange

nextChange()

Public slot to handle the 'Next change' context menu action.

#### Editor.nextTask

nextTask()

Public slot to handle the 'Next task' context menu action.

#### Editor.nextUncovered

nextUncovered()

Public slot to handle the 'Next uncovered' context menu action.

#### Editor.nextWarning

nextWarning()

Public slot to handle the 'Next warning' context menu action.

#### Editor.previousBookmark

previousBookmark()

Public slot to handle the 'Previous bookmark' context menu action.

#### Editor.previousChange

previousChange()

Public slot to handle the 'Previous change' context menu action.

#### Editor.previousTask

previousTask()

Public slot to handle the 'Previous task' context menu action.

#### Editor.previousUncovered

previousUncovered()

Public slot to handle the 'Previous uncovered' context menu action.

#### Editor.previousWarning

previousWarning()

Public slot to handle the 'Previous warning' context menu action.

#### Editor.printFile

printFile()

Public slot to print the text.

#### Editor.printPreviewFile

printPreviewFile()

Public slot to show a print preview of the text.

#### Editor.projectClosed

projectClosed()

Public slot to handle the closing of a project.

#### Editor.projectLexerAssociationsChanged

projectLexerAssociationsChanged()

Public slot to handle changes of the project lexer associations.

#### Editor.projectOpened

projectOpened()

Public slot to handle the opening of a project.

#### Editor.readFile

readFile(fn, createIt=False, encoding="")

Public slot to read the text from a file.

fn
  filename to read from (string)
createIt=
  flag indicating the creation of a new file, if the given one doesn't exist (boolean)
encoding=
  encoding to be used to read the file (string) (Note: this parameter overrides encoding detection)

#### Editor.readSettings

readSettings()

Public slot to read the settings into our lexer.

#### Editor.receive

receive(command)

Public slot to handle received editor commands.

command
  command string (string)

#### Editor.redo

redo()

Public method to redo the last recorded change.

#### Editor.refresh

refresh()

Public slot to refresh the editor contents.

#### Editor.refreshCoverageAnnotations

refreshCoverageAnnotations()

Public method to refresh the code coverage annotations.

#### Editor.removeCallTipHook

removeCallTipHook(key)

Public method to remove a previously registered calltip provider.

key (str)
  name of the provider

#### Editor.removeClone

removeClone(editor)

Public method to remove a clone from our list.

editor (Editor)
  reference to the cloned editor

#### Editor.removeCompletionListHook

removeCompletionListHook(key)

Public method to remove a previously registered completion list provider.

key (str)
  name of the provider

#### Editor.removeMouseClickHandler

removeMouseClickHandler(modifiers, button)

Public method to un-registered a mouse click handler.

modifiers (Qt.KeyboardModifiers)
  keyboard modifiers of the handler
button (Qt.MouseButton)
  mouse button of the handler

#### Editor.removeMouseClickHandlers

removeMouseClickHandlers(name)

Public method to un-registered all mouse click handlers of a plug-in.

name (str)
  name of the plug-in

#### Editor.resizeEvent

resizeEvent(evt)

Protected method handling resize events.

evt
  reference to the resize event (QResizeEvent)

#### Editor.revertToUnmodified

revertToUnmodified()

Public method to revert back to the last saved state.

#### Editor.saveFile

saveFile(saveas=False, path=None)

Public method to save the text to a file.

saveas
  flag indicating a 'save as' action (boolean)
path
  directory to save the file in (string)

Returns:
  flag indicating success (boolean)

#### Editor.saveFileAs

saveFileAs(path=None, toProject=False)

Public slot to save a file with a new name.

path
  directory to save the file in (string)
toProject=
  flag indicating a save to project operation (boolean)

Returns:
  tuple of two values (boolean, string) giving a success indicator and the name of the saved file

#### Editor.saveFileCopy

saveFileCopy(path=None)

Public method to save a copy of the file.

path
  directory to save the file in (string)

Returns:
  flag indicating success (boolean)

#### Editor.searchCurrentWordBackward

searchCurrentWordBackward()

Public slot to search the current word backward.

#### Editor.searchCurrentWordForward

searchCurrentWordForward()

Public slot to search the current word forward.

#### Editor.selectCurrentWord

selectCurrentWord()

Public method to select the current word.

#### Editor.selectWord

selectWord(line, index)

Public method to select the word at a position.

line
  number of line to look at (int)
index
  position to look at (int)

#### Editor.sendSharedEdit

sendSharedEdit()

Public slot to end a shared edit session for the editor and send the changes.

#### Editor.setAutoCompletionEnabled

setAutoCompletionEnabled(enable)

Public method to enable/disable autocompletion.

enable
  flag indicating the desired autocompletion status (boolean)

#### Editor.setAutoSpellChecking

setAutoSpellChecking()

Public method to set the automatic spell checking.

#### Editor.setHighlight

setHighlight(startLine, startIndex, endLine, endIndex)

Public method to set a text highlight.

startLine (int)
  line of the highlight start
startIndex (int)
  index of the highlight start
endLine (int)
  line of the highlight end
endIndex (int)
  index of the highlight end

#### Editor.setLanguage

setLanguage(filename, initTextDisplay=True, propagate=True, pyname="")

Public method to set a lexer language.

filename
  filename used to determine the associated lexer language (string)
initTextDisplay
  flag indicating an initialization of the text display is required as well (boolean)
propagate=
  flag indicating to propagate the change (boolean)
pyname=
  name of the pygments lexer to use (string)

#### Editor.setMonospaced

setMonospaced(on)

Public method to set/reset a monospaced font.

on
  flag to indicate usage of a monospace font (boolean)

#### Editor.setMouseClickHandler

setMouseClickHandler(name, modifiers, button, function)

Public method to set a mouse click handler.

name (str)
  name of the plug-in (or 'internal') setting this handler
modifiers (Qt.KeyboardModifiers or int)
  keyboard modifiers of the handler
button (Qt.MouseButton or int)
  mouse button of the handler
function (func)
  handler function

Returns:
  flag indicating success

Return Type:
  bool

#### Editor.setNoName

setNoName(noName)

Public method to set the display string for an unnamed editor.

noName
  display string for this unnamed editor (string)

#### Editor.setSearchIndicator

setSearchIndicator(startPos, indicLength)

Public method to set a search indicator for the given range.

startPos
  start position of the indicator (integer)
indicLength
  length of the indicator (integer)

#### Editor.setSpellingForProject

setSpellingForProject()

Public method to set the spell checking options for files belonging to the current project.

#### Editor.shareConnected

shareConnected(connected)

Public slot to handle a change of the connected state.

connected
  flag indicating the connected state (boolean)

#### Editor.shareEditor

shareEditor(share)

Public slot to set the shared status of the editor.

share
  flag indicating the share status (boolean)

#### Editor.shortenEmptyLines

shortenEmptyLines()

Public slot to compress lines consisting solely of whitespace characters.

#### Editor.shouldAutosave

shouldAutosave()

Public slot to check the autosave flags.

Returns:
  flag indicating this editor should be saved (boolean)

#### Editor.smartIndentLineOrSelection

smartIndentLineOrSelection()

Public slot to indent current line smartly.

#### Editor.sortLines

sortLines()

Public slot to sort the lines spanned by a rectangular selection.

#### Editor.startSharedEdit

startSharedEdit()

Public slot to start a shared edit session for the editor.

#### Editor.streamCommentLine

streamCommentLine()

Public slot to stream comment the current line.

#### Editor.streamCommentLineOrSelection

streamCommentLineOrSelection()

Public slot to stream comment the current line or current selection.

#### Editor.streamCommentSelection

streamCommentSelection()

Public slot to comment the current selection.

#### Editor.toggleBookmark

toggleBookmark(line)

Public method to toggle a bookmark.

line
  line number of the bookmark (integer)

#### Editor.toggleCommentBlock

toggleCommentBlock()

Public slot to toggle the comment of a block.

If the line of the cursor or the selection is not commented, it will be commented. If it is commented, the comment block will be removed. The later works independent of the current selection.

#### Editor.toggleCurrentFold

toggleCurrentFold()

Public slot to toggle the fold containing the current line.

#### Editor.toggleSyntaxError

toggleSyntaxError(line, index, error, msg="", show=False)

Public method to toggle a syntax error indicator.

line
  line number of the syntax error (integer)
index
  index number of the syntax error (integer)
error
  flag indicating if the error marker should be set or deleted (boolean)
msg
  error message (string)
show=
  flag indicating to set the cursor to the error position (boolean)

#### Editor.toggleWarning

toggleWarning(line, col, warning, msg="", warningType=WarningCode)

Public method to toggle a warning indicator.

Note: This method is used to set pyflakes and code style warnings.

line
  line number of the warning
col
  column of the warning
warning
  flag indicating if the warning marker should be set or deleted (boolean)
msg
  warning message (string)
warningType=
  type of warning message (integer)

#### Editor.uncommentLine

uncommentLine()

Public slot to uncomment the current line.

#### Editor.uncommentLineOrSelection

uncommentLineOrSelection()

Public slot to uncomment the current line or current selection.

#### Editor.uncommentSelection

uncommentSelection()

Public slot to uncomment the current selection.

#### Editor.undo

undo()

Public method to undo the last recorded change.

#### Editor.unindentLineOrSelection

unindentLineOrSelection()

Public slot to unindent the current line or current selection.

#### Editor.updateMarkerMap

updateMarkerMap()

Public method to initiate an update of the marker map.

#### Editor.viewportEvent

viewportEvent(evt)

Protected method handling event of the viewport.

evt
  reference to the event (QEvent)

Returns:
  flag indiating that the event was handled (boolean)

#### Editor.wheelEvent

wheelEvent(evt)

Protected method to handle wheel events.

evt
  reference to the wheel event (QWheelEvent)

#### Editor.writeFile

writeFile(fn, backup=True)

Public slot to write the text to a file.

fn
  filename to write to (string)
backup
  flag indicating to save a backup (boolean)

Returns:
  flag indicating success (boolean)

Up