| 1089 | } |
| 1090 | |
| 1091 | void JavascriptProcessor::handleBreakpointClick(const Identifier& codeFile, CodeEditorComponent& ed, const MouseEvent& e) |
| 1092 | { |
| 1093 | #if ENABLE_SCRIPTING_BREAKPOINTS |
| 1094 | if (e.mods.isShiftDown()) |
| 1095 | { |
| 1096 | removeAllBreakpoints(); |
| 1097 | ed.repaint(); |
| 1098 | } |
| 1099 | else if (e.mods.isCommandDown()) |
| 1100 | { |
| 1101 | int lineNumber = e.y / ed.getLineHeight() + ed.getFirstLineOnScreen(); |
| 1102 | CodeDocument::Position start(ed.getDocument(), lineNumber, 0); |
| 1103 | |
| 1104 | int charNumber = start.getPosition(); |
| 1105 | |
| 1106 | const String content = ed.getDocument().getAllContent().substring(charNumber); |
| 1107 | |
| 1108 | const int offsetToFirstToken = JavascriptCodeEditor::Helpers::getOffsetToFirstToken(content); |
| 1109 | |
| 1110 | CodeDocument::Position tokenStart(ed.getDocument(), charNumber + offsetToFirstToken); |
| 1111 | |
| 1112 | toggleBreakpoint(codeFile, tokenStart.getLineNumber(), tokenStart.getPosition()); |
| 1113 | ed.repaint(); |
| 1114 | } |
| 1115 | #endif |
| 1116 | } |
| 1117 | |
| 1118 | |
| 1119 | void JavascriptProcessor::jumpToDefinition(const String& token, const String& namespaceId) |
nothing calls this directly
no test coverage detected