equal
deleted
inserted
replaced
130 "/ We accept the additional overhead, as we are in debug mode anyway. |
130 "/ We accept the additional overhead, as we are in debug mode anyway. |
131 "/ prepareFullBreakSupport := false. |
131 "/ prepareFullBreakSupport := false. |
132 prepareFullBreakSupport := true. |
132 prepareFullBreakSupport := true. |
133 |
133 |
134 codeView method isNil ifTrue:[ |
134 codeView method isNil ifTrue:[ |
|
135 ^ self |
|
136 ]. |
|
137 currentMethod isNil ifTrue:[ |
135 ^ self |
138 ^ self |
136 ]. |
139 ]. |
137 |
140 |
138 textView reallyModified ifTrue:[ |
141 textView reallyModified ifTrue:[ |
139 "/ leads to ugly behavior (method no longer found), if we allow |
142 "/ leads to ugly behavior (method no longer found), if we allow |
226 ] ifFalse:[ |
229 ] ifFalse:[ |
227 gutterView redrawLine:line. |
230 gutterView redrawLine:line. |
228 ]. |
231 ]. |
229 |
232 |
230 "Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
233 "Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
231 "Modified: / 28-08-2013 / 14:45:36 / cg" |
|
232 "Modified: / 21-02-2014 / 17:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
234 "Modified: / 21-02-2014 / 17:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235 "Modified: / 16-11-2016 / 18:49:05 / cg" |
233 ! ! |
236 ! ! |
234 |
237 |
235 !BreakpointService methodsFor:'change & update'! |
238 !BreakpointService methodsFor:'change & update'! |
236 |
239 |
237 update: aspect with: param from: sender |
240 update: aspect with: param from: sender |
456 |
459 |
457 pos := textView characterPositionOfLine: each line col:1. |
460 pos := textView characterPositionOfLine: each line col:1. |
458 each position: pos. |
461 each position: pos. |
459 ]. |
462 ]. |
460 breakpoints := breakpoints select:[:b |b line >= 0]. |
463 breakpoints := breakpoints select:[:b |b line >= 0]. |
|
464 breakpoints sort:[:a :b|a position <= b position]. |
461 ]. |
465 ]. |
462 |
466 |
463 "Created: / 08-05-2014 / 14:02:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
467 "Created: / 08-05-2014 / 14:02:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
468 "Modified: / 20-11-2016 / 18:30:56 / cg" |
|
469 "Modified (comment): / 21-11-2016 / 12:49:07 / cg" |
464 ! |
470 ! |
465 |
471 |
466 moveBreakpointsAfterLine:line by: delta |
472 moveBreakpointsAfterLine:line by: delta |
467 breakpoints do:[:bpnt| |
473 breakpoints do:[:bpnt| |
468 bpnt line >= line ifTrue:[ |
474 bpnt line >= line ifTrue:[ |
474 |
480 |
475 "/gutterView redrawLinesFrom: line. |
481 "/gutterView redrawLinesFrom: line. |
476 |
482 |
477 "Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
483 "Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
478 "Created: / 06-07-2011 / 17:26:30 / jv" |
484 "Created: / 06-07-2011 / 17:26:30 / jv" |
479 "Modified: / 02-08-2012 / 09:27:10 / cg" |
|
480 "Modified: / 08-05-2014 / 14:01:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
485 "Modified: / 08-05-2014 / 14:01:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
486 "Modified: / 20-11-2016 / 19:09:12 / cg" |
481 ! |
487 ! |
482 |
488 |
483 recompile |
489 recompile |
484 "recompile the current method for changed breakpoints" |
490 "recompile the current method for changed breakpoints" |
485 |
491 |
555 ]. |
561 ]. |
556 ]. |
562 ]. |
557 |
563 |
558 breakpoints := breakpoints species new. |
564 breakpoints := breakpoints species new. |
559 newMethod breakpointsDo:[ :each | each method:newMethod. breakpoints add: each ]. |
565 newMethod breakpointsDo:[ :each | each method:newMethod. breakpoints add: each ]. |
|
566 self assert:(breakpoints isSortedBy:[:a :b |a position <= b position]). |
560 |
567 |
561 "/ must update breakpoints BEFORE the following, because it leads to a change |
568 "/ must update breakpoints BEFORE the following, because it leads to a change |
562 "/ notification, which may clear the breakpoints collection!! |
569 "/ notification, which may clear the breakpoints collection!! |
563 self fetchMethodHolder value:newMethod. |
570 self fetchMethodHolder value:newMethod. |
564 oldMethod mclass isNil ifTrue:[ |
571 oldMethod mclass isNil ifTrue:[ |
571 ]. |
578 ]. |
572 ] |
579 ] |
573 ] |
580 ] |
574 |
581 |
575 "Created: / 05-07-2011 / 21:33:13 / cg" |
582 "Created: / 05-07-2011 / 21:33:13 / cg" |
576 "Modified: / 22-07-2013 / 16:00:13 / cg" |
|
577 "Modified: / 23-02-2015 / 14:49:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
583 "Modified: / 23-02-2015 / 14:49:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
584 "Modified: / 20-11-2016 / 19:14:34 / cg" |
578 ! ! |
585 ! ! |
579 |
586 |
580 !BreakpointService methodsFor:'queries'! |
587 !BreakpointService methodsFor:'queries'! |
581 |
588 |
582 canCreateOrToggleBreakpointAtLine:lineOrNilForAnywhere |
589 canCreateOrToggleBreakpointAtLine:lineOrNilForAnywhere |