equal
deleted
inserted
replaced
121 updateCurrentMethod |
121 updateCurrentMethod |
122 |method realMethod oldBreakPoints| |
122 |method realMethod oldBreakPoints| |
123 |
123 |
124 "/ codeView methodHolder class == BlockValue ifTrue:[self breakPoint:#cg]. |
124 "/ codeView methodHolder class == BlockValue ifTrue:[self breakPoint:#cg]. |
125 |
125 |
126 method := realMethod := codeView methodHolder value. |
126 method := realMethod := codeView method. |
127 (method notNil and:[method mclass isNil]) ifTrue:[ |
127 (method notNil and:[method mclass isNil]) ifTrue:[ |
128 "/ hack: ouch - was wrapped in the meantime; |
128 "/ hack: ouch - was wrapped in the meantime; |
129 "/ hurry up and update. Should be done elsewhere (in codeView) |
129 "/ hurry up and update. Should be done elsewhere (in codeView) |
130 realMethod := MethodWithBreakpoints allInstances detect:[:m | m originalMethod == method and:[m mclass notNil]] ifNone:nil. |
130 realMethod := MethodWithBreakpoints allInstances detect:[:m | m originalMethod == method and:[m mclass notNil]] ifNone:nil. |
131 realMethod isNil ifTrue:[ |
131 realMethod isNil ifTrue:[ |
138 self updateBreakPointsFor:realMethod. |
138 self updateBreakPointsFor:realMethod. |
139 oldBreakPoints ~= breakpoints ifTrue:[ |
139 oldBreakPoints ~= breakpoints ifTrue:[ |
140 gutterView invalidate. |
140 gutterView invalidate. |
141 ] |
141 ] |
142 ]. |
142 ]. |
|
143 |
|
144 "Modified: / 22-07-2013 / 13:33:28 / cg" |
143 ! ! |
145 ! ! |
144 |
146 |
145 !BreakpointService methodsFor:'event handling'! |
147 !BreakpointService methodsFor:'event handling'! |
146 |
148 |
147 buttonPress:button x:x y:y in:view |
149 buttonPress:button x:x y:y in:view |
250 recompile |
252 recompile |
251 "recompile the current method for changed breakpoints" |
253 "recompile the current method for changed breakpoints" |
252 |
254 |
253 |oldMethod newMethod compiler class selector| |
255 |oldMethod newMethod compiler class selector| |
254 |
256 |
255 oldMethod := codeView methodHolder value. |
257 oldMethod := codeView method. |
256 (oldMethod notNil and:[oldMethod hasPrimitiveCode not]) ifTrue:[ |
258 (oldMethod notNil and:[oldMethod hasPrimitiveCode not]) ifTrue:[ |
257 "/ be careful: if the text has been edited/modified, do not compile |
259 "/ be careful: if the text has been edited/modified, do not compile |
258 textView modified ifTrue:[ |
260 textView modified ifTrue:[ |
259 self breakPoint: #cg. |
261 self breakPoint: #cg. |
260 self breakPoint: #jv. |
262 self breakPoint: #jv. |
334 ] |
336 ] |
335 ] |
337 ] |
336 |
338 |
337 "Created: / 05-07-2011 / 21:33:13 / cg" |
339 "Created: / 05-07-2011 / 21:33:13 / cg" |
338 "Modified: / 18-07-2012 / 10:53:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
340 "Modified: / 18-07-2012 / 10:53:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
339 "Modified: / 02-08-2012 / 09:35:41 / cg" |
341 "Modified: / 22-07-2013 / 13:33:09 / cg" |
340 ! |
342 ! |
341 |
343 |
342 setOrToggleBreakpointAtLine:line |
344 setOrToggleBreakpointAtLine:line |
343 |pos bpnt prepareFullBreakSupport| |
345 |pos bpnt prepareFullBreakSupport| |
344 |
346 |
350 "/ to set additional breakpoints). |
352 "/ to set additional breakpoints). |
351 "/ We accept the additional overhead, as we are in debug mode anyway. |
353 "/ We accept the additional overhead, as we are in debug mode anyway. |
352 "/ prepareFullBreakSupport := false. |
354 "/ prepareFullBreakSupport := false. |
353 prepareFullBreakSupport := true. |
355 prepareFullBreakSupport := true. |
354 |
356 |
355 codeView methodHolder value isNil ifTrue:[ |
357 codeView method isNil ifTrue:[ |
356 ^ self |
358 ^ self |
357 ]. |
359 ]. |
358 |
360 |
359 textView reallyModified ifTrue:[ |
361 textView reallyModified ifTrue:[ |
360 "/ leads to ugly behavior (method no longer found), if we allow |
362 "/ leads to ugly behavior (method no longer found), if we allow |
422 |
424 |
423 gutterView redrawLine:line. |
425 gutterView redrawLine:line. |
424 |
426 |
425 "Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
427 "Created: / 17-06-2011 / 13:45:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
426 "Modified: / 27-07-2011 / 13:27:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
428 "Modified: / 27-07-2011 / 13:27:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
427 "Modified: / 02-08-2012 / 09:26:38 / cg" |
429 "Modified: / 22-07-2013 / 13:33:18 / cg" |
428 ! ! |
430 ! ! |
429 |
431 |
430 !BreakpointService methodsFor:'queries'! |
432 !BreakpointService methodsFor:'queries'! |
431 |
433 |
432 canCreateOrToggleBreakpointAtLine:lineOrNilForAnywhere |
434 canCreateOrToggleBreakpointAtLine:lineOrNilForAnywhere |
512 ! ! |
514 ! ! |
513 |
515 |
514 !BreakpointService class methodsFor:'documentation'! |
516 !BreakpointService class methodsFor:'documentation'! |
515 |
517 |
516 version |
518 version |
517 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.32 2013-07-20 09:07:04 cg Exp $' |
519 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.33 2013-07-22 11:39:55 cg Exp $' |
518 ! |
520 ! |
519 |
521 |
520 version_CVS |
522 version_CVS |
521 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.32 2013-07-20 09:07:04 cg Exp $' |
523 ^ '$Header: /cvs/stx/stx/libtool/Tools__BreakpointService.st,v 1.33 2013-07-22 11:39:55 cg Exp $' |
522 ! |
524 ! |
523 |
525 |
524 version_SVN |
526 version_SVN |
525 ^ '$Id: Tools__BreakpointService.st,v 1.32 2013-07-20 09:07:04 cg Exp $' |
527 ^ '$Id: Tools__BreakpointService.st,v 1.33 2013-07-22 11:39:55 cg Exp $' |
526 ! ! |
528 ! ! |
527 |
529 |