MCPcopy Index your code
hub / github.com/benfry/processing4 / setCurrentLine

Method setCurrentLine

java/src/processing/mode/java/JavaEditor.java:1460–1473  ·  view source on GitHub ↗

Set the line to highlight as currently suspended at. Will override the breakpoint color, if set. Switches to the appropriate tab and scroll to the line by placing the cursor there. @param line the line to highlight as current suspended line

(LineID line)

Source from the content-addressed store, hash-verified

1458 * @param line the line to highlight as current suspended line
1459 */
1460 public void setCurrentLine(LineID line) {
1461 clearCurrentLine();
1462 if (line == null) {
1463 // safety, e.g. when no line mapping is found and the null line is used.
1464 return;
1465 }
1466 switchToTab(line.fileName());
1467 // scroll to line, by setting the cursor
1468 cursorToLineStart(line.lineIdx());
1469 // highlight line
1470 currentLine = new LineHighlight(line.lineIdx(), this);
1471 currentLine.setMarker(PdeTextArea.STEP_MARKER);
1472 currentLine.setPriority(10); // fixes current line being hidden by the breakpoint when moved down
1473 }
1474
1475
1476 /** Clear the highlight for the debuggers current line. */

Callers 1

runMethod · 0.80

Calls 7

clearCurrentLineMethod · 0.95
switchToTabMethod · 0.95
cursorToLineStartMethod · 0.95
fileNameMethod · 0.80
lineIdxMethod · 0.80
setMarkerMethod · 0.80
setPriorityMethod · 0.80

Tested by

no test coverage detected