Mon, 03 Mar 2014 19:27:11 +0100
Added methods to extract the line numbers of the various marker types to the editor.
--- a/APIs/Python3/eric5.api Mon Mar 03 19:22:19 2014 +0100 +++ b/APIs/Python3/eric5.api Mon Mar 03 19:27:11 2014 +0100 @@ -6826,8 +6826,12 @@ eric5.QScintilla.Editor.Editor.focusInEvent?4(event) eric5.QScintilla.Editor.Editor.focusOutEvent?4(event) eric5.QScintilla.Editor.Editor.gestureEvent?4(evt) +eric5.QScintilla.Editor.Editor.getBookmarkLines?4() eric5.QScintilla.Editor.Editor.getBookmarks?4() +eric5.QScintilla.Editor.Editor.getBreakpointLines?4() +eric5.QScintilla.Editor.Editor.getChangeLines?4() eric5.QScintilla.Editor.Editor.getCompleter?4() +eric5.QScintilla.Editor.Editor.getCoverageLines?4() eric5.QScintilla.Editor.Editor.getCurrentWord?4() eric5.QScintilla.Editor.Editor.getCurrentWordBoundaries?4() eric5.QScintilla.Editor.Editor.getEncoding?4() @@ -6841,7 +6845,10 @@ eric5.QScintilla.Editor.Editor.getNoName?4() eric5.QScintilla.Editor.Editor.getSearchText?4(selectionOnly=False) eric5.QScintilla.Editor.Editor.getSharingStatus?4() +eric5.QScintilla.Editor.Editor.getSyntaxErrorLines?4() eric5.QScintilla.Editor.Editor.getSyntaxErrors?4() +eric5.QScintilla.Editor.Editor.getTaskLines?4() +eric5.QScintilla.Editor.Editor.getWarningLines?4() eric5.QScintilla.Editor.Editor.getWarnings?4() eric5.QScintilla.Editor.Editor.getWord?4(line, index, direction=0, useWordChars=True) eric5.QScintilla.Editor.Editor.getWordBoundaries?4(line, index, useWordChars=True)
--- a/Documentation/Help/source.qhp Mon Mar 03 19:22:19 2014 +0100 +++ b/Documentation/Help/source.qhp Mon Mar 03 19:27:11 2014 +0100 @@ -4472,8 +4472,12 @@ <keyword name="Editor.focusInEvent" id="Editor.focusInEvent" ref="eric5.QScintilla.Editor.html#Editor.focusInEvent" /> <keyword name="Editor.focusOutEvent" id="Editor.focusOutEvent" ref="eric5.QScintilla.Editor.html#Editor.focusOutEvent" /> <keyword name="Editor.gestureEvent" id="Editor.gestureEvent" ref="eric5.QScintilla.Editor.html#Editor.gestureEvent" /> + <keyword name="Editor.getBookmarkLines" id="Editor.getBookmarkLines" ref="eric5.QScintilla.Editor.html#Editor.getBookmarkLines" /> <keyword name="Editor.getBookmarks" id="Editor.getBookmarks" ref="eric5.QScintilla.Editor.html#Editor.getBookmarks" /> + <keyword name="Editor.getBreakpointLines" id="Editor.getBreakpointLines" ref="eric5.QScintilla.Editor.html#Editor.getBreakpointLines" /> + <keyword name="Editor.getChangeLines" id="Editor.getChangeLines" ref="eric5.QScintilla.Editor.html#Editor.getChangeLines" /> <keyword name="Editor.getCompleter" id="Editor.getCompleter" ref="eric5.QScintilla.Editor.html#Editor.getCompleter" /> + <keyword name="Editor.getCoverageLines" id="Editor.getCoverageLines" ref="eric5.QScintilla.Editor.html#Editor.getCoverageLines" /> <keyword name="Editor.getCurrentWord" id="Editor.getCurrentWord" ref="eric5.QScintilla.Editor.html#Editor.getCurrentWord" /> <keyword name="Editor.getCurrentWordBoundaries" id="Editor.getCurrentWordBoundaries" ref="eric5.QScintilla.Editor.html#Editor.getCurrentWordBoundaries" /> <keyword name="Editor.getEncoding" id="Editor.getEncoding" ref="eric5.QScintilla.Editor.html#Editor.getEncoding" /> @@ -4487,7 +4491,10 @@ <keyword name="Editor.getNoName" id="Editor.getNoName" ref="eric5.QScintilla.Editor.html#Editor.getNoName" /> <keyword name="Editor.getSearchText" id="Editor.getSearchText" ref="eric5.QScintilla.Editor.html#Editor.getSearchText" /> <keyword name="Editor.getSharingStatus" id="Editor.getSharingStatus" ref="eric5.QScintilla.Editor.html#Editor.getSharingStatus" /> + <keyword name="Editor.getSyntaxErrorLines" id="Editor.getSyntaxErrorLines" ref="eric5.QScintilla.Editor.html#Editor.getSyntaxErrorLines" /> <keyword name="Editor.getSyntaxErrors" id="Editor.getSyntaxErrors" ref="eric5.QScintilla.Editor.html#Editor.getSyntaxErrors" /> + <keyword name="Editor.getTaskLines" id="Editor.getTaskLines" ref="eric5.QScintilla.Editor.html#Editor.getTaskLines" /> + <keyword name="Editor.getWarningLines" id="Editor.getWarningLines" ref="eric5.QScintilla.Editor.html#Editor.getWarningLines" /> <keyword name="Editor.getWarnings" id="Editor.getWarnings" ref="eric5.QScintilla.Editor.html#Editor.getWarnings" /> <keyword name="Editor.getWord" id="Editor.getWord" ref="eric5.QScintilla.Editor.html#Editor.getWord" /> <keyword name="Editor.getWordBoundaries" id="Editor.getWordBoundaries" ref="eric5.QScintilla.Editor.html#Editor.getWordBoundaries" />
--- a/Documentation/Source/eric5.QScintilla.Editor.html Mon Mar 03 19:22:19 2014 +0100 +++ b/Documentation/Source/eric5.QScintilla.Editor.html Mon Mar 03 19:27:11 2014 +0100 @@ -731,12 +731,24 @@ <td><a href="#Editor.gestureEvent">gestureEvent</a></td> <td>Protected method handling gesture events.</td> </tr><tr> +<td><a href="#Editor.getBookmarkLines">getBookmarkLines</a></td> +<td>Public method to get the lines containing a bookmark.</td> +</tr><tr> <td><a href="#Editor.getBookmarks">getBookmarks</a></td> <td>Public method to retrieve the bookmarks.</td> </tr><tr> +<td><a href="#Editor.getBreakpointLines">getBreakpointLines</a></td> +<td>Public method to get the lines containing a breakpoint.</td> +</tr><tr> +<td><a href="#Editor.getChangeLines">getChangeLines</a></td> +<td>Public method to get the lines containing a change.</td> +</tr><tr> <td><a href="#Editor.getCompleter">getCompleter</a></td> <td>Public method to retrieve a reference to the completer object.</td> </tr><tr> +<td><a href="#Editor.getCoverageLines">getCoverageLines</a></td> +<td>Public method to get the lines containing a coverage marker.</td> +</tr><tr> <td><a href="#Editor.getCurrentWord">getCurrentWord</a></td> <td>Public method to get the word at the current position.</td> </tr><tr> @@ -776,9 +788,18 @@ <td><a href="#Editor.getSharingStatus">getSharingStatus</a></td> <td>Public method to get some share status info.</td> </tr><tr> +<td><a href="#Editor.getSyntaxErrorLines">getSyntaxErrorLines</a></td> +<td>Public method to get the lines containing a syntax error.</td> +</tr><tr> <td><a href="#Editor.getSyntaxErrors">getSyntaxErrors</a></td> <td>Public method to retrieve the syntax error markers.</td> </tr><tr> +<td><a href="#Editor.getTaskLines">getTaskLines</a></td> +<td>Public method to get the lines containing a task.</td> +</tr><tr> +<td><a href="#Editor.getWarningLines">getWarningLines</a></td> +<td>Public method to get the lines containing a warning.</td> +</tr><tr> <td><a href="#Editor.getWarnings">getWarnings</a></td> <td>Public method to retrieve the warning markers.</td> </tr><tr> @@ -2805,6 +2826,16 @@ <dd> reference to the gesture event (QGestureEvent </dd> +</dl><a NAME="Editor.getBookmarkLines" ID="Editor.getBookmarkLines"></a> +<h4>Editor.getBookmarkLines</h4> +<b>getBookmarkLines</b>(<i></i>) +<p> + Public method to get the lines containing a bookmark. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a bookmark (list of integer) +</dd> </dl><a NAME="Editor.getBookmarks" ID="Editor.getBookmarks"></a> <h4>Editor.getBookmarks</h4> <b>getBookmarks</b>(<i></i>) @@ -2816,6 +2847,26 @@ sorted list of all lines containing a bookmark (list of integer) </dd> +</dl><a NAME="Editor.getBreakpointLines" ID="Editor.getBreakpointLines"></a> +<h4>Editor.getBreakpointLines</h4> +<b>getBreakpointLines</b>(<i></i>) +<p> + Public method to get the lines containing a breakpoint. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a breakpoint (list of integer) +</dd> +</dl><a NAME="Editor.getChangeLines" ID="Editor.getChangeLines"></a> +<h4>Editor.getChangeLines</h4> +<b>getChangeLines</b>(<i></i>) +<p> + Public method to get the lines containing a change. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a change (list of integer) +</dd> </dl><a NAME="Editor.getCompleter" ID="Editor.getCompleter"></a> <h4>Editor.getCompleter</h4> <b>getCompleter</b>(<i></i>) @@ -2826,6 +2877,16 @@ <dd> the completer object (CompleterBase) </dd> +</dl><a NAME="Editor.getCoverageLines" ID="Editor.getCoverageLines"></a> +<h4>Editor.getCoverageLines</h4> +<b>getCoverageLines</b>(<i></i>) +<p> + Public method to get the lines containing a coverage marker. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a coverage marker (list of integer) +</dd> </dl><a NAME="Editor.getCurrentWord" ID="Editor.getCurrentWord"></a> <h4>Editor.getCurrentWord</h4> <b>getCurrentWord</b>(<i></i>) @@ -2984,6 +3045,16 @@ and if it is inside a remotely initiated shared edit session (boolean, boolean, boolean, boolean) </dd> +</dl><a NAME="Editor.getSyntaxErrorLines" ID="Editor.getSyntaxErrorLines"></a> +<h4>Editor.getSyntaxErrorLines</h4> +<b>getSyntaxErrorLines</b>(<i></i>) +<p> + Public method to get the lines containing a syntax error. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a syntax error (list of integer) +</dd> </dl><a NAME="Editor.getSyntaxErrors" ID="Editor.getSyntaxErrors"></a> <h4>Editor.getSyntaxErrors</h4> <b>getSyntaxErrors</b>(<i></i>) @@ -2995,6 +3066,26 @@ sorted list of all lines containing a syntax error (list of integer) </dd> +</dl><a NAME="Editor.getTaskLines" ID="Editor.getTaskLines"></a> +<h4>Editor.getTaskLines</h4> +<b>getTaskLines</b>(<i></i>) +<p> + Public method to get the lines containing a task. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a task (list of integer) +</dd> +</dl><a NAME="Editor.getWarningLines" ID="Editor.getWarningLines"></a> +<h4>Editor.getWarningLines</h4> +<b>getWarningLines</b>(<i></i>) +<p> + Public method to get the lines containing a warning. +</p><dl> +<dt>Returns:</dt> +<dd> +list of lines containing a warning (list of integer) +</dd> </dl><a NAME="Editor.getWarnings" ID="Editor.getWarnings"></a> <h4>Editor.getWarnings</h4> <b>getWarnings</b>(<i></i>)
--- a/QScintilla/Editor.py Mon Mar 03 19:22:19 2014 +0100 +++ b/QScintilla/Editor.py Mon Mar 03 19:27:11 2014 +0100 @@ -2109,6 +2109,22 @@ line, _ = self.getCursorPosition() return self.markersAtLine(line) & self.breakpointMask != 0 + def getBreakpointLines(self): + """ + Public method to get the lines containing a breakpoint. + + @return list of lines containing a breakpoint (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, self.breakpointMask) + if line < 0: + break + else: + lines.append(line) + return lines + def hasBreakpoints(self): """ Public method to check for the presence of breakpoints. @@ -2277,6 +2293,22 @@ bmlist.sort() return bmlist + def getBookmarkLines(self): + """ + Public method to get the lines containing a bookmark. + + @return list of lines containing a bookmark (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, 1 << self.bookmark) + if line < 0: + break + else: + lines.append(line) + return lines + def hasBookmarks(self): """ Public method to check for the presence of bookmarks. @@ -2408,7 +2440,23 @@ ########################################################################### ## Task handling methods below ########################################################################### - + + def getTaskLines(self): + """ + Public method to get the lines containing a task. + + @return list of lines containing a task (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, 1 << self.taskmarker) + if line < 0: + break + else: + lines.append(line) + return lines + def hasTaskMarkers(self): """ Public method to determine, if this editor contains any task markers. @@ -2608,6 +2656,22 @@ self.__hasChangeMarkers = False self.changeMarkersUpdated.emit(self) + def getChangeLines(self): + """ + Public method to get the lines containing a change. + + @return list of lines containing a change (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, self.changeMarkersMask) + if line < 0: + break + else: + lines.append(line) + return lines + def hasChangeMarkers(self): """ Public method to determine, if this editor contains any change markers. @@ -5205,6 +5269,22 @@ self.coverageMarkersShown.emit(False) self.showingNotcoveredMarkers = False + def getCoverageLines(self): + """ + Public method to get the lines containing a coverage marker. + + @return list of lines containing a coverage marker (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, 1 << self.notcovered) + if line < 0: + break + else: + lines.append(line) + return lines + def hasCoverageMarkers(self): """ Public method to test, if there are coverage markers. @@ -5379,6 +5459,22 @@ selist.sort() return selist + def getSyntaxErrorLines(self): + """ + Public method to get the lines containing a syntax error. + + @return list of lines containing a syntax error (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, 1 << self.syntaxerror) + if line < 0: + break + else: + lines.append(line) + return lines + def hasSyntaxErrors(self): """ Public method to check for the presence of syntax errors. @@ -5490,6 +5586,22 @@ fwlist.sort() return fwlist + def getWarningLines(self): + """ + Public method to get the lines containing a warning. + + @return list of lines containing a warning (list of integer) + """ + lines = [] + line = -1 + while True: + line = self.markerFindNext(line + 1, 1 << self.warning) + if line < 0: + break + else: + lines.append(line) + return lines + def hasWarnings(self): """ Public method to check for the presence of warnings.