author | Stefan Vogel <sv@exept.de> |
Mon, 28 Oct 2013 18:28:00 +0100 | |
changeset 15796 | b3fdd3c2aec2 |
parent 15718 | 061ac6f47a57 |
child 15928 | c73eba7ee86c |
child 18093 | 2b786a9af1d0 |
permissions | -rw-r--r-- |
14273 | 1 |
" |
2 |
COPYRIGHT (c) 2012 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
"{ Package: 'stx:libbasic' }" |
|
13 |
||
14 |
Method variableSubclass:#MethodWithBreakpoints |
|
15 |
instanceVariableNames:'originalMethod' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Kernel-Methods' |
|
19 |
! |
|
20 |
||
21 |
!MethodWithBreakpoints class methodsFor:'documentation'! |
|
22 |
||
23 |
copyright |
|
24 |
" |
|
25 |
COPYRIGHT (c) 2012 by Claus Gittinger |
|
26 |
All Rights Reserved |
|
27 |
||
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
37 |
documentation |
|
38 |
" |
|
39 |
support for line-Breakpoints |
|
40 |
||
41 |
instances of me are created when line-breakpoints are placed. |
|
42 |
The only function I serve is to provide the originalMethod information, |
|
43 |
and an easy way to check for having a breakpoint (is breakpointed). |
|
44 |
||
45 |
[author:] |
|
46 |
Claus Gittinger |
|
47 |
||
48 |
[see also:] |
|
49 |
Tools::BreakpointService |
|
50 |
" |
|
51 |
! ! |
|
52 |
||
53 |
!MethodWithBreakpoints methodsFor:'accessing'! |
|
54 |
||
55 |
originalMethod |
|
56 |
^ originalMethod |
|
57 |
! |
|
58 |
||
59 |
originalMethod:something |
|
60 |
originalMethod := something. |
|
61 |
! ! |
|
62 |
||
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
63 |
!MethodWithBreakpoints methodsFor:'misc'! |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
64 |
|
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
65 |
restoreOriginalMethod |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
66 |
"remove myself - i.e. replace by the original method |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
67 |
(i.e. the one without line breakpoints)" |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
68 |
|
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
69 |
|cls selector| |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
70 |
|
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
71 |
(cls := self mclass) notNil ifTrue:[ |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
72 |
(selector := self selector) notNil ifTrue:[ |
15718
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
73 |
self breakPoint:#cg. |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
74 |
cls basicAddSelector:selector withMethod:originalMethod |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
75 |
] |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
76 |
] |
15718
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
77 |
|
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
78 |
"Modified: / 29-08-2013 / 01:17:05 / cg" |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
79 |
! ! |
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
80 |
|
14273 | 81 |
!MethodWithBreakpoints methodsFor:'queries'! |
82 |
||
83 |
isMethodWithBreakpoints |
|
84 |
^ true |
|
85 |
||
86 |
"Created: / 01-08-2012 / 17:26:59 / cg" |
|
87 |
! ! |
|
88 |
||
89 |
!MethodWithBreakpoints class methodsFor:'documentation'! |
|
90 |
||
91 |
version |
|
15718
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
92 |
^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.3 2013-08-28 23:18:23 cg Exp $' |
14273 | 93 |
! |
94 |
||
95 |
version_CVS |
|
15718
061ac6f47a57
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
15505
diff
changeset
|
96 |
^ '$Header: /cvs/stx/stx/libbasic/MethodWithBreakpoints.st,v 1.3 2013-08-28 23:18:23 cg Exp $' |
14273 | 97 |
! ! |
15505
4c46f8a71f52
class: MethodWithBreakpoints
Claus Gittinger <cg@exept.de>
parents:
14273
diff
changeset
|
98 |