--- a/Tools__BreakpointService.st Thu Nov 24 22:03:16 2016 +0000
+++ b/Tools__BreakpointService.st Thu Nov 24 22:14:31 2016 +0000
@@ -134,6 +134,9 @@
codeView method isNil ifTrue:[
^ self
].
+ currentMethod isNil ifTrue:[
+ ^ self
+ ].
textView reallyModified ifTrue:[
"/ leads to ugly behavior (method no longer found), if we allow
@@ -228,8 +231,8 @@
].
"Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 28-08-2013 / 14:45:36 / cg"
"Modified: / 21-02-2014 / 17:36:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-11-2016 / 18:49:05 / cg"
! !
!BreakpointService methodsFor:'change & update'!
@@ -458,9 +461,12 @@
each position: pos.
].
breakpoints := breakpoints select:[:b |b line >= 0].
+ breakpoints sort:[:a :b|a position <= b position].
].
"Created: / 08-05-2014 / 14:02:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-11-2016 / 18:30:56 / cg"
+ "Modified (comment): / 21-11-2016 / 12:49:07 / cg"
!
moveBreakpointsAfterLine:line by: delta
@@ -476,8 +482,8 @@
"Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Created: / 06-07-2011 / 17:26:30 / jv"
- "Modified: / 02-08-2012 / 09:27:10 / cg"
"Modified: / 08-05-2014 / 14:01:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-11-2016 / 19:09:12 / cg"
!
recompile
@@ -557,6 +563,7 @@
breakpoints := breakpoints species new.
newMethod breakpointsDo:[ :each | each method:newMethod. breakpoints add: each ].
+ self assert:(breakpoints isSortedBy:[:a :b |a position <= b position]).
"/ must update breakpoints BEFORE the following, because it leads to a change
"/ notification, which may clear the breakpoints collection!!
@@ -573,8 +580,8 @@
]
"Created: / 05-07-2011 / 21:33:13 / cg"
- "Modified: / 22-07-2013 / 16:00:13 / cg"
"Modified: / 23-02-2015 / 14:49:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-11-2016 / 19:14:34 / cg"
! !
!BreakpointService methodsFor:'queries'!