7446
|
1 |
"{ Package: 'stx:libtool' }"
|
|
2 |
|
|
3 |
"{ NameSpace: Tools }"
|
|
4 |
|
|
5 |
ToDoListEntry subclass:#CompilerWarningToDoListEntry
|
7511
|
6 |
instanceVariableNames:'checkAction className class selector position equalityParameter'
|
7446
|
7 |
classVariableNames:''
|
|
8 |
poolDictionaries:''
|
|
9 |
category:'Interface-Smalltalk-ToDo'
|
|
10 |
!
|
|
11 |
|
|
12 |
|
|
13 |
!CompilerWarningToDoListEntry methodsFor:'accessing'!
|
|
14 |
|
|
15 |
className
|
|
16 |
^ className
|
|
17 |
|
|
18 |
"Created: / 22-10-2006 / 01:39:43 / cg"
|
|
19 |
!
|
|
20 |
|
|
21 |
className:classNameArg selector:selectorArg checkAction:checkActionArg equalityParameter:equalityParameterArg
|
|
22 |
checkAction := checkActionArg.
|
|
23 |
className := classNameArg.
|
|
24 |
selector := selectorArg.
|
|
25 |
equalityParameter := equalityParameterArg.
|
|
26 |
|
|
27 |
"Created: / 22-10-2006 / 01:38:26 / cg"
|
|
28 |
!
|
|
29 |
|
|
30 |
equalityParameter
|
|
31 |
^ equalityParameter
|
|
32 |
|
|
33 |
"Created: / 21-10-2006 / 21:57:01 / cg"
|
|
34 |
!
|
|
35 |
|
|
36 |
methodOrClassName
|
|
37 |
selector isNil ifTrue:[^ className ].
|
|
38 |
^ className,' ',selector
|
|
39 |
|
|
40 |
"Created: / 22-10-2006 / 11:05:21 / cg"
|
|
41 |
!
|
|
42 |
|
7511
|
43 |
position
|
|
44 |
^ position
|
|
45 |
!
|
|
46 |
|
|
47 |
position:something
|
|
48 |
position := something.
|
|
49 |
!
|
|
50 |
|
7446
|
51 |
problemClass
|
|
52 |
^ Smalltalk classNamed:className
|
|
53 |
|
|
54 |
"Created: / 21-10-2006 / 21:50:38 / cg"
|
|
55 |
"Modified: / 22-10-2006 / 01:39:39 / cg"
|
|
56 |
!
|
|
57 |
|
|
58 |
problemClassName
|
|
59 |
^ className
|
|
60 |
|
|
61 |
"Created: / 22-10-2006 / 01:40:11 / cg"
|
|
62 |
!
|
|
63 |
|
|
64 |
problemMethod
|
|
65 |
|cls|
|
|
66 |
|
|
67 |
selector isNil ifTrue:[^ nil].
|
|
68 |
|
|
69 |
cls := self problemClass.
|
|
70 |
cls isNil ifTrue:[^ nil].
|
|
71 |
|
|
72 |
^ cls compiledMethodAt:selector
|
|
73 |
|
|
74 |
"Created: / 22-10-2006 / 02:42:39 / cg"
|
|
75 |
!
|
|
76 |
|
|
77 |
problemSelector
|
|
78 |
^ selector
|
|
79 |
|
|
80 |
"Created: / 21-10-2006 / 21:50:58 / cg"
|
|
81 |
!
|
|
82 |
|
|
83 |
update:something with:aParameter from:changedObject
|
|
84 |
self revalidate.
|
|
85 |
|
|
86 |
"Created: / 21-10-2006 / 21:28:35 / cg"
|
|
87 |
! !
|
|
88 |
|
|
89 |
!CompilerWarningToDoListEntry methodsFor:'duplicate detection'!
|
|
90 |
|
|
91 |
sameAs:anotherEntry
|
|
92 |
^ anotherEntry sameAsCompilerWarningToDoListEntry:self
|
|
93 |
|
|
94 |
"Created: / 21-10-2006 / 21:38:15 / cg"
|
|
95 |
!
|
|
96 |
|
|
97 |
sameAsCompilerWarningToDoListEntry:anotherEntry
|
|
98 |
anotherEntry problemClassName = className ifFalse:[^ false].
|
|
99 |
anotherEntry problemSelector = selector ifFalse:[^ false].
|
|
100 |
anotherEntry equalityParameter = equalityParameter ifFalse:[^ false].
|
|
101 |
^ true
|
|
102 |
|
|
103 |
"Created: / 21-10-2006 / 21:41:57 / cg"
|
|
104 |
"Modified: / 22-10-2006 / 01:40:03 / cg"
|
|
105 |
! !
|
|
106 |
|
|
107 |
!CompilerWarningToDoListEntry methodsFor:'misc'!
|
|
108 |
|
|
109 |
browse
|
7511
|
110 |
|brwsr|
|
|
111 |
|
|
112 |
brwsr := UserPreferences browserClass
|
|
113 |
openInClass:(self problemClass) selector:selector.
|
|
114 |
brwsr codeView cursorToCharacterPosition:position.
|
|
115 |
"/ brwsr codeView selectLine:(brwsr codeView cursorLine).
|
7446
|
116 |
|
|
117 |
"Created: / 22-10-2006 / 01:38:11 / cg"
|
7511
|
118 |
"Modified: / 11-11-2006 / 14:49:35 / cg"
|
7446
|
119 |
! !
|
|
120 |
|
|
121 |
!CompilerWarningToDoListEntry methodsFor:'validation'!
|
|
122 |
|
|
123 |
checkIfClassIsStillValid
|
|
124 |
className notNil ifTrue:[
|
|
125 |
(Smalltalk classNamed:className) isNil ifTrue:[^ false].
|
|
126 |
].
|
|
127 |
^ true
|
|
128 |
|
|
129 |
"Created: / 21-10-2006 / 21:58:26 / cg"
|
|
130 |
"Modified: / 22-10-2006 / 01:41:53 / cg"
|
|
131 |
!
|
|
132 |
|
|
133 |
checkIfSelectorIsStillValid
|
|
134 |
selector notNil ifTrue:[
|
|
135 |
(self problemClass compiledMethodAt:selector) isNil ifTrue:[^ false].
|
|
136 |
].
|
|
137 |
^ true
|
|
138 |
|
|
139 |
"Created: / 21-10-2006 / 21:58:44 / cg"
|
|
140 |
"Modified: / 22-10-2006 / 01:40:40 / cg"
|
|
141 |
!
|
|
142 |
|
|
143 |
checkIfStillValid
|
|
144 |
self checkIfClassIsStillValid ifFalse:[^ false].
|
|
145 |
self checkIfSelectorIsStillValid ifFalse:[^ false].
|
|
146 |
|
|
147 |
^ (checkAction value:self)
|
|
148 |
|
|
149 |
"Created: / 21-10-2006 / 21:31:27 / cg"
|
|
150 |
"Modified: / 21-10-2006 / 23:10:33 / cg"
|
|
151 |
! !
|
|
152 |
|
|
153 |
!CompilerWarningToDoListEntry class methodsFor:'documentation'!
|
|
154 |
|
|
155 |
version
|
7511
|
156 |
^ '$Header: /cvs/stx/stx/libtool/Tools__CompilerWarningToDoListEntry.st,v 1.2 2006-11-13 12:20:34 cg Exp $'
|
7446
|
157 |
! !
|