author | Claus Gittinger <cg@exept.de> |
Sun, 23 Feb 2020 14:39:35 +0100 | |
changeset 4556 | 153115221513 |
parent 4491 | 9e82adeddb41 |
permissions | -rw-r--r-- |
4370 | 1 |
"{ Encoding: utf8 }" |
2 |
||
2798 | 3 |
" |
4 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3779 | 5 |
All Rights Reserved |
2798 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
14 |
"{ Package: 'stx:libbasic3' }" |
|
15 |
||
3775 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
2798 | 18 |
Object subclass:#ProjectProblem |
3790 | 19 |
instanceVariableNames:'package fixes allProblems' |
20 |
classVariableNames:'' |
|
21 |
poolDictionaries:'' |
|
22 |
category:'System-Support-Projects' |
|
2798 | 23 |
! |
24 |
||
25 |
ProjectProblem subclass:#ClassProblem |
|
3790 | 26 |
instanceVariableNames:'className' |
27 |
classVariableNames:'' |
|
28 |
poolDictionaries:'' |
|
29 |
privateIn:ProjectProblem |
|
2798 | 30 |
! |
31 |
||
3160 | 32 |
ProjectProblem::ClassProblem subclass:#InconsistentProjectDefinition |
3790 | 33 |
instanceVariableNames:'' |
34 |
classVariableNames:'' |
|
35 |
poolDictionaries:'' |
|
36 |
privateIn:ProjectProblem |
|
2798 | 37 |
! |
38 |
||
3449 | 39 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedBeforeItsPool |
3790 | 40 |
instanceVariableNames:'poolName' |
41 |
classVariableNames:'' |
|
42 |
poolDictionaries:'' |
|
43 |
privateIn:ProjectProblem |
|
3449 | 44 |
! |
45 |
||
46 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedBeforeItsSuperclass |
|
3790 | 47 |
instanceVariableNames:'superClassName' |
48 |
classVariableNames:'' |
|
49 |
poolDictionaries:'' |
|
50 |
privateIn:ProjectProblem |
|
3449 | 51 |
! |
52 |
||
3160 | 53 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedButDoesNotExist |
3790 | 54 |
instanceVariableNames:'' |
55 |
classVariableNames:'' |
|
56 |
poolDictionaries:'' |
|
57 |
privateIn:ProjectProblem |
|
2798 | 58 |
! |
59 |
||
3806 | 60 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedButInOtherPackage |
61 |
instanceVariableNames:'' |
|
62 |
classVariableNames:'' |
|
63 |
poolDictionaries:'' |
|
64 |
privateIn:ProjectProblem |
|
65 |
! |
|
66 |
||
3160 | 67 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassListedMultipleTimes |
3790 | 68 |
instanceVariableNames:'' |
69 |
classVariableNames:'' |
|
70 |
poolDictionaries:'' |
|
71 |
privateIn:ProjectProblem |
|
2911 | 72 |
! |
73 |
||
3160 | 74 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassNotListed |
3790 | 75 |
instanceVariableNames:'' |
76 |
classVariableNames:'' |
|
77 |
poolDictionaries:'' |
|
78 |
privateIn:ProjectProblem |
|
2911 | 79 |
! |
80 |
||
3449 | 81 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassIsCompiledButSuperclassIsAutoloaded |
3790 | 82 |
instanceVariableNames:'' |
83 |
classVariableNames:'' |
|
84 |
poolDictionaries:'' |
|
85 |
privateIn:ProjectProblem |
|
2798 | 86 |
! |
87 |
||
3588 | 88 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassShouldNotBeInPackage |
3790 | 89 |
instanceVariableNames:'' |
90 |
classVariableNames:'' |
|
91 |
poolDictionaries:'' |
|
92 |
privateIn:ProjectProblem |
|
3588 | 93 |
! |
94 |
||
2911 | 95 |
ProjectProblem::ClassProblem subclass:#ClassUsesPoolProblem |
3790 | 96 |
instanceVariableNames:'poolName' |
97 |
classVariableNames:'' |
|
98 |
poolDictionaries:'' |
|
99 |
privateIn:ProjectProblem |
|
2798 | 100 |
! |
101 |
||
2911 | 102 |
ProjectProblem::ClassUsesPoolProblem subclass:#ClassUsesPoolButItIsNotASharedPool |
3790 | 103 |
instanceVariableNames:'' |
104 |
classVariableNames:'' |
|
105 |
poolDictionaries:'' |
|
106 |
privateIn:ProjectProblem |
|
2911 | 107 |
! |
108 |
||
109 |
ProjectProblem::ClassUsesPoolProblem subclass:#ClassUsesPoolInNamespaceButNamespaceIsNotDefined |
|
3790 | 110 |
instanceVariableNames:'' |
111 |
classVariableNames:'' |
|
112 |
poolDictionaries:'' |
|
113 |
privateIn:ProjectProblem |
|
2911 | 114 |
! |
115 |
||
116 |
ProjectProblem::ClassUsesPoolProblem subclass:#ClassUsesPoolButItDoesNotExist |
|
3790 | 117 |
instanceVariableNames:'' |
118 |
classVariableNames:'' |
|
119 |
poolDictionaries:'' |
|
120 |
privateIn:ProjectProblem |
|
2911 | 121 |
! |
122 |
||
2854 | 123 |
ProjectProblem::ClassProblem subclass:#MethodProblem |
3790 | 124 |
instanceVariableNames:'selector' |
125 |
classVariableNames:'' |
|
126 |
poolDictionaries:'' |
|
127 |
privateIn:ProjectProblem |
|
2798 | 128 |
! |
129 |
||
3166 | 130 |
ProjectProblem::MethodProblem subclass:#ExtensionMethodListedButInDifferentPackage |
3790 | 131 |
instanceVariableNames:'' |
132 |
classVariableNames:'' |
|
133 |
poolDictionaries:'' |
|
134 |
privateIn:ProjectProblem |
|
3166 | 135 |
! |
136 |
||
2798 | 137 |
ProjectProblem::MethodProblem subclass:#ExtensionMethodNotListed |
3790 | 138 |
instanceVariableNames:'' |
139 |
classVariableNames:'' |
|
140 |
poolDictionaries:'' |
|
141 |
privateIn:ProjectProblem |
|
2798 | 142 |
! |
143 |
||
3166 | 144 |
ProjectProblem::MethodProblem subclass:#ExtensionMethodsClassDoesNotExist |
3790 | 145 |
instanceVariableNames:'' |
146 |
classVariableNames:'' |
|
147 |
poolDictionaries:'' |
|
148 |
privateIn:ProjectProblem |
|
3166 | 149 |
! |
150 |
||
3449 | 151 |
ProjectProblem::InconsistentProjectDefinition subclass:#ClassIsCompiledButSuperclassProjectDefinitionIsMissing |
3790 | 152 |
instanceVariableNames:'' |
153 |
classVariableNames:'' |
|
154 |
poolDictionaries:'' |
|
155 |
privateIn:ProjectProblem |
|
3160 | 156 |
! |
157 |
||
4077 | 158 |
ProjectProblem subclass:#InvalidPackageName |
159 |
instanceVariableNames:'badName' |
|
160 |
classVariableNames:'' |
|
161 |
poolDictionaries:'' |
|
162 |
privateIn:ProjectProblem |
|
163 |
! |
|
164 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
165 |
ProjectProblem::MethodProblem subclass:#MethodCompilabilityIssue1 |
3790 | 166 |
instanceVariableNames:'errors warnings' |
167 |
classVariableNames:'' |
|
168 |
poolDictionaries:'' |
|
169 |
privateIn:ProjectProblem |
|
2854 | 170 |
! |
171 |
||
172 |
Object subclass:#Error |
|
3790 | 173 |
instanceVariableNames:'message startPosition endPosition' |
174 |
classVariableNames:'' |
|
175 |
poolDictionaries:'' |
|
176 |
privateIn:ProjectProblem::MethodCompilabilityIssue1 |
|
2854 | 177 |
! |
178 |
||
179 |
Object subclass:#Warning |
|
3790 | 180 |
instanceVariableNames:'message startPosition endPosition' |
181 |
classVariableNames:'' |
|
182 |
poolDictionaries:'' |
|
183 |
privateIn:ProjectProblem::MethodCompilabilityIssue1 |
|
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
184 |
! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
185 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
186 |
ProjectProblem::MethodProblem subclass:#MethodCompilabilityIssue2 |
3790 | 187 |
instanceVariableNames:'rules errors warnings' |
188 |
classVariableNames:'' |
|
189 |
poolDictionaries:'' |
|
190 |
privateIn:ProjectProblem |
|
2854 | 191 |
! |
192 |
||
2798 | 193 |
ProjectProblem::MethodProblem subclass:#MethodInNoPackage |
3790 | 194 |
instanceVariableNames:'' |
195 |
classVariableNames:'' |
|
196 |
poolDictionaries:'' |
|
197 |
privateIn:ProjectProblem |
|
198 |
! |
|
199 |
||
200 |
ProjectProblem::MethodProblem subclass:#MethodListedInOtherPackage |
|
201 |
instanceVariableNames:'otherProjectDefinitionClasses' |
|
202 |
classVariableNames:'' |
|
203 |
poolDictionaries:'' |
|
204 |
privateIn:ProjectProblem |
|
2798 | 205 |
! |
206 |
||
207 |
ProjectProblem::MethodProblem subclass:#ExtensionMethodListedButDoesNotExist |
|
3790 | 208 |
instanceVariableNames:'' |
209 |
classVariableNames:'' |
|
210 |
poolDictionaries:'' |
|
211 |
privateIn:ProjectProblem |
|
2798 | 212 |
! |
213 |
||
2854 | 214 |
ProjectProblem::MethodProblem subclass:#MethodSourceCorrupted |
3790 | 215 |
instanceVariableNames:'' |
216 |
classVariableNames:'' |
|
217 |
poolDictionaries:'' |
|
218 |
privateIn:ProjectProblem |
|
2854 | 219 |
! |
220 |
||
221 |
ProjectProblem::MethodProblem subclass:#MethodSourceNotAvailable |
|
3790 | 222 |
instanceVariableNames:'' |
223 |
classVariableNames:'' |
|
224 |
poolDictionaries:'' |
|
225 |
privateIn:ProjectProblem |
|
2854 | 226 |
! |
227 |
||
2798 | 228 |
ProjectProblem subclass:#ProjectDefinitionDoesNotExist |
4077 | 229 |
instanceVariableNames:'missing' |
3790 | 230 |
classVariableNames:'' |
231 |
poolDictionaries:'' |
|
232 |
privateIn:ProjectProblem |
|
2798 | 233 |
! |
234 |
||
235 |
!ProjectProblem class methodsFor:'documentation'! |
|
236 |
||
237 |
copyright |
|
238 |
" |
|
239 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
3779 | 240 |
All Rights Reserved |
2798 | 241 |
|
242 |
This software is furnished under a license and may be used |
|
243 |
only in accordance with the terms of that license and with the |
|
244 |
inclusion of the above copyright notice. This software may not |
|
245 |
be provided or otherwise made available to, or used by, any |
|
246 |
other person. No title to or ownership of the software is |
|
247 |
hereby transferred. |
|
248 |
" |
|
3430 | 249 |
! |
250 |
||
251 |
documentation |
|
252 |
" |
|
4112 | 253 |
I represent a problem as detected by the project consistency checker, |
3430 | 254 |
which is optionally executed before committing a package to a repository. |
255 |
Typically, I find inconsistencies, uncompilable methods or missing prerequisites, |
|
256 |
which might lead to trouble when the package is later to be compiled to a dll via stc. |
|
3431 | 257 |
|
3547 | 258 |
[instance variables:] |
259 |
package - the package in question |
|
260 |
||
261 |
fixes - a collection of possible fixes |
|
262 |
(to be shown in the HTML view of the problem browser) |
|
263 |
||
264 |
allProblems - the collection of problems I am part of |
|
265 |
(only needed to be able to do the |
|
266 |
'fix other problems of this kind' operation, |
|
267 |
for example in the MethodOnNoPackage problem.) |
|
268 |
||
3431 | 269 |
[see also:] |
270 |
ProjectChecker ProjectDefinition |
|
3430 | 271 |
" |
2798 | 272 |
! ! |
273 |
||
274 |
!ProjectProblem class methodsFor:'instance creation'! |
|
275 |
||
4370 | 276 |
newClass:aClass usesPoolButItDoesNotExist:poolName |
277 |
^ self newClassUsesPoolButItDoesNotExist |
|
278 |
className: aClass name; |
|
279 |
poolName: poolName; |
|
280 |
yourself |
|
281 |
! |
|
282 |
||
3449 | 283 |
newClassIsCompiledButSuperclassIsAutoloaded |
284 |
||
285 |
^ClassIsCompiledButSuperclassIsAutoloaded new |
|
286 |
||
287 |
"Created: / 20-09-2013 / 11:18:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
288 |
! |
|
289 |
||
290 |
newClassIsCompiledButSuperclassProjectDefinitionIsMissing |
|
291 |
||
292 |
^ClassIsCompiledButSuperclassProjectDefinitionIsMissing new |
|
293 |
||
294 |
"Created: / 05-10-2013 / 12:43:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
295 |
! |
|
296 |
||
2911 | 297 |
newClassListedBeforeItsPool |
298 |
||
299 |
^ClassListedBeforeItsPool new |
|
300 |
||
301 |
"Created: / 13-09-2012 / 17:13:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
302 |
! |
|
303 |
||
304 |
newClassListedBeforeItsSuperclass |
|
305 |
||
306 |
^ClassListedBeforeItsSuperclass new |
|
307 |
||
308 |
"Created: / 13-09-2012 / 17:13:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
309 |
! |
|
310 |
||
4370 | 311 |
newClassListedBeforeItsSuperclass:aClass |
312 |
^ self newClassListedBeforeItsSuperclass |
|
313 |
className: aClass name; |
|
314 |
superClassName: aClass superclass name |
|
315 |
! |
|
316 |
||
2798 | 317 |
newClassListedButDoesNotExist |
318 |
||
319 |
^ClassListedButDoesNotExist new |
|
320 |
||
321 |
"Created: / 23-02-2012 / 13:18:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
322 |
! |
|
323 |
||
3806 | 324 |
newClassListedButInOtherPackage |
325 |
||
326 |
^ClassListedButInOtherPackage new |
|
327 |
! |
|
328 |
||
2911 | 329 |
newClassListedMultipleTimes |
330 |
||
331 |
^ClassListedMultipleTimes new |
|
332 |
||
333 |
"Created: / 13-09-2012 / 17:40:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
334 |
! |
|
335 |
||
4370 | 336 |
newClassListedMultipleTimes:aClass |
337 |
^ self newClassListedMultipleTimes |
|
338 |
className:aClass name; |
|
339 |
yourself |
|
340 |
! |
|
341 |
||
2798 | 342 |
newClassNotListed |
343 |
||
344 |
^ClassNotListed new |
|
345 |
||
346 |
"Created: / 23-02-2012 / 13:59:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
347 |
! |
|
348 |
||
3588 | 349 |
newClassShouldNotBeInPackage |
350 |
||
351 |
^ClassShouldNotBeInPackage new |
|
352 |
! |
|
353 |
||
2798 | 354 |
newClassUsesPoolButItDoesNotExist |
355 |
||
356 |
^ClassUsesPoolButItDoesNotExist new |
|
357 |
||
358 |
"Created: / 23-02-2012 / 13:37:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
359 |
! |
|
360 |
||
361 |
newClassUsesPoolButItIsNotASharedPool |
|
362 |
||
363 |
^ClassUsesPoolButItIsNotASharedPool new |
|
364 |
||
365 |
"Created: / 23-02-2012 / 13:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
366 |
! |
|
367 |
||
2911 | 368 |
newClassUsesPoolInNamespaceButNamespaceIsNotDefined |
369 |
||
370 |
^ClassUsesPoolInNamespaceButNamespaceIsNotDefined new |
|
371 |
||
372 |
"Created: / 13-09-2012 / 16:40:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
373 |
! |
|
374 |
||
2798 | 375 |
newExtensionMethodListedButDoesNotExist |
376 |
||
377 |
^ExtensionMethodListedButDoesNotExist new |
|
378 |
||
379 |
"Created: / 23-02-2012 / 14:26:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
380 |
! |
|
381 |
||
3166 | 382 |
newExtensionMethodListedButInDifferentPackage |
383 |
||
384 |
^ExtensionMethodListedButInDifferentPackage new |
|
385 |
! |
|
386 |
||
2798 | 387 |
newExtensionMethodNotListed |
388 |
||
389 |
^ExtensionMethodNotListed new |
|
390 |
||
391 |
"Created: / 23-02-2012 / 14:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
392 |
! |
|
393 |
||
3166 | 394 |
newExtensionMethodsClassDoesNotExist |
395 |
||
396 |
^ExtensionMethodsClassDoesNotExist new |
|
397 |
! |
|
398 |
||
4077 | 399 |
newInvalidPackageName |
400 |
||
401 |
^InvalidPackageName new |
|
402 |
! |
|
403 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
404 |
newMethodCompilabilityIssue1 |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
405 |
^ MethodCompilabilityIssue1 new |
2854 | 406 |
|
407 |
"Created: / 11-04-2012 / 15:34:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
408 |
"Modified: / 29-05-2014 / 15:35:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
409 |
! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
410 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
411 |
newMethodCompilabilityIssue2 |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
412 |
^ MethodCompilabilityIssue2 new |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
413 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
414 |
"Created: / 29-05-2014 / 15:37:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2854 | 415 |
! |
416 |
||
2798 | 417 |
newMethodInNoPackage |
418 |
||
419 |
^MethodInNoPackage new |
|
420 |
||
421 |
"Created: / 23-02-2012 / 14:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
422 |
! |
|
423 |
||
3790 | 424 |
newMethodListedInOtherPackage |
425 |
||
426 |
^ MethodListedInOtherPackage new |
|
427 |
! |
|
428 |
||
2854 | 429 |
newMethodSourceCorrupted |
430 |
||
431 |
^MethodSourceCorrupted new |
|
432 |
||
433 |
"Created: / 11-04-2012 / 12:35:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
434 |
! |
|
435 |
||
436 |
newMethodSourceNotAvailable |
|
437 |
||
438 |
^MethodSourceNotAvailable new |
|
439 |
||
440 |
"Created: / 11-04-2012 / 12:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
441 |
! |
|
442 |
||
2798 | 443 |
newProjectDefinitionDoesNotExist |
444 |
||
445 |
^ProjectDefinitionDoesNotExist new |
|
446 |
||
447 |
"Created: / 23-02-2012 / 13:08:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
448 |
! ! |
|
449 |
||
450 |
!ProjectProblem methodsFor:'accessing'! |
|
451 |
||
3547 | 452 |
allProblems:something |
453 |
allProblems := something. |
|
454 |
! |
|
455 |
||
3549 | 456 |
countOtherProblemsOfThisKind |
457 |
^ allProblems |
|
458 |
count: |
|
459 |
[:problem | |
|
460 |
problem class == self class |
|
461 |
and:[ problem ~~ self |
|
462 |
and:[ problem alreadyFixed not]] |
|
463 |
]. |
|
464 |
! |
|
465 |
||
2798 | 466 |
description |
467 |
"Return a (HTML) describing the problem." |
|
468 |
||
469 |
^self subclassResponsibility |
|
470 |
||
471 |
"Created: / 23-02-2012 / 13:04:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
472 |
! |
|
473 |
||
2854 | 474 |
descriptionAndFixes |
475 |
"Return a (HTML) describing the problem plus possible fixes." |
|
476 |
||
3169 | 477 |
|descriptionText fixes| |
478 |
||
479 |
(self alreadyFixed) ifTrue:[^ 'Already fixed.']. |
|
480 |
||
481 |
descriptionText := self description. |
|
482 |
||
483 |
"/ don't use cached fixes (after a fix, the problem may return an empty fix list) |
|
484 |
fixes := self fixes. |
|
485 |
fixes isEmpty ifTrue:[ ^ descriptionText ]. |
|
2854 | 486 |
|
487 |
^String streamContents:[:html | |
|
3169 | 488 |
html nextPutAll: descriptionText. |
2798 | 489 |
|
3169 | 490 |
html nextPutAll: '<br><br>'. |
491 |
fixes size == 1 ifTrue:[ |
|
492 |
html nextPutLine: 'Possible fix:'. |
|
493 |
] ifFalse:[ |
|
494 |
html nextPutLine: 'Possible fixes:'. |
|
495 |
]. |
|
496 |
html nextPutLine:'<ul>'. |
|
497 |
fixes withIndexDo:[:fix :index| |
|
498 |
html |
|
3894 | 499 |
nextPutAll:'<li><a ACTION="doit: self application doFix: '; |
3169 | 500 |
nextPutAll: index printString; |
501 |
nextPutAll:'">'; |
|
502 |
nextPutAll: fix first; |
|
503 |
nextPutAll:'</a></li>'. |
|
504 |
]. |
|
505 |
html nextPutLine:'</ul>'. |
|
2854 | 506 |
]. |
2798 | 507 |
|
2854 | 508 |
"Created: / 26-07-2012 / 09:46:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
509 |
! |
|
510 |
||
4091 | 511 |
klass |
512 |
"Return the class which is subject of the problem. |
|
513 |
To be redefined in problems which are class-related" |
|
514 |
||
515 |
^ nil |
|
516 |
! |
|
517 |
||
2798 | 518 |
label |
519 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
520 |
||
521 |
^self subclassResponsibility |
|
522 |
||
523 |
"Created: / 23-02-2012 / 13:03:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
524 |
! |
|
525 |
||
526 |
package |
|
527 |
^ package |
|
528 |
! |
|
529 |
||
530 |
package:aSymbol |
|
4358 | 531 |
aSymbol notNil ifTrue:[ |
532 |
package := aSymbol asSymbol. |
|
533 |
]. |
|
2854 | 534 |
|
535 |
"Modified: / 11-04-2012 / 16:00:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2798 | 536 |
! |
537 |
||
538 |
packageDefinitionClass |
|
539 |
^ProjectDefinition definitionClassForPackage: package |
|
540 |
||
541 |
"Created: / 23-02-2012 / 13:26:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
542 |
! |
|
543 |
||
544 |
severity |
|
545 |
"Return a severity - one of #error, #warning, #info" |
|
546 |
||
2911 | 547 |
^#warning "/by default |
2798 | 548 |
|
549 |
"Created: / 23-02-2012 / 13:09:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
550 |
! ! |
|
551 |
||
2854 | 552 |
!ProjectProblem methodsFor:'fixing'! |
553 |
||
3549 | 554 |
allUnfixedProblemsOfMyKindDo:aBlock |
555 |
allProblems do:[:p | |
|
556 |
(p class == self class and:[ p alreadyFixed not]) ifTrue:[ |
|
557 |
aBlock value:p |
|
558 |
] |
|
559 |
] |
|
560 |
! |
|
561 |
||
3169 | 562 |
alreadyFixed |
563 |
^ false |
|
564 |
! |
|
565 |
||
2854 | 566 |
doFix: index |
567 |
self initializeFixes. |
|
3169 | 568 |
^ (fixes at: index) second value |
2854 | 569 |
|
570 |
"Created: / 26-07-2012 / 10:07:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3549 | 571 |
! |
572 |
||
573 |
fixes |
|
3790 | 574 |
"Return (possibly empty) list of description-action pairs that |
3549 | 575 |
the user may take to fix/investigate the problem. |
576 |
Returned value should be list of pairs (label, action block). |
|
577 |
To be overriden in subclasses. |
|
578 |
||
579 |
The list should be an array of pairs ( fix label , fix block ). |
|
580 |
Fix block should return true, if the fix was successful, |
|
581 |
false otherwise" |
|
582 |
||
583 |
^#() |
|
584 |
||
585 |
"Created: / 26-07-2012 / 09:46:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2854 | 586 |
! ! |
587 |
||
588 |
!ProjectProblem methodsFor:'initialization'! |
|
589 |
||
590 |
initializeFixes |
|
591 |
||
592 |
fixes isNil ifTrue:[ |
|
3779 | 593 |
fixes := self fixes |
2854 | 594 |
]. |
595 |
||
596 |
"/ super initialize. -- commented since inherited method does nothing |
|
597 |
||
598 |
"Created: / 26-07-2012 / 09:54:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
599 |
! ! |
|
600 |
||
2798 | 601 |
!ProjectProblem methodsFor:'printing & storing'! |
602 |
||
3382
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
603 |
displayOn:aGCOrStream |
3169 | 604 |
|lbl| |
605 |
||
3382
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
606 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
4218 | 607 |
"/ old ST80 means: draw-yourself on a GC. |
3382
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
608 |
(aGCOrStream isStream) ifFalse:[ |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
609 |
^ super displayOn:aGCOrStream |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
610 |
]. |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
611 |
|
3169 | 612 |
lbl := self label. |
3382
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
613 |
self alreadyFixed ifTrue:[ |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
614 |
aGCOrStream |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
615 |
nextPutAll:lbl string; |
4243 | 616 |
italic; |
3382
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
617 |
nextPutAll:' (already fixed)' |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
618 |
] ifFalse:[ |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
619 |
aGCOrStream nextPutAll:lbl. |
025420bf2e2f
Refactor to implement #displayOn:aGcOrStream instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
3342
diff
changeset
|
620 |
]. |
2798 | 621 |
|
622 |
"Created: / 14-02-2012 / 17:02:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4243 | 623 |
"Modified: / 20-06-2017 / 08:34:54 / cg" |
2798 | 624 |
! |
625 |
||
626 |
printOn:aStream |
|
4070 | 627 |
"append a printed representation of the receiver to the argument, aStream" |
2798 | 628 |
|
629 |
super printOn:aStream. |
|
630 |
aStream nextPut:$(. |
|
631 |
self severity printOn:aStream. |
|
632 |
aStream nextPut:$:; space. |
|
633 |
self label printOn:aStream. |
|
634 |
aStream nextPut:$). |
|
635 |
||
636 |
"Modified: / 23-02-2012 / 16:49:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
637 |
! ! |
|
638 |
||
639 |
!ProjectProblem methodsFor:'utilities-HTML'! |
|
640 |
||
641 |
linkToClass: classOrclassName |
|
2854 | 642 |
| className | |
2798 | 643 |
|
644 |
className := classOrclassName isBehavior |
|
3779 | 645 |
ifTrue: [classOrclassName storeString] |
646 |
ifFalse:[classOrclassName]. |
|
647 |
||
648 |
^'<A INFO="Click to browse class" |
|
3894 | 649 |
ACTION="doit: SystemBrowser default openInClass:%1"> |
3779 | 650 |
<CODE>%1</CODE></A>' |
651 |
bindWith: className |
|
2798 | 652 |
|
653 |
"Created: / 23-02-2012 / 13:44:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
654 |
! |
|
655 |
||
656 |
linkToClass: classOrclassName selector: selector |
|
2854 | 657 |
^self linkToClass: classOrclassName selector: selector omitClassName: false |
658 |
||
659 |
"Created: / 23-02-2012 / 13:45:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
660 |
! |
|
661 |
||
662 |
linkToClass: classOrclassName selector: selector omitClassName: omitClassName |
|
2798 | 663 |
|
664 |
| className | |
|
665 |
className := classOrclassName isBehavior |
|
3779 | 666 |
ifTrue: [classOrclassName name] |
667 |
ifFalse:[classOrclassName]. |
|
2854 | 668 |
^omitClassName ifTrue:[ |
3779 | 669 |
'<A INFO="Click to browse method" |
3894 | 670 |
ACTION="doit: SystemBrowser default openInClass:%1 selector: %2"> |
3779 | 671 |
<CODE>#%3</CODE></A>' |
672 |
bindWith: className |
|
673 |
with: selector storeString |
|
674 |
with: selector |
|
2854 | 675 |
] ifFalse:[ |
3779 | 676 |
'<A INFO="Click to browse method" |
3894 | 677 |
ACTION="doit: SystemBrowser default openInClass:%1 selector: %2"> |
3779 | 678 |
<CODE>%1>>%3</CODE></A>' |
679 |
bindWith: className |
|
680 |
with: selector storeString |
|
681 |
with: selector |
|
2854 | 682 |
] |
2798 | 683 |
|
2854 | 684 |
"Created: / 26-07-2012 / 10:26:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3779 | 685 |
! |
686 |
||
687 |
linkToPackage: packageId |
|
688 |
||
689 |
^'<A INFO="Click to browse package" |
|
3894 | 690 |
ACTION="doit: SystemBrowser default openOnPackage:''%1''"> |
3779 | 691 |
<CODE>%1</CODE></A>' |
692 |
bindWith: packageId |
|
2798 | 693 |
! ! |
694 |
||
695 |
!ProjectProblem::ClassProblem methodsFor:'accessing'! |
|
696 |
||
697 |
className |
|
698 |
^ className |
|
699 |
! |
|
700 |
||
701 |
className:something |
|
702 |
className := something. |
|
2854 | 703 |
! |
704 |
||
705 |
klass |
|
706 |
"Return the class which is subject of the problem" |
|
2911 | 707 |
|
3143 | 708 |
"/ | class | |
709 |
"/ |
|
710 |
"/ (className endsWith: ' class') ifTrue:[ |
|
711 |
"/ class := Smalltalk at: (className copyTo: className size - 6) asSymbol. |
|
712 |
"/ class := class theMetaclass. |
|
713 |
"/ ] ifFalse:[ |
|
714 |
"/ class := Smalltalk at: className asSymbol |
|
715 |
"/ ]. |
|
716 |
"/ ^class |
|
2854 | 717 |
|
3143 | 718 |
"/ the above is exactly: |
3154 | 719 |
^ Smalltalk classNamed:className |
2854 | 720 |
|
721 |
"Created: / 26-07-2012 / 10:21:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2798 | 722 |
! ! |
723 |
||
3198 | 724 |
!ProjectProblem::ClassProblem methodsFor:'fixing'! |
725 |
||
726 |
doUpdateAllProjectDefinitions |
|
727 |
"full update the project definition class; |
|
728 |
will do a rescan to add all missing items" |
|
729 |
||
730 |
| def | |
|
731 |
||
732 |
def := self packageDefinitionClass. |
|
733 |
def isNil ifTrue:[ ^ false ]. |
|
734 |
||
735 |
def |
|
736 |
updateMethodsCodeUsingCompiler:Compiler |
|
737 |
ignoreOldDefinition:false. |
|
738 |
||
739 |
UserNotification notify: ('Project definitions updated. Do not forget to check in build support files!!'). |
|
740 |
^true |
|
741 |
! ! |
|
742 |
||
3549 | 743 |
!ProjectProblem::InconsistentProjectDefinition methodsFor:'fixing'! |
2911 | 744 |
|
3160 | 745 |
fixes |
3790 | 746 |
"return a list of description-actionBlock pairs for possible fixes" |
2911 | 747 |
|
3160 | 748 |
^Array |
3809 | 749 |
with: (Array |
3816 | 750 |
with: ('Full update of the package definition (rescan) of "%1"' bindWith:package) |
3809 | 751 |
with: [ self doUpdateAllProjectDefinitions ]) |
2911 | 752 |
! ! |
753 |
||
3449 | 754 |
!ProjectProblem::ClassListedBeforeItsPool methodsFor:'accessing'! |
755 |
||
756 |
poolName |
|
757 |
^ poolName |
|
758 |
! |
|
759 |
||
760 |
poolName:something |
|
761 |
poolName := something. |
|
762 |
! ! |
|
763 |
||
764 |
!ProjectProblem::ClassListedBeforeItsPool methodsFor:'accessing-description'! |
|
765 |
||
766 |
description |
|
767 |
"Return a (HTML) describing the problem." |
|
768 |
||
769 |
^ |
|
770 |
'Class %2 is listed in project definition (%1) before one of its pools (%3). |
|
771 |
<br>Such class will fail to compile (if the package is being stc-compiled) |
|
772 |
and load (if the package is being loaded from source). |
|
773 |
<br>Make sure class (%3) is listed before (%2). |
|
774 |
||
775 |
' |
|
776 |
bindWith: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
777 |
with: (self linkToClass: className) |
|
778 |
with: (self linkToClass: poolName) |
|
779 |
||
780 |
"Modified: / 13-09-2012 / 18:29:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
781 |
! |
|
782 |
||
783 |
label |
|
784 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
785 |
||
786 |
^'Class %1 listed in project definition "%2" before one of its pools' bindWith: className allBold with:self packageDefinitionClass |
|
787 |
||
788 |
"Modified: / 13-09-2012 / 17:36:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
789 |
! ! |
|
790 |
||
791 |
!ProjectProblem::ClassListedBeforeItsSuperclass methodsFor:'accessing'! |
|
792 |
||
793 |
superClassName |
|
794 |
^ superClassName |
|
795 |
! |
|
796 |
||
797 |
superClassName:something |
|
798 |
superClassName := something. |
|
799 |
! ! |
|
800 |
||
801 |
!ProjectProblem::ClassListedBeforeItsSuperclass methodsFor:'accessing-description'! |
|
802 |
||
803 |
description |
|
804 |
"Return a (HTML) describing the problem." |
|
805 |
||
806 |
^ |
|
807 |
'Class %2 is listed in project definition (%1) before its superclass %3. |
|
808 |
<br>The package can be stc-compiled |
|
809 |
(because the generated makefile compiles in correct order) |
|
810 |
but the class may fail to load from source. |
|
811 |
<br>Make sure %3 is listed before %2. |
|
812 |
||
813 |
' |
|
814 |
bindWith: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
815 |
with: (self linkToClass: className) |
|
816 |
with: (self linkToClass: superClassName) |
|
817 |
||
818 |
"Modified: / 13-09-2012 / 18:29:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
819 |
! |
|
820 |
||
821 |
label |
|
822 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
823 |
||
3691 | 824 |
^'Class %1 listed in project definition "%2" before its superclass %3' |
825 |
bindWith: className allBold |
|
826 |
with:self packageDefinitionClass |
|
827 |
with:superClassName |
|
3449 | 828 |
|
829 |
"Modified: / 13-09-2012 / 17:36:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
830 |
! ! |
|
831 |
||
2911 | 832 |
!ProjectProblem::ClassListedButDoesNotExist methodsFor:'accessing'! |
833 |
||
3160 | 834 |
severity |
835 |
"Return a severity - one of #error, #warning, #info" |
|
836 |
||
837 |
^#error |
|
838 |
||
839 |
"Created: / 11-04-2012 / 12:48:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
840 |
! ! |
|
841 |
||
842 |
!ProjectProblem::ClassListedButDoesNotExist methodsFor:'accessing-description'! |
|
843 |
||
2911 | 844 |
description |
845 |
"Return a (HTML) describing the problem." |
|
3550 | 846 |
|
847 |
|msg| |
|
2911 | 848 |
|
3550 | 849 |
self klass isNil ifTrue:[ |
850 |
msg := |
|
851 |
'Class "<code>%1</code>" is listed in the project definition but not present in the system. |
|
852 |
<br> |
|
2911 | 853 |
You should either create it or remove it from %2.' |
3550 | 854 |
] ifFalse:[ |
855 |
msg := |
|
856 |
'Class "<code>%1</code>" is listed in the project definition but is located in another package ("',self klass package,'") |
|
857 |
<br> |
|
858 |
You should either move the class to this package it or remove it from the list in %2.' |
|
859 |
]. |
|
860 |
^ msg |
|
861 |
bindWith: className |
|
862 |
with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes) |
|
2911 | 863 |
|
864 |
"Modified: / 28-02-2012 / 22:23:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
865 |
! |
|
866 |
||
867 |
label |
|
3160 | 868 |
^'Missing class: ', className allBold |
2911 | 869 |
|
870 |
"Modified: / 23-02-2012 / 13:20:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
871 |
! ! |
|
872 |
||
3550 | 873 |
!ProjectProblem::ClassListedButDoesNotExist methodsFor:'fixing'! |
874 |
||
875 |
alreadyFixed |
|
876 |
| cls def | |
|
877 |
||
878 |
def := self packageDefinitionClass. |
|
879 |
def isNil ifTrue:[ ^ false ]. "/ ouch - can this happen? |
|
880 |
||
881 |
(def compiled_classNames includes:className) ifFalse:[^ true]. |
|
882 |
||
883 |
cls := self klass. |
|
884 |
cls isNil ifTrue:[^ false]. |
|
885 |
||
886 |
^ cls package = self package |
|
887 |
! |
|
888 |
||
889 |
doMoveClassToPackage |
|
3806 | 890 |
| cls def | |
891 |
||
892 |
def := self packageDefinitionClass. |
|
893 |
def isNil ifTrue:[ ^ false ]. |
|
894 |
cls := self klass. |
|
895 |
cls isNil ifTrue:[ ^ false ]. |
|
896 |
cls package:def package. |
|
897 |
UserNotification notify: ('Do not forget to check in the class into the appropriate repository!!'). |
|
898 |
^true |
|
899 |
! |
|
900 |
||
901 |
doRemoveClassFromProjectDefinition |
|
902 |
| def cls | |
|
903 |
||
904 |
def := self packageDefinitionClass. |
|
905 |
def isNil ifTrue:[ ^ false ]. |
|
906 |
cls := self klass. |
|
907 |
cls isNil ifTrue:[ ^ false ]. |
|
908 |
def excludeClasses:{ cls } usingCompiler:nil. |
|
4556 | 909 |
UserNotification notify: ('Class removed from project. Do not forget to checkin build support files!!'). |
3806 | 910 |
^true |
911 |
! |
|
912 |
||
913 |
fixes |
|
914 |
"return a list of description-actionBlock pairs for possible fixes" |
|
915 |
||
916 |
|allFixes| |
|
917 |
||
918 |
allFixes := OrderedCollection new. |
|
919 |
allFixes add:{ |
|
920 |
'Remove from project definition' . |
|
921 |
[ self doRemoveClassFromProjectDefinition ] |
|
922 |
}. |
|
923 |
self klass notNil ifTrue:[ |
|
924 |
allFixes add:{ |
|
925 |
'Move class to package' . |
|
926 |
[ self doMoveClassToPackage ] |
|
927 |
}. |
|
928 |
]. |
|
929 |
allFixes addAll:super fixes. |
|
930 |
^ allFixes |
|
931 |
! ! |
|
932 |
||
933 |
!ProjectProblem::ClassListedButInOtherPackage methodsFor:'accessing'! |
|
934 |
||
935 |
severity |
|
936 |
"Return a severity - one of #error, #warning, #info" |
|
937 |
||
938 |
^#error |
|
939 |
||
940 |
"Created: / 11-04-2012 / 12:48:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
941 |
! ! |
|
942 |
||
943 |
!ProjectProblem::ClassListedButInOtherPackage methodsFor:'accessing-description'! |
|
944 |
||
945 |
description |
|
946 |
"Return a (HTML) describing the problem." |
|
947 |
||
948 |
|msg| |
|
949 |
||
950 |
msg := |
|
951 |
'Class "<code>%1</code>" is listed in the project definition but is assigned to another package (%2). |
|
952 |
<br> |
|
953 |
You should either remove it from the classList %3 or completely assign it to %4.'. |
|
954 |
||
955 |
^ msg |
|
956 |
bindWith: className |
|
957 |
with:(self klass package) |
|
958 |
with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
959 |
with: package |
|
960 |
! |
|
961 |
||
962 |
label |
|
963 |
^'Class %1 is assigned to another package (%2)' |
|
964 |
bindWith:className allBold |
|
965 |
with: self klass package |
|
966 |
! ! |
|
967 |
||
968 |
!ProjectProblem::ClassListedButInOtherPackage methodsFor:'fixing'! |
|
969 |
||
970 |
alreadyFixed |
|
971 |
| cls def | |
|
972 |
||
973 |
def := self packageDefinitionClass. |
|
974 |
def isNil ifTrue:[ ^ false ]. "/ ouch - can this happen? |
|
975 |
||
976 |
(def allClassNames includes:className) ifFalse:[^ true]. |
|
3550 | 977 |
|
978 |
cls := self klass. |
|
3806 | 979 |
cls isNil ifTrue:[^ false]. |
980 |
||
981 |
^ cls package = package |
|
982 |
! |
|
983 |
||
984 |
doMoveClassToPackage |
|
985 |
| cls def | |
|
986 |
||
987 |
def := self packageDefinitionClass. |
|
988 |
def isNil ifTrue:[ ^ false ]. |
|
989 |
cls := self klass. |
|
3550 | 990 |
cls isNil ifTrue:[ ^ false ]. |
3806 | 991 |
cls package:def package. |
3550 | 992 |
UserNotification notify: ('Do not forget to check in the class into the appropriate repository!!'). |
993 |
^true |
|
994 |
! |
|
995 |
||
996 |
doRemoveClassFromProjectDefinition |
|
997 |
| def cls | |
|
998 |
||
999 |
def := self packageDefinitionClass. |
|
1000 |
def isNil ifTrue:[ ^ false ]. |
|
1001 |
cls := self klass. |
|
1002 |
cls isNil ifTrue:[ ^ false ]. |
|
1003 |
def excludeClasses:{ cls } usingCompiler:nil. |
|
4556 | 1004 |
UserNotification notify: ('Class removed from project. Do not forget to checkin build support files!!'). |
3550 | 1005 |
^true |
1006 |
! |
|
1007 |
||
1008 |
fixes |
|
3790 | 1009 |
"return a list of description-actionBlock pairs for possible fixes" |
1010 |
||
3550 | 1011 |
|allFixes| |
1012 |
||
1013 |
allFixes := OrderedCollection new. |
|
1014 |
allFixes add:{ |
|
1015 |
'Remove from project definition' . |
|
1016 |
[ self doRemoveClassFromProjectDefinition ] |
|
1017 |
}. |
|
1018 |
self klass notNil ifTrue:[ |
|
1019 |
allFixes add:{ |
|
1020 |
'Move class to package' . |
|
1021 |
[ self doMoveClassToPackage ] |
|
1022 |
}. |
|
1023 |
]. |
|
1024 |
allFixes addAll:super fixes. |
|
1025 |
^ allFixes |
|
1026 |
! ! |
|
1027 |
||
3160 | 1028 |
!ProjectProblem::ClassListedMultipleTimes methodsFor:'accessing-description'! |
2911 | 1029 |
|
1030 |
description |
|
1031 |
"Return a (HTML) describing the problem." |
|
1032 |
||
1033 |
^ |
|
1034 |
'A class %1 is listed more than once in %2. |
|
1035 |
||
1036 |
Such package will fail to compile, as linker will complain |
|
3147 | 1037 |
about multiple definitions of the same symbols. Make sure each |
2911 | 1038 |
class is listed only once. |
1039 |
' |
|
1040 |
bindWith: (self linkToClass: className) |
|
3645
175a54263457
Fixes description in ClassListedMultipleTimes problem.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3588
diff
changeset
|
1041 |
with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes) |
175a54263457
Fixes description in ClassListedMultipleTimes problem.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3588
diff
changeset
|
1042 |
|
175a54263457
Fixes description in ClassListedMultipleTimes problem.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3588
diff
changeset
|
1043 |
"Modified: / 26-11-2014 / 09:25:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2911 | 1044 |
! |
1045 |
||
1046 |
label |
|
1047 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1048 |
||
3160 | 1049 |
^'Class %1 listed multiple times in project definition "%2"' bindWith: className allBold with:self packageDefinitionClass |
2911 | 1050 |
|
1051 |
"Modified: / 23-02-2012 / 13:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1052 |
! ! |
|
1053 |
||
3160 | 1054 |
!ProjectProblem::ClassNotListed methodsFor:'accessing-description'! |
2798 | 1055 |
|
1056 |
description |
|
1057 |
"Return a (HTML) describing the problem." |
|
1058 |
||
1059 |
^ |
|
3147 | 1060 |
'Class %1 is not listed in project definition (%2). |
1061 |
<br>The class won''t be compiled and - if some other class dependents on it - the whole package will fail to compile |
|
2854 | 1062 |
at all.' |
1063 |
bindWith: (self linkToClass: className) |
|
1064 |
with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
1065 |
||
1066 |
"Modified: / 26-07-2012 / 10:27:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1067 |
! |
|
1068 |
||
3143 | 1069 |
label |
1070 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1071 |
||
3160 | 1072 |
^'Class %1 not listed in project definition "%2"' bindWith: className allBold with:self packageDefinitionClass |
3143 | 1073 |
|
1074 |
"Modified: / 23-02-2012 / 13:55:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1075 |
! ! |
|
1076 |
||
1077 |
!ProjectProblem::ClassNotListed methodsFor:'fixing'! |
|
1078 |
||
3549 | 1079 |
alreadyFixed |
1080 |
| cls def | |
|
1081 |
||
1082 |
def := self packageDefinitionClass. |
|
1083 |
def isNil ifTrue:[ ^ false ]. "/ ouch - can this happen? |
|
1084 |
||
1085 |
cls := self klass. |
|
1086 |
"/ One may "fix" the problem by actually removing the class. |
|
1087 |
"/ In this case, consider problem as "fixed". |
|
1088 |
cls isNil ifTrue:[^ true]. |
|
1089 |
||
1090 |
^ (def compiled_classNames includes:className) |
|
1091 |
! |
|
1092 |
||
1093 |
doIncludeAllClassesInProject |
|
1094 |
"Include all unlisted subject classes in project definition. |
|
1095 |
Return false if fix fails, true otherwise" |
|
1096 |
||
1097 |
|any| |
|
1098 |
||
1099 |
any := false. |
|
1100 |
self allUnfixedProblemsOfMyKindDo:[:p | |
|
4032 | 1101 |
"/ evaluating or here |
3549 | 1102 |
any := any | (p doIncludeInProjectAsAutoloaded:false) |
1103 |
]. |
|
1104 |
^ any |
|
1105 |
! |
|
1106 |
||
2854 | 1107 |
doIncludeInProject |
1108 |
"Include subject class in project definition. Return false if |
|
1109 |
fix fails, true otherwise" |
|
2798 | 1110 |
|
3160 | 1111 |
^ self doIncludeInProjectAsAutoloaded:false |
2854 | 1112 |
! |
2798 | 1113 |
|
2854 | 1114 |
doIncludeInProjectAsAutoloaded |
1115 |
"Include subject class in project definition. Return false if |
|
1116 |
fix fails, true otherwise" |
|
3160 | 1117 |
|
1118 |
^ self doIncludeInProjectAsAutoloaded:true |
|
1119 |
! |
|
1120 |
||
1121 |
doIncludeInProjectAsAutoloaded:asAutoloaded |
|
1122 |
"Include subject class in project definition. Return false if |
|
1123 |
fix fails, true otherwise" |
|
1124 |
||
2854 | 1125 |
| def cls | |
3160 | 1126 |
|
2854 | 1127 |
def := self packageDefinitionClass. |
1128 |
def isNil ifTrue:[ ^ false ]. |
|
1129 |
cls := self klass. |
|
1130 |
cls isNil ifTrue:[ ^ false ]. |
|
3160 | 1131 |
asAutoloaded ifTrue:[ |
1132 |
def makeClassesAutoloaded:(Array with: cls) usingCompiler: nil. |
|
1133 |
] ifFalse:[ |
|
1134 |
def includeClasses:(Array with: cls) usingCompiler: nil. |
|
1135 |
]. |
|
4556 | 1136 |
UserNotification notify: ('Class added. Do not forget to checkin build support files!!'). |
2854 | 1137 |
^true |
1138 |
||
1139 |
"Created: / 26-07-2012 / 10:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1140 |
! |
|
1141 |
||
1142 |
fixes |
|
3790 | 1143 |
"return a list of description-actionBlock pairs for possible fixes" |
1144 |
||
3549 | 1145 |
|numOther fixes| |
2854 | 1146 |
|
3549 | 1147 |
numOther := self countOtherProblemsOfThisKind. |
1148 |
fixes := OrderedCollection new. |
|
1149 |
fixes add:{ 'Add class to project (as compiled)' . |
|
1150 |
[ self doIncludeInProject ] |
|
1151 |
}. |
|
1152 |
numOther > 0 ifTrue:[ |
|
1153 |
fixes add:{ 'Add all listed classes to project (as compiled)' . |
|
1154 |
[ self doIncludeAllClassesInProject ] |
|
1155 |
}. |
|
1156 |
]. |
|
1157 |
||
1158 |
fixes |
|
1159 |
add:{ 'Add class to project as autoloaded' . |
|
1160 |
[ self doIncludeInProjectAsAutoloaded ] |
|
1161 |
}; |
|
1162 |
add:{ 'Full update of the project definitions (rescan)' . |
|
1163 |
[ self doUpdateAllProjectDefinitions ] |
|
1164 |
}. |
|
1165 |
^ fixes |
|
2854 | 1166 |
|
1167 |
"Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2798 | 1168 |
! ! |
1169 |
||
3449 | 1170 |
!ProjectProblem::ClassIsCompiledButSuperclassIsAutoloaded methodsFor:'accessing'! |
3160 | 1171 |
|
2798 | 1172 |
description |
1173 |
"Return a (HTML) describing the problem." |
|
1174 |
||
1175 |
^ |
|
3779 | 1176 |
'Class %1 is compiled (i.e., not autoloaded) but its superclass %2 is autoloaded. |
1177 |
<p> |
|
1178 |
Such class won''t compile with STC because of a missing superclass header file. |
|
3776 | 1179 |
To fix it, either make %1 autoloaded or make %2 compiled.' |
3449 | 1180 |
bindWith: (self linkToClass: className) |
1181 |
with: (self linkToClass: (Smalltalk at: className) superclass name) |
|
2798 | 1182 |
|
3449 | 1183 |
"Modified: / 20-09-2013 / 11:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2798 | 1184 |
! |
1185 |
||
1186 |
label |
|
1187 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1188 |
||
3449 | 1189 |
^ 'Class ', className , ' is compiled but its superclass is autoloaded' |
1190 |
||
1191 |
"Modified: / 20-09-2013 / 11:00:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1192 |
! ! |
|
1193 |
||
1194 |
!ProjectProblem::ClassIsCompiledButSuperclassIsAutoloaded methodsFor:'fixing'! |
|
1195 |
||
1196 |
doIncludeInProjectAsAutoloaded |
|
1197 |
"Include subject class in project definition. Return false if |
|
1198 |
fix fails, true otherwise" |
|
1199 |
||
1200 |
^ self doIncludeInProjectAsAutoloaded:true |
|
1201 |
! |
|
1202 |
||
1203 |
doIncludeInProjectAsAutoloaded:asAutoloaded |
|
1204 |
"Include subject class in project definition. Return false if |
|
1205 |
fix fails, true otherwise" |
|
1206 |
||
1207 |
| def cls | |
|
2911 | 1208 |
|
3449 | 1209 |
def := self packageDefinitionClass. |
1210 |
def isNil ifTrue:[ ^ false ]. |
|
1211 |
cls := self klass. |
|
1212 |
cls isNil ifTrue:[ ^ false ]. |
|
1213 |
asAutoloaded ifTrue:[ |
|
1214 |
def makeClassesAutoloaded:(Array with: cls) usingCompiler: nil. |
|
1215 |
] ifFalse:[ |
|
1216 |
def includeClasses:(Array with: cls) usingCompiler: nil. |
|
1217 |
]. |
|
4556 | 1218 |
UserNotification notify: ('Class added. Do not forget to checkin build support files!!'). |
3449 | 1219 |
^true |
1220 |
||
1221 |
"Created: / 26-07-2012 / 10:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1222 |
! |
|
1223 |
||
3777 | 1224 |
doMakeSuperclassCompiled |
1225 |
"Include subject's super class in project definition as compiled class. |
|
1226 |
Return false if fix fails, true otherwise" |
|
1227 |
||
3779 | 1228 |
| def cls superclass superclassDef| |
3777 | 1229 |
|
1230 |
def := self packageDefinitionClass. |
|
1231 |
def isNil ifTrue:[ ^ false ]. |
|
1232 |
cls := self klass. |
|
1233 |
cls isNil ifTrue:[ ^ false ]. |
|
3779 | 1234 |
|
3777 | 1235 |
superclass := (Smalltalk at: className) superclass. |
3779 | 1236 |
superclassDef := superclass projectDefinitionClass. |
1237 |
superclassDef isNil ifTrue:[^ false]. |
|
1238 |
||
1239 |
superclassDef includeClasses:(Array with: superclass) usingCompiler: nil. |
|
3777 | 1240 |
|
4556 | 1241 |
UserNotification notify: ('Superclass added/changed. Do not forget to checkin build support files!!'). |
3777 | 1242 |
^true |
1243 |
! |
|
1244 |
||
3449 | 1245 |
fixes |
3790 | 1246 |
"return a list of description-actionBlock pairs for possible fixes" |
1247 |
||
3779 | 1248 |
|fixes superClass superPackage| |
1249 |
||
1250 |
fixes := super fixes asNewOrderedCollection. |
|
1251 |
||
1252 |
superClass := (Smalltalk at: className) superclass. |
|
1253 |
superPackage := superClass package. |
|
1254 |
||
1255 |
superPackage = package ifTrue:[ |
|
1256 |
fixes add: |
|
1257 |
{ 'Make ',className,' autoloaded in project' . |
|
1258 |
[ self doIncludeInProjectAsAutoloaded ]}. |
|
1259 |
fixes add: |
|
1260 |
{ 'Make superclass ',(superClass name),' compiled' . |
|
3777 | 1261 |
[ self doMakeSuperclassCompiled ]} . |
3779 | 1262 |
] ifFalse:[ |
1263 |
fixes add: |
|
1264 |
{ 'Make ',className,' autoloaded in project "',package,'"' . |
|
1265 |
[ self doIncludeInProjectAsAutoloaded ]}. |
|
1266 |
||
1267 |
fixes add: |
|
1268 |
{ 'Make superclass ',(superClass name),' compiled in "',superPackage,'"'. |
|
1269 |
[ self doMakeSuperclassCompiled ]} . |
|
1270 |
]. |
|
3778 | 1271 |
^ fixes |
2911 | 1272 |
! ! |
1273 |
||
3588 | 1274 |
!ProjectProblem::ClassShouldNotBeInPackage methodsFor:'accessing-description'! |
1275 |
||
1276 |
description |
|
1277 |
"Return a (HTML) describing the problem." |
|
1278 |
||
1279 |
^ |
|
1280 |
'Class %1 should not be assigned to a Folder-only package (%2). |
|
1281 |
Folder-only packages are only meant for organization and to visit subprojects for compilation. |
|
1282 |
<br>The class won''t be compiled and - if some other class dependents on it - the whole package will fail to compile |
|
1283 |
at all.' |
|
1284 |
bindWith: (self linkToClass: className) |
|
1285 |
with: (self linkToClass: self packageDefinitionClass class selector: #classNamesAndAttributes omitClassName: true) |
|
1286 |
! |
|
1287 |
||
1288 |
label |
|
1289 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1290 |
||
1291 |
^'Class %1 not listed in project definition "%2"' bindWith: className allBold with:self packageDefinitionClass |
|
1292 |
||
1293 |
"Modified: / 23-02-2012 / 13:55:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1294 |
! ! |
|
1295 |
||
1296 |
!ProjectProblem::ClassShouldNotBeInPackage methodsFor:'fixing'! |
|
1297 |
||
1298 |
alreadyFixed |
|
1299 |
| cls def | |
|
1300 |
||
1301 |
def := self packageDefinitionClass. |
|
1302 |
def isNil ifTrue:[ ^ false ]. "/ ouch - can this happen? |
|
1303 |
||
1304 |
cls := self klass. |
|
1305 |
"/ One may "fix" the problem by actually removing the class. |
|
1306 |
"/ In this case, consider problem as "fixed". |
|
1307 |
cls isNil ifTrue:[^ true]. |
|
1308 |
||
1309 |
^ (def compiled_classNames includes:className) |
|
1310 |
! |
|
1311 |
||
1312 |
doIncludeAllClassesInProject |
|
1313 |
"Include all unlisted subject classes in project definition. |
|
1314 |
Return false if fix fails, true otherwise" |
|
1315 |
||
1316 |
|any| |
|
1317 |
||
1318 |
any := false. |
|
1319 |
self allUnfixedProblemsOfMyKindDo:[:p | |
|
4032 | 1320 |
"/ evaluating or here |
3588 | 1321 |
any := any | (p doIncludeInProjectAsAutoloaded:false) |
1322 |
]. |
|
1323 |
^ any |
|
1324 |
! |
|
1325 |
||
1326 |
doIncludeInProject |
|
1327 |
"Include subject class in project definition. Return false if |
|
1328 |
fix fails, true otherwise" |
|
1329 |
||
1330 |
^ self doIncludeInProjectAsAutoloaded:false |
|
1331 |
! |
|
1332 |
||
1333 |
doIncludeInProjectAsAutoloaded |
|
1334 |
"Include subject class in project definition. Return false if |
|
1335 |
fix fails, true otherwise" |
|
1336 |
||
1337 |
^ self doIncludeInProjectAsAutoloaded:true |
|
1338 |
! |
|
1339 |
||
1340 |
doIncludeInProjectAsAutoloaded:asAutoloaded |
|
1341 |
"Include subject class in project definition. Return false if |
|
1342 |
fix fails, true otherwise" |
|
1343 |
||
1344 |
| def cls | |
|
1345 |
||
1346 |
def := self packageDefinitionClass. |
|
1347 |
def isNil ifTrue:[ ^ false ]. |
|
1348 |
cls := self klass. |
|
1349 |
cls isNil ifTrue:[ ^ false ]. |
|
1350 |
asAutoloaded ifTrue:[ |
|
1351 |
def makeClassesAutoloaded:(Array with: cls) usingCompiler: nil. |
|
1352 |
] ifFalse:[ |
|
1353 |
def includeClasses:(Array with: cls) usingCompiler: nil. |
|
1354 |
]. |
|
4556 | 1355 |
UserNotification notify: ('Class added. Do not forget to checkin build support files!!'). |
3588 | 1356 |
^true |
1357 |
||
1358 |
"Created: / 26-07-2012 / 10:41:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1359 |
! |
|
1360 |
||
1361 |
fixes |
|
3790 | 1362 |
"return a list of description-actionBlock pairs for possible fixes" |
1363 |
||
3588 | 1364 |
|numOther fixes| |
1365 |
||
1366 |
numOther := self countOtherProblemsOfThisKind. |
|
1367 |
fixes := OrderedCollection new. |
|
1368 |
fixes add:{ 'Add class to project (as compiled)' . |
|
1369 |
[ self doIncludeInProject ] |
|
1370 |
}. |
|
1371 |
numOther > 0 ifTrue:[ |
|
1372 |
fixes add:{ 'Add all listed classes to project (as compiled)' . |
|
1373 |
[ self doIncludeAllClassesInProject ] |
|
1374 |
}. |
|
1375 |
]. |
|
1376 |
||
1377 |
fixes |
|
1378 |
add:{ 'Add class to project as autoloaded' . |
|
1379 |
[ self doIncludeInProjectAsAutoloaded ] |
|
1380 |
}; |
|
1381 |
add:{ 'Full update of the project definitions (rescan)' . |
|
1382 |
[ self doUpdateAllProjectDefinitions ] |
|
1383 |
}. |
|
1384 |
^ fixes |
|
1385 |
||
1386 |
"Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1387 |
! ! |
|
1388 |
||
2911 | 1389 |
!ProjectProblem::ClassUsesPoolProblem methodsFor:'accessing'! |
1390 |
||
2798 | 1391 |
poolName |
1392 |
^ poolName |
|
1393 |
! |
|
1394 |
||
1395 |
poolName:something |
|
1396 |
poolName := something. |
|
1397 |
! ! |
|
1398 |
||
3160 | 1399 |
!ProjectProblem::ClassUsesPoolButItIsNotASharedPool methodsFor:'accessing-description'! |
2798 | 1400 |
|
1401 |
description |
|
1402 |
"Return a (HTML) describing the problem." |
|
1403 |
||
1404 |
^ |
|
3147 | 1405 |
'A class %1 uses pool %2 but it does not exist. |
2798 | 1406 |
|
3154 | 1407 |
The pool should be removed from the class definition; |
3147 | 1408 |
otherwise the package won''t compile due to a missing class.' |
2911 | 1409 |
bindWith: (self linkToClass: className) |
3779 | 1410 |
with: (self linkToClass: poolName) |
2798 | 1411 |
|
1412 |
"Modified: / 23-02-2012 / 13:48:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1413 |
! |
|
1414 |
||
1415 |
label |
|
1416 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1417 |
||
3160 | 1418 |
^'Used pool %1 is not a SharedPool' bindWith: className allBold |
2798 | 1419 |
|
1420 |
"Modified: / 23-02-2012 / 13:40:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2911 | 1421 |
! ! |
1422 |
||
3160 | 1423 |
!ProjectProblem::ClassUsesPoolInNamespaceButNamespaceIsNotDefined methodsFor:'accessing-description'! |
2911 | 1424 |
|
1425 |
description |
|
1426 |
"Return a (HTML) describing the problem." |
|
1427 |
||
1428 |
^ |
|
3147 | 1429 |
'A class %1 uses pool %2 from same namespace as the class, |
1430 |
but the namespace is not explicitly named in the shared pools definition. |
|
2911 | 1431 |
|
1432 |
Due to a bug in stc, such code will fail to compile. A pool definition |
|
3147 | 1433 |
must contain a fully qualified class name including namespace.' |
2911 | 1434 |
bindWith: (self linkToClass: className) |
3779 | 1435 |
with: (self linkToClass: poolName) |
2911 | 1436 |
|
1437 |
"Modified: / 13-09-2012 / 16:32:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2798 | 1438 |
! |
1439 |
||
2911 | 1440 |
label |
1441 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1442 |
||
3160 | 1443 |
^ 'Missing namespace prefix in shared pools definition of %1' bindWith: className allBold |
2911 | 1444 |
|
1445 |
"Modified: / 13-09-2012 / 16:28:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1446 |
! ! |
|
1447 |
||
3160 | 1448 |
!ProjectProblem::ClassUsesPoolButItDoesNotExist methodsFor:'accessing-description'! |
2911 | 1449 |
|
1450 |
description |
|
1451 |
"Return a (HTML) describing the problem." |
|
1452 |
||
1453 |
^ |
|
3147 | 1454 |
'A class %1 uses pool %2 but it does not exist. |
2911 | 1455 |
|
3154 | 1456 |
The pool should be removed from the class definition; |
3147 | 1457 |
otherwise the package won''t compile due to a missing class.' |
2911 | 1458 |
bindWith: (self linkToClass: className) with: poolName |
1459 |
||
1460 |
"Modified: / 13-09-2012 / 16:24:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2798 | 1461 |
! |
1462 |
||
2911 | 1463 |
label |
1464 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1465 |
||
3160 | 1466 |
^'Missing pool: ' , className allBold |
2911 | 1467 |
|
1468 |
"Modified: / 23-02-2012 / 13:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2798 | 1469 |
! ! |
1470 |
||
1471 |
!ProjectProblem::MethodProblem methodsFor:'accessing'! |
|
1472 |
||
1473 |
className:something selector: sel |
|
1474 |
className := something. |
|
1475 |
selector := sel |
|
1476 |
||
1477 |
"Created: / 23-02-2012 / 14:17:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1478 |
! |
|
1479 |
||
2854 | 1480 |
method |
1481 |
| class | |
|
1482 |
||
1483 |
class := self klass. |
|
3166 | 1484 |
class isNil ifTrue:[ ^ nil ]. |
2854 | 1485 |
^class compiledMethodAt: selector |
1486 |
||
1487 |
"Created: / 26-07-2012 / 10:09:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1488 |
! |
|
1489 |
||
1490 |
method: method |
|
1491 |
||
1492 |
self className: method mclass name selector: method selector |
|
1493 |
||
1494 |
"Created: / 11-04-2012 / 12:32:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1495 |
! |
|
1496 |
||
2798 | 1497 |
selector |
1498 |
^ selector |
|
1499 |
! |
|
1500 |
||
1501 |
selector:something |
|
1502 |
selector := something. |
|
1503 |
! ! |
|
1504 |
||
3204 | 1505 |
!ProjectProblem::MethodProblem methodsFor:'fixes'! |
1506 |
||
1507 |
doRemoveMethodFromExtensionsList |
|
1508 |
"update the extension method info in the project definition. |
|
1509 |
Return false if fix fails, true otherwise" |
|
1510 |
||
1511 |
| def mthd | |
|
1512 |
||
1513 |
def := self packageDefinitionClass. |
|
1514 |
def isNil ifTrue:[ ^ false ]. |
|
1515 |
mthd := self method. |
|
1516 |
mthd isNil ifTrue:[ ^ false ]. |
|
1517 |
||
1518 |
def excludeMethods:(Array with:mthd) usingCompiler:nil. |
|
1519 |
UserNotification notify: ('ProjectDefinition updated. Do not forget to check it in!!'). |
|
1520 |
^true |
|
1521 |
! |
|
1522 |
||
1523 |
doRemoveNamedMethodFromExtensionsList |
|
1524 |
"update the extension method info in the project definition. |
|
1525 |
Return false if fix fails, true otherwise" |
|
1526 |
||
1527 |
| def | |
|
1528 |
||
1529 |
def := self packageDefinitionClass. |
|
1530 |
def isNil ifTrue:[ ^ false ]. |
|
1531 |
||
1532 |
def excludeMethodFor:selector inClassNamed:className usingCompiler:nil. |
|
1533 |
UserNotification notify: ('ProjectDefinition updated. Do not forget to check it in!!'). |
|
1534 |
^true |
|
1535 |
! ! |
|
1536 |
||
2798 | 1537 |
!ProjectProblem::MethodProblem methodsFor:'utilities-HTML'! |
1538 |
||
1539 |
linkToMethod |
|
1540 |
||
1541 |
^self linkToClass: className selector: selector |
|
1542 |
||
1543 |
"Created: / 23-02-2012 / 14:21:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1544 |
! ! |
|
1545 |
||
3166 | 1546 |
!ProjectProblem::ExtensionMethodListedButInDifferentPackage methodsFor:'accessing-description'! |
1547 |
||
1548 |
description |
|
1549 |
"Return a (HTML) describing the problem." |
|
1550 |
||
3168 | 1551 |
|mthd text| |
3166 | 1552 |
|
3168 | 1553 |
(mthd := self method) isNil ifTrue:[ ^ 'Method removed.' ]. |
3169 | 1554 |
|
3168 | 1555 |
mthd package = mthd mclass package ifTrue:[ |
1556 |
text := |
|
3650 | 1557 |
'Method %1 is listed as an extension in "%3", but is actually associated to its class''s package "%4" (ie. not as extension). |
1558 |
<P>Maybe the method used to be an extension but is now a proper part of the class. |
|
1559 |
If this is the case, you should remove the method name from the extensions list (%3). |
|
1560 |
<P>Otherwise, the method may have lost its package information due to a recompilation in |
|
1561 |
a tool which did not known about the original package association. |
|
1562 |
Then, you should reassociate the method to the extending package.' |
|
3168 | 1563 |
] ifFalse:[ |
1564 |
text := |
|
4491 | 1565 |
'Method %1 is listed as an extension in "%3" but is actually associated to a different package: "%4". |
3650 | 1566 |
<P>The package will compile but may fail to (auto)load from sources. |
1567 |
<P>It is recommended to either remove the method name from the extensions list (%3) |
|
3166 | 1568 |
or move the method it to the correct package.' |
3168 | 1569 |
]. |
1570 |
^ text |
|
1571 |
bindWith: (self linkToClass: (Smalltalk classNamed: className) selector: selector) "className" |
|
1572 |
with: selector |
|
1573 |
with: (self linkToClass: self packageDefinitionClass class selector: #extensionMethodNames) |
|
1574 |
with: mthd package |
|
3166 | 1575 |
|
1576 |
"Modified: / 23-02-2012 / 15:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1577 |
! |
|
1578 |
||
1579 |
label |
|
1580 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1581 |
||
3168 | 1582 |
|mthd text| |
1583 |
||
4370 | 1584 |
text := 'Extension method %1 » %2 listed but in different package'. |
3168 | 1585 |
|
1586 |
(mthd := self method) notNil ifTrue:[ |
|
1587 |
mthd package = mthd mclass package ifTrue:[ |
|
4370 | 1588 |
text := 'Extension method %1 » %2 listed but in classes package' |
3168 | 1589 |
] |
1590 |
]. |
|
1591 |
^ text |
|
3166 | 1592 |
bindWith: className allBold |
1593 |
with: selector allBold |
|
1594 |
||
1595 |
"Modified: / 23-02-2012 / 14:22:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1596 |
! ! |
|
1597 |
||
1598 |
!ProjectProblem::ExtensionMethodListedButInDifferentPackage methodsFor:'fixes'! |
|
1599 |
||
3169 | 1600 |
alreadyFixed |
1601 |
|mthd| |
|
1602 |
||
1603 |
(self packageDefinitionClass extensionMethods includes:self method) ifFalse:[^ true]. |
|
1604 |
^ ((mthd := self method) notNil |
|
1605 |
and:[ mthd package = package ]) |
|
1606 |
! |
|
1607 |
||
3166 | 1608 |
doMoveMethodToProject |
1609 |
self method package:package |
|
3549 | 1610 |
! ! |
1611 |
||
1612 |
!ProjectProblem::ExtensionMethodListedButInDifferentPackage methodsFor:'fixing'! |
|
3166 | 1613 |
|
1614 |
fixes |
|
3790 | 1615 |
"return a list of description-actionBlock pairs for possible fixes" |
1616 |
||
3168 | 1617 |
|mthd| |
1618 |
||
1619 |
(mthd := self method) isNil ifTrue:[ ^ #() ]. |
|
3166 | 1620 |
|
3169 | 1621 |
"/ mthd package = mthd mclass package ifTrue:[ |
1622 |
"/ ^Array |
|
1623 |
"/ with: (Array with: 'Remove from the extensionMethodNames list' with: [ self doRemoveMethodFromExtensionsList ]) |
|
1624 |
"/ ]. |
|
1625 |
"/ |
|
3166 | 1626 |
^Array |
3169 | 1627 |
with: (Array with: 'Remove from the extensionMethodNames list' with: [ self doRemoveMethodFromExtensionsList ]) |
3809 | 1628 |
with: (Array with: ('Move method to package "%1"' bindWith:package) with: [ self doMoveMethodToProject ]) |
3166 | 1629 |
|
1630 |
"Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1631 |
! ! |
|
1632 |
||
3160 | 1633 |
!ProjectProblem::ExtensionMethodNotListed methodsFor:'accessing-description'! |
2798 | 1634 |
|
1635 |
description |
|
1636 |
"Return a (HTML) describing the problem." |
|
1637 |
||
3154 | 1638 |
^'Method %1 is not listed in %2. |
3143 | 1639 |
<br>It should either be listed in the project definition, or moved to the owning classes package' |
2798 | 1640 |
bindWith: (self linkToMethod) |
3169 | 1641 |
with: (self linkToClass: self packageDefinitionClass class selector: #extensionMethodNames) |
2798 | 1642 |
|
1643 |
"Modified: / 23-02-2012 / 14:34:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1644 |
! |
|
1645 |
||
1646 |
label |
|
1647 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1648 |
||
4370 | 1649 |
^'Extension method %1 » %2 not listed in project definition "%3"' bindWith: className allBold with: selector allBold with:self packageDefinitionClass |
2798 | 1650 |
|
1651 |
"Modified: / 23-02-2012 / 14:22:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1652 |
! ! |
|
1653 |
||
3143 | 1654 |
!ProjectProblem::ExtensionMethodNotListed methodsFor:'fixing'! |
1655 |
||
3169 | 1656 |
alreadyFixed |
1657 |
^ (self packageDefinitionClass extensionMethods includes:self method) |
|
1658 |
! |
|
1659 |
||
3143 | 1660 |
doMoveToClassesPackage |
3154 | 1661 |
"move the extension method to the owning classes package. |
3143 | 1662 |
Return false if fix fails, true otherwise" |
1663 |
||
1664 |
| cls mthd | |
|
1665 |
||
1666 |
cls := self klass. |
|
1667 |
cls isNil ifTrue:[ ^ false ]. |
|
1668 |
mthd := cls compiledMethodAt:selector. |
|
1669 |
mthd package:(cls package). |
|
3809 | 1670 |
|
3143 | 1671 |
UserNotification notify: ('Do not forget to check in the method''s package (or class) ("%1")!!' bindWith:cls package). |
1672 |
^true |
|
1673 |
! |
|
1674 |
||
1675 |
doUpdateExtensionMethodsInProject |
|
3154 | 1676 |
"update the extension method info in the project definition. |
3143 | 1677 |
Return false if fix fails, true otherwise" |
1678 |
||
3169 | 1679 |
| def mthd | |
3143 | 1680 |
|
1681 |
def := self packageDefinitionClass. |
|
1682 |
def isNil ifTrue:[ ^ false ]. |
|
3169 | 1683 |
mthd := self method. |
1684 |
mthd isNil ifTrue:[ ^ false ]. |
|
1685 |
||
1686 |
def includeMethods:(Array with:mthd) usingCompiler:nil. |
|
3143 | 1687 |
UserNotification notify: ('ProjectDefinition updated. Do not forget to check it in!!'). |
1688 |
^true |
|
1689 |
! |
|
1690 |
||
1691 |
fixes |
|
3790 | 1692 |
"return a list of description-actionBlock pairs for possible fixes" |
1693 |
||
3143 | 1694 |
^Array |
3809 | 1695 |
with: (Array |
1696 |
with: ('Add method to package ("%1")' bindWith:package) |
|
1697 |
with: [ self doUpdateExtensionMethodsInProject ] ) |
|
1698 |
with: (Array |
|
1699 |
with: ('Move method to classes package ("%1")' bindWith:self klass package) |
|
1700 |
with: [ self doMoveToClassesPackage ] ) |
|
1701 |
with: (Array |
|
1702 |
with: ('Full update of the package definition (rescan) of "%1"' bindWith:self klass package) |
|
1703 |
with: [ self doUpdateAllProjectDefinitions ] ) |
|
3143 | 1704 |
! ! |
1705 |
||
3166 | 1706 |
!ProjectProblem::ExtensionMethodsClassDoesNotExist methodsFor:'accessing-description'! |
1707 |
||
1708 |
description |
|
1709 |
"Return a (HTML) describing the problem." |
|
1710 |
||
1711 |
^'Method %1 >> %2 listed in %3 but class does not exist. |
|
1712 |
The package will compile but may fail to (auto)load from sources. |
|
1713 |
||
1714 |
It is recommended to remove the method from the list (%3).' |
|
1715 |
bindWith: className |
|
1716 |
with: selector |
|
1717 |
with: (self linkToClass: self packageDefinitionClass class selector: #extensionMethodNames) |
|
1718 |
! |
|
1719 |
||
1720 |
label |
|
1721 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1722 |
||
4370 | 1723 |
^'Extension method %1 » %2 listed but class not existing' |
3166 | 1724 |
bindWith: className allBold |
1725 |
with: selector allBold |
|
1726 |
||
1727 |
"Modified: / 23-02-2012 / 14:22:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1728 |
! ! |
|
1729 |
||
3549 | 1730 |
!ProjectProblem::ExtensionMethodsClassDoesNotExist methodsFor:'fixing'! |
3204 | 1731 |
|
1732 |
fixes |
|
3790 | 1733 |
"return a list of description-actionBlock pairs for possible fixes" |
1734 |
||
3204 | 1735 |
^Array |
1736 |
with: (Array with: 'Remove from the extensionMethodNames list' with: [ self doRemoveNamedMethodFromExtensionsList ]) |
|
1737 |
||
1738 |
"Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1739 |
! ! |
|
1740 |
||
3449 | 1741 |
!ProjectProblem::ClassIsCompiledButSuperclassProjectDefinitionIsMissing methodsFor:'accessing'! |
3160 | 1742 |
|
1743 |
description |
|
1744 |
"Return a (HTML) describing the problem." |
|
1745 |
||
1746 |
^ |
|
3779 | 1747 |
'Class %1 is compiled (i.e. not autoloaded) but its superclass''s project |
1748 |
definition class is missing. |
|
1749 |
<BR>(superclass %2 has no project definition for "%3"). |
|
1750 |
<P> |
|
1751 |
Such class won''t compile with STC because the superclass''s package |
|
1752 |
will likely be missing.' |
|
3449 | 1753 |
bindWith: (self linkToClass: className) |
1754 |
with: (self linkToClass: (Smalltalk at: className) superclass name) |
|
3779 | 1755 |
with: (self linkToPackage: (Smalltalk at: className) superclass package) |
3160 | 1756 |
|
3449 | 1757 |
"Modified: / 05-10-2013 / 12:43:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3160 | 1758 |
! |
1759 |
||
3779 | 1760 |
fixes |
3790 | 1761 |
"return a list of description-actionBlock pairs for possible fixes" |
1762 |
||
3779 | 1763 |
|fixes superClass superPackage| |
1764 |
||
1765 |
fixes := super fixes asNewOrderedCollection. |
|
1766 |
||
1767 |
superClass := (Smalltalk at: className) superclass. |
|
1768 |
superPackage := superClass package. |
|
1769 |
||
1770 |
fixes add: |
|
1771 |
{ 'Create project definition class for project "',superPackage,'"' . |
|
3809 | 1772 |
[ self createPackageDefinitionForSuperclass ] |
1773 |
}. |
|
3779 | 1774 |
|
1775 |
^ fixes |
|
1776 |
! |
|
1777 |
||
3160 | 1778 |
label |
1779 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1780 |
||
3449 | 1781 |
^ 'Class ', className , ' is compiled but its superclass''s package definition is missing' |
3160 | 1782 |
|
3449 | 1783 |
"Modified: / 05-10-2013 / 12:41:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3160 | 1784 |
! ! |
1785 |
||
3779 | 1786 |
!ProjectProblem::ClassIsCompiledButSuperclassProjectDefinitionIsMissing methodsFor:'fixing'! |
1787 |
||
1788 |
createPackageDefinitionForSuperclass |
|
1789 |
"crate super class's project definition. |
|
1790 |
Return false if fix fails, true otherwise" |
|
1791 |
||
1792 |
| superclass superclassDef| |
|
1793 |
||
1794 |
superclass := (Smalltalk at: className) superclass. |
|
1795 |
superclassDef := ProjectDefinition definitionClassForPackage:superclass package createIfAbsent:true. |
|
1796 |
superclassDef isNil ifTrue:[^ false]. |
|
1797 |
^true |
|
1798 |
! ! |
|
1799 |
||
4077 | 1800 |
!ProjectProblem::InvalidPackageName methodsFor:'accessing'! |
1801 |
||
1802 |
badName:something |
|
1803 |
badName := something. |
|
1804 |
! |
|
1805 |
||
1806 |
severity |
|
1807 |
"Return a severity - one of #error, #warning, #info" |
|
1808 |
||
1809 |
^#error |
|
1810 |
! ! |
|
1811 |
||
1812 |
!ProjectProblem::InvalidPackageName methodsFor:'accessing-description'! |
|
1813 |
||
1814 |
description |
|
1815 |
"Return a (HTML) describing the problem." |
|
1816 |
||
1817 |
^ |
|
1818 |
'The package name "%1" is invalid. |
|
1819 |
Names must be of the form "module:subpackage/..." or "module". |
|
1820 |
<P> |
|
1821 |
You <b>must</b> change this to a valid name, otherwise package management won''t work, |
|
1822 |
and the package cannot be compiled to a binary dll.' |
|
1823 |
bindWith: (badName ? package) |
|
1824 |
! |
|
1825 |
||
1826 |
label |
|
1827 |
^'Invalid package name: "%1"' bindWith: (badName ? package) |
|
1828 |
! ! |
|
1829 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
1830 |
!ProjectProblem::MethodCompilabilityIssue1 methodsFor:'accessing'! |
2854 | 1831 |
|
3160 | 1832 |
severity |
1833 |
^ errors notNil ifTrue:[#error] ifFalse:[#warning] |
|
1834 |
||
1835 |
"Modified: / 11-04-2012 / 15:40:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1836 |
! ! |
|
1837 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
1838 |
!ProjectProblem::MethodCompilabilityIssue1 methodsFor:'accessing-description'! |
3160 | 1839 |
|
2854 | 1840 |
description |
1841 |
"Return a (HTML) describing the problem." |
|
1842 |
||
1843 |
| issuePrinter | |
|
1844 |
||
3488 | 1845 |
issuePrinter := |
1846 |
[:stream :issue| |
|
1847 |
stream nextPutAll:'<li>'. |
|
1848 |
issue descriptionOn: stream. |
|
1849 |
stream nextPutAll:'</li>'. |
|
1850 |
stream cr. |
|
1851 |
]. |
|
2854 | 1852 |
|
1853 |
^ String streamContents:[:s| |
|
3488 | 1854 |
s |
1855 |
nextPutAll: 'The following problems have been found in '; |
|
1856 |
nextPutAll: self linkToMethod; |
|
1857 |
nextPutAll: ':'; cr; |
|
1858 |
nextPutAll: '<ul>'. |
|
1859 |
errors ? #() do:[:issue|issuePrinter value: s value: issue]. |
|
1860 |
warnings ? #() do:[:issue|issuePrinter value: s value: issue]. |
|
1861 |
s |
|
1862 |
nextPutAll: '</ul>'. |
|
2854 | 1863 |
|
3488 | 1864 |
errors notNil ifTrue:[ |
1865 |
s nextPutAll: |
|
3147 | 1866 |
'STC won''t compile such code, therefore you must fix it before committing' |
3488 | 1867 |
]. |
2854 | 1868 |
] |
1869 |
||
1870 |
"Modified: / 11-04-2012 / 15:51:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1871 |
! |
|
1872 |
||
1873 |
label |
|
1874 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
1875 |
||
3160 | 1876 |
^ (errors notNil |
4370 | 1877 |
ifTrue:[ 'Uncompilable method %1 » %2' ] |
1878 |
ifFalse:[ 'Warnings for method %1 » %2' ]) bindWith: className allBold with: selector allBold |
|
3160 | 1879 |
|
2854 | 1880 |
|
1881 |
"Modified: / 11-04-2012 / 16:04:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1882 |
! ! |
|
1883 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
1884 |
!ProjectProblem::MethodCompilabilityIssue1 methodsFor:'error handling'! |
2854 | 1885 |
|
3162 | 1886 |
addError:aMessage from: position to: endPos |
1887 |
errors isNil ifTrue:[ errors := OrderedCollection new]. |
|
1888 |
errors add: (Error message: aMessage from: position to: endPos) |
|
1889 |
! |
|
1890 |
||
1891 |
addWarning:aMessage from: position to: endPos |
|
1892 |
warnings isNil ifTrue:[ warnings := OrderedCollection new]. |
|
1893 |
warnings add: (Warning message: aMessage from: position to: endPos) |
|
1894 |
! |
|
1895 |
||
2854 | 1896 |
correctableError:aMessage position:position to:endPos from:aCompiler |
1897 |
"error notification during fileIn. |
|
1898 |
This is sent by the compiler/evaluator if it detects errors." |
|
1899 |
||
1900 |
self error:aMessage position:position to:endPos from:aCompiler. |
|
1901 |
^ false. "/ no correction |
|
1902 |
||
1903 |
"Created: / 30-07-1999 / 18:11:15 / cg" |
|
1904 |
"Modified: / 02-11-2010 / 12:58:54 / cg" |
|
1905 |
! |
|
1906 |
||
1907 |
correctableSelectorWarning:aMessage position:position to:endPos from:aCompiler |
|
1908 |
"warning notification during fileIn. |
|
1909 |
This is sent by the compiler/evaluator if it detects errors." |
|
1910 |
||
1911 |
self warning:aMessage position:position to:endPos from:aCompiler. |
|
1912 |
^ false. "/ no correction |
|
1913 |
||
1914 |
"Modified: / 02-11-2010 / 12:59:04 / cg" |
|
1915 |
! |
|
1916 |
||
1917 |
correctableWarning:aMessage position:position to:endPos from:aCompiler |
|
1918 |
"error notification during fileIn. |
|
1919 |
This is sent by the compiler/evaluator if it detects errors." |
|
1920 |
||
1921 |
self warning:aMessage position:position to:endPos from:aCompiler. |
|
1922 |
^ false |
|
1923 |
||
1924 |
"Created: / 02-11-2010 / 13:29:40 / cg" |
|
1925 |
! |
|
1926 |
||
1927 |
error:aMessage position:position to:endPos from:aCompiler |
|
1928 |
"error notification during fileIn. |
|
1929 |
This is sent by the compiler/evaluator if it detects errors." |
|
1930 |
||
4215 | 1931 |
"Argh!!!!!!!! If it's an ignorable error, why signal error!!!!!! Bad design, |
2911 | 1932 |
even worse workaround. Sigh." |
3162 | 1933 |
(thisContext findNextContextWithSelector:#ignorableParseError: or:nil or:nil) notNil |
1934 |
"/ thisContext sender sender sender sender selector == #ignorableParseError: |
|
1935 |
ifTrue:[ ^ self ]. |
|
2911 | 1936 |
|
3162 | 1937 |
self addError:aMessage from: position to: endPos |
2854 | 1938 |
|
1939 |
"Created: / 30-07-1999 / 18:10:30 / cg" |
|
2911 | 1940 |
"Modified: / 10-09-2012 / 11:32:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
4215 | 1941 |
"Modified (comment): / 13-02-2017 / 20:29:27 / cg" |
2854 | 1942 |
! |
1943 |
||
1944 |
unusedVariableWarning:aMessage position:position to:endPos from:aCompiler |
|
1945 |
"warning notification during fileIn. |
|
1946 |
This is sent by the compiler/evaluator if it detects errors." |
|
1947 |
||
1948 |
^ self warning:aMessage position:position to:endPos from:aCompiler |
|
1949 |
! |
|
1950 |
||
1951 |
warning:aMessage position:position to:endPos from:aCompiler |
|
1952 |
"warning notification during fileIn - ignore it. |
|
1953 |
This is sent by the compiler/evaluator if it detects errors." |
|
1954 |
||
2911 | 1955 |
"/ No, do not show warnings now, too many false positives |
2854 | 1956 |
"/ warnings isNil ifTrue:[ warnings := OrderedCollection new]. |
1957 |
"/ warnings add: (Warning message: aMessage from: position to: endPos). |
|
1958 |
||
1959 |
"Created: / 30-07-1999 / 18:11:05 / cg" |
|
1960 |
"Modified (comment): / 12-04-2012 / 18:19:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1961 |
! ! |
|
1962 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
1963 |
!ProjectProblem::MethodCompilabilityIssue1 methodsFor:'queries'! |
2854 | 1964 |
|
1965 |
hasIssue |
|
1966 |
^ (errors ? warnings) notNil |
|
1967 |
||
1968 |
"Created: / 11-04-2012 / 15:43:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1969 |
! ! |
|
1970 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
1971 |
!ProjectProblem::MethodCompilabilityIssue1::Error class methodsFor:'instance creation'! |
2854 | 1972 |
|
1973 |
message: message from: startPosition to: endPosition |
|
1974 |
||
1975 |
^self new |
|
3779 | 1976 |
message: message; |
1977 |
startPosition: startPosition; |
|
1978 |
endPosition: endPosition; |
|
1979 |
yourself. |
|
2854 | 1980 |
|
1981 |
"Created: / 11-04-2012 / 15:38:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1982 |
! ! |
|
1983 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
1984 |
!ProjectProblem::MethodCompilabilityIssue1::Error methodsFor:'accessing'! |
2854 | 1985 |
|
1986 |
endPosition |
|
1987 |
^ endPosition |
|
1988 |
! |
|
1989 |
||
1990 |
endPosition:something |
|
1991 |
endPosition := something. |
|
1992 |
! |
|
1993 |
||
1994 |
message |
|
1995 |
^ message |
|
1996 |
! |
|
1997 |
||
1998 |
message:something |
|
1999 |
message := something. |
|
2000 |
! |
|
2001 |
||
2002 |
startPosition |
|
2003 |
^ startPosition |
|
2004 |
! |
|
2005 |
||
2006 |
startPosition:something |
|
2007 |
startPosition := something. |
|
2008 |
! ! |
|
2009 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2010 |
!ProjectProblem::MethodCompilabilityIssue1::Error methodsFor:'accessing-description'! |
3160 | 2011 |
|
2012 |
descriptionOn: stream |
|
2013 |
||
2014 |
stream nextPutAll: message; space; nextPutAll:'(error)' |
|
2015 |
||
2016 |
"Created: / 11-04-2012 / 15:52:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2017 |
! ! |
|
2018 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2019 |
!ProjectProblem::MethodCompilabilityIssue1::Warning class methodsFor:'instance creation'! |
2854 | 2020 |
|
2021 |
message: message from: startPosition to: endPosition |
|
2022 |
||
2023 |
^self new |
|
3779 | 2024 |
message: message; |
2025 |
startPosition: startPosition; |
|
2026 |
endPosition: endPosition; |
|
2027 |
yourself. |
|
2854 | 2028 |
|
2029 |
"Created: / 11-04-2012 / 15:38:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2030 |
! ! |
|
2031 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2032 |
!ProjectProblem::MethodCompilabilityIssue1::Warning methodsFor:'accessing'! |
2854 | 2033 |
|
2034 |
endPosition |
|
2035 |
^ endPosition |
|
2036 |
! |
|
2037 |
||
2038 |
endPosition:something |
|
2039 |
endPosition := something. |
|
2040 |
! |
|
2041 |
||
2042 |
message |
|
2043 |
^ message |
|
2044 |
! |
|
2045 |
||
2046 |
message:something |
|
2047 |
message := something. |
|
2048 |
! |
|
2049 |
||
2050 |
startPosition |
|
2051 |
^ startPosition |
|
2052 |
! |
|
2053 |
||
2054 |
startPosition:something |
|
2055 |
startPosition := something. |
|
2056 |
! ! |
|
2057 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2058 |
!ProjectProblem::MethodCompilabilityIssue1::Warning methodsFor:'accessing-description'! |
2798 | 2059 |
|
3160 | 2060 |
descriptionOn: stream |
2798 | 2061 |
|
3160 | 2062 |
stream nextPutAll: message; space"/; nextPutAll:'(warning)' |
2798 | 2063 |
|
3160 | 2064 |
"Created: / 11-04-2012 / 15:52:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2065 |
! ! |
|
2066 |
||
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2067 |
!ProjectProblem::MethodCompilabilityIssue2 methodsFor:'accessing'! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2068 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2069 |
severity |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2070 |
| severities | |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2071 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2072 |
severities := rules collect:[ :rule | rule severity ]. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2073 |
(severities includes: #error) ifTrue:[ ^ #error ]. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2074 |
^ #warning |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2075 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2076 |
"Modified: / 29-05-2014 / 15:41:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2077 |
! ! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2078 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2079 |
!ProjectProblem::MethodCompilabilityIssue2 methodsFor:'accessing-description'! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2080 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2081 |
description |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2082 |
"Return a (HTML) describing the problem." |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2083 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2084 |
| issuePrinter | |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2085 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2086 |
issuePrinter := |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2087 |
[:stream :rule| |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2088 |
stream nextPutAll:'<li>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2089 |
stream nextPutAll: rule name. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2090 |
stream nextPutAll: '<br></br>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2091 |
stream nextPutAll:'<p>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2092 |
stream nextPutAll: rule rationale. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2093 |
stream nextPutAll:'</p>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2094 |
stream nextPutAll:'</li>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2095 |
stream cr. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2096 |
]. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2097 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2098 |
^ String streamContents:[:s| |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2099 |
s |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2100 |
nextPutAll: 'The following problems have been found in '; |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2101 |
nextPutAll: self linkToMethod; |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2102 |
nextPutAll: ':'; cr; |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2103 |
nextPutAll: '<ul>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2104 |
rules ? #() do:[:rule|issuePrinter value: s value: rule]. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2105 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2106 |
s |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2107 |
nextPutAll: '</ul>'. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2108 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2109 |
errors notNil ifTrue:[ |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2110 |
s nextPutAll: |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2111 |
'STC won''t compile such code, therefore you must fix it before committing' |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2112 |
]. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2113 |
] |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2114 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2115 |
"Modified: / 29-05-2014 / 16:26:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2116 |
! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2117 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2118 |
label |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2119 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2120 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2121 |
^ ((self severity == #error) |
4370 | 2122 |
ifTrue:[ 'Uncompilable method %1 » %2' ] |
2123 |
ifFalse:[ 'Warnings for method %1 » %2' ]) bindWith: className allBold with: selector allBold |
|
3562
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2124 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2125 |
"Modified: / 29-05-2014 / 15:39:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2126 |
! ! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2127 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2128 |
!ProjectProblem::MethodCompilabilityIssue2 methodsFor:'adding & removing'! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2129 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2130 |
addViolation: anRBLintRule |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2131 |
rules isNil ifTrue:[ rules := OrderedCollection new ]. |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2132 |
rules add: anRBLintRule |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2133 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2134 |
"Created: / 29-05-2014 / 15:42:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2135 |
! ! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2136 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2137 |
!ProjectProblem::MethodCompilabilityIssue2 methodsFor:'queries'! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2138 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2139 |
hasIssue |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2140 |
^ rules notEmptyOrNil |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2141 |
|
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2142 |
"Created: / 11-04-2012 / 15:43:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2143 |
"Modified: / 29-05-2014 / 15:41:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2144 |
! ! |
a16bc9e17d35
Added lint-based check for stc bugs to ProjectChecker (#checkMethodSTCCompilability2:)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3550
diff
changeset
|
2145 |
|
3160 | 2146 |
!ProjectProblem::MethodInNoPackage methodsFor:'accessing-description'! |
2147 |
||
3217 | 2148 |
alreadyFixed |
3449 | 2149 |
| m | |
2150 |
||
2151 |
"/ One may "fix" the problem by actually removing the method. |
|
3790 | 2152 |
"/ In this case, also consider problem as "fixed". |
3933 | 2153 |
m := self method. |
2154 |
^ m isNil or:[m package ~= PackageId noProjectID] |
|
3449 | 2155 |
|
2156 |
"Modified (format): / 19-12-2013 / 15:38:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3217 | 2157 |
! |
2158 |
||
3160 | 2159 |
description |
2160 |
"Return a (HTML) describing the problem." |
|
2161 |
||
2162 |
^ |
|
2163 |
'Method %1 does not belong to any package. Such methods |
|
2164 |
are not committed and will be lost when you restart/recompile. |
|
3342 | 2165 |
Especially, it will not be included when you generate a compiled class library. |
2166 |
However, it will be kept in the changes file, so it is not completely lost. |
|
2167 |
The method should be moved to some package, %2 maybe?' |
|
3160 | 2168 |
bindWith: (self linkToMethod) |
3342 | 2169 |
with: package |
3160 | 2170 |
|
2171 |
"Modified: / 23-02-2012 / 14:21:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2854 | 2172 |
! |
2173 |
||
2798 | 2174 |
label |
2175 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
2176 |
||
4370 | 2177 |
^'Unpackaged method %1 » %2' bindWith: className allBold with: selector allBold |
2798 | 2178 |
|
2179 |
"Modified: / 23-02-2012 / 14:19:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2180 |
! ! |
|
2181 |
||
3549 | 2182 |
!ProjectProblem::MethodInNoPackage methodsFor:'fixing'! |
2183 |
||
3932 | 2184 |
doMoveAllListedMethodsToClassPackage |
2185 |
"move all listed methods to their corresponding classes package. |
|
2186 |
Return false if fix fails, true otherwise" |
|
2187 |
||
2188 |
| mth cls any | |
|
2189 |
||
2190 |
any := false. |
|
2191 |
self allUnfixedProblemsOfMyKindDo:[:p | |
|
2192 |
cls := p klass. |
|
2193 |
cls notNil ifTrue:[ |
|
2194 |
mth := p method. |
|
2195 |
mth notNil ifTrue:[ |
|
2196 |
cls package ~= PackageId noProjectID ifTrue:[ |
|
2197 |
mth package:(cls package). |
|
2198 |
any := true. |
|
2199 |
] |
|
2200 |
] |
|
2201 |
] |
|
2202 |
]. |
|
2203 |
^ any |
|
2204 |
! |
|
2205 |
||
3549 | 2206 |
doMoveAllListedMethodsToPackage |
2207 |
"move all listed methods to the package. |
|
2208 |
Return false if fix fails, true otherwise" |
|
2209 |
||
2210 |
| m any | |
|
2211 |
||
2212 |
any := false. |
|
2213 |
self allUnfixedProblemsOfMyKindDo:[:p | |
|
2214 |
m := p method. |
|
2215 |
m notNil ifTrue:[ |
|
2216 |
m package: package. |
|
2217 |
any := true. |
|
2218 |
] |
|
2219 |
]. |
|
2220 |
^ any |
|
2221 |
! |
|
2222 |
||
2223 |
doMoveMethodToPackage |
|
2224 |
"move the method to the package. |
|
2225 |
Return false if fix fails, true otherwise" |
|
2226 |
||
2227 |
| m | |
|
2228 |
||
2229 |
m := self method. |
|
2230 |
m notNil ifTrue:[ |
|
2231 |
m package: package. |
|
2232 |
^ true |
|
2233 |
] ifFalse:[ |
|
2234 |
^ false |
|
2235 |
] |
|
2236 |
! |
|
2237 |
||
4270 | 2238 |
doMoveThisClassesMethodsToClassPackage |
2239 |
"move listed methods of this class to the class package. |
|
2240 |
Return false if fix fails, true otherwise" |
|
2241 |
||
2242 |
|cls mth any | |
|
2243 |
||
2244 |
any := false. |
|
2245 |
cls := self method mclass theNonMetaclass. |
|
2246 |
self allUnfixedProblemsOfMyKindDo:[:p | |
|
2247 |
mth := p method. |
|
2248 |
mth notNil ifTrue:[ |
|
2249 |
mth mclass theNonMetaclass == cls ifTrue:[ |
|
2250 |
mth package: package. |
|
2251 |
any := true. |
|
2252 |
] |
|
2253 |
] |
|
2254 |
]. |
|
2255 |
^ any |
|
2256 |
||
2257 |
"Created: / 30-11-2017 / 23:36:04 / cg" |
|
2258 |
! |
|
2259 |
||
3549 | 2260 |
fixes |
3790 | 2261 |
"return a list of description-actionBlock pairs for possible fixes" |
2262 |
||
4270 | 2263 |
|ops myMethodsClass problemsOfThisKind| |
3932 | 2264 |
|
2265 |
ops := OrderedCollection new. |
|
2266 |
||
2267 |
ops add:{ |
|
3809 | 2268 |
('Move method to package "%1"' bindWith:package) . |
3549 | 2269 |
[ self doMoveMethodToPackage ] |
2270 |
}. |
|
4270 | 2271 |
|
2272 |
myMethodsClass := self klass. |
|
3932 | 2273 |
|
4270 | 2274 |
problemsOfThisKind := allProblems select:[:p | p class == self class]. |
2275 |
problemsOfThisKind size > 0 ifTrue:[ |
|
4299 | 2276 |
(allProblems count:[:p | p klass notNil and:[p klass theNonMetaclass = myMethodsClass theNonMetaclass]]) > 1 ifTrue:[ |
3941 | 2277 |
ops add:{ |
4270 | 2278 |
('Move unpackaged methods of <b>%1</b> to the class''s package "%2"' bindWith:myMethodsClass name with:myMethodsClass package). |
2279 |
[ self doMoveThisClassesMethodsToClassPackage ] |
|
2280 |
}. |
|
2281 |
]. |
|
2282 |
(problemsOfThisKind conform:[:p | p klass isNil or:[p klass package = p method package]]) ifFalse:[ |
|
2283 |
ops add:{ |
|
2284 |
('Move all listed unpackaged methods to their owning classes'' package') . |
|
3941 | 2285 |
[ self doMoveAllListedMethodsToClassPackage ] |
2286 |
}. |
|
4270 | 2287 |
]. |
2288 |
ops add:{ |
|
2289 |
('Move all listed unpackaged methods to package "%1"' bindWith:package) . |
|
2290 |
[ self doMoveAllListedMethodsToPackage ] |
|
2291 |
}. |
|
3549 | 2292 |
]. |
3932 | 2293 |
^ ops |
3549 | 2294 |
|
2295 |
"Created: / 26-07-2012 / 09:53:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
4270 | 2296 |
"Modified: / 01-12-2017 / 00:23:55 / cg" |
3549 | 2297 |
! ! |
2298 |
||
3790 | 2299 |
!ProjectProblem::MethodListedInOtherPackage methodsFor:'accessing'! |
2300 |
||
2301 |
otherProjectDefinitionClasses |
|
2302 |
^ otherProjectDefinitionClasses |
|
2303 |
! |
|
2304 |
||
2305 |
otherProjectDefinitionClasses:aCollectionOfClasses |
|
2306 |
otherProjectDefinitionClasses := aCollectionOfClasses. |
|
2307 |
! ! |
|
2308 |
||
2309 |
!ProjectProblem::MethodListedInOtherPackage methodsFor:'accessing-description'! |
|
2310 |
||
2311 |
alreadyFixed |
|
2312 |
| m | |
|
2313 |
||
2314 |
"/ One may "fix" the problem by actually removing the method. |
|
2315 |
"/ In this case, also consider problem as "fixed". |
|
2316 |
m := self method. |
|
2317 |
^ m isNil |
|
2318 |
or:[otherProjectDefinitionClasses isEmptyOrNil |
|
3809 | 2319 |
or:[(otherProjectDefinitionClasses contains:[:cls | cls extensionMethods includes:m]) not]] |
3790 | 2320 |
! |
2321 |
||
2322 |
description |
|
2323 |
"Return a (HTML) describing the problem." |
|
2324 |
||
2325 |
^ |
|
2326 |
'Method "%1" is also listed in "%2". |
|
2327 |
The method may only be present in exactly one package, "%3" perhaps?' |
|
2328 |
bindWith: (self linkToMethod) |
|
2329 |
with: (otherProjectDefinitionClasses size == 1 |
|
2330 |
ifTrue:[ self linkToPackage: (otherProjectDefinitionClasses first package) ] |
|
2331 |
ifFalse:[ '%1 other packages' bindWith:otherProjectDefinitionClasses size ]) |
|
2332 |
with: (self linkToPackage:package) |
|
2333 |
! |
|
2334 |
||
2335 |
label |
|
2336 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
2337 |
||
4370 | 2338 |
^'Method %1 » %2 also present in other pacakge(s)' bindWith: className allBold with: selector allBold |
3790 | 2339 |
! ! |
2340 |
||
2341 |
!ProjectProblem::MethodListedInOtherPackage methodsFor:'fixing'! |
|
2342 |
||
2343 |
doRemoveMethodFromOtherPackages |
|
2344 |
"remove the method to the other package(s). |
|
2345 |
Return false if fix fails, true otherwise" |
|
2346 |
||
2347 |
| m | |
|
2348 |
||
2349 |
m := self method. |
|
2350 |
m isNil ifTrue:[^ false]. |
|
2351 |
||
2352 |
m package: package. |
|
2353 |
otherProjectDefinitionClasses do:[:each | |
|
2354 |
each excludeMethods:(Array with:m) usingCompiler:nil. |
|
2355 |
]. |
|
2356 |
UserNotification notify: ('Other ProjectDefinition updated. Do not forget to check that one in also!!'). |
|
2357 |
^ true. |
|
2358 |
! |
|
2359 |
||
2360 |
fixes |
|
2361 |
"return a list of description-actionBlock pairs for possible fixes" |
|
2362 |
||
2363 |
|removeThisFromOtherPackages| |
|
2364 |
||
2365 |
removeThisFromOtherPackages := |
|
2366 |
{ |
|
2367 |
('Remove method from other package(s)') . |
|
2368 |
[ self doRemoveMethodFromOtherPackages ] |
|
2369 |
}. |
|
2370 |
||
2371 |
^ { |
|
2372 |
removeThisFromOtherPackages |
|
2373 |
} |
|
2374 |
! ! |
|
2375 |
||
3160 | 2376 |
!ProjectProblem::ExtensionMethodListedButDoesNotExist methodsFor:'accessing-description'! |
2798 | 2377 |
|
2378 |
description |
|
2379 |
"Return a (HTML) describing the problem." |
|
2380 |
||
3166 | 2381 |
^'Method %1 listed in %3 but does not exist. |
2382 |
The package will compile but may fail to (auto)load from sources. |
|
2798 | 2383 |
|
3166 | 2384 |
It is recommended to remove the method from the list (%3).' |
2385 |
bindWith: (self linkToClass: (Smalltalk classNamed: className) selector: selector) "className" |
|
2386 |
with: selector |
|
2387 |
with: (self linkToClass: self packageDefinitionClass class selector: #extensionMethodNames) |
|
2798 | 2388 |
|
2389 |
"Modified: / 23-02-2012 / 15:18:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2390 |
! |
|
2391 |
||
2392 |
label |
|
2393 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
2394 |
||
4370 | 2395 |
^'Extension method %1 » %2 listed but not existing' bindWith: className allBold with: selector allBold |
2798 | 2396 |
|
2397 |
"Modified: / 23-02-2012 / 14:22:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2398 |
! ! |
|
2399 |
||
3549 | 2400 |
!ProjectProblem::ExtensionMethodListedButDoesNotExist methodsFor:'fixing'! |
3204 | 2401 |
|
2402 |
fixes |
|
3790 | 2403 |
"return a list of description-actionBlock pairs for possible fixes" |
2404 |
||
2405 |
^ { |
|
2406 |
{ |
|
2407 |
'Remove from the extensionMethodNames list' . |
|
2408 |
[ self doRemoveNamedMethodFromExtensionsList ] |
|
2409 |
} |
|
2410 |
} |
|
3204 | 2411 |
|
2412 |
"Created: / 26-07-2012 / 10:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2413 |
! ! |
|
2414 |
||
2854 | 2415 |
!ProjectProblem::MethodSourceCorrupted methodsFor:'accessing'! |
2416 |
||
3160 | 2417 |
severity |
2418 |
"Return a severity - one of #error, #warning, #info" |
|
2419 |
||
2420 |
^#error |
|
2421 |
||
2422 |
"Created: / 11-04-2012 / 12:47:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2423 |
! ! |
|
2424 |
||
2425 |
!ProjectProblem::MethodSourceCorrupted methodsFor:'accessing-description'! |
|
2426 |
||
2854 | 2427 |
description |
2428 |
"Return a (HTML) describing the problem." |
|
2429 |
||
2430 |
^ |
|
2431 |
'Source code for %1 is <b>corrupted</b>. This is likely because |
|
2432 |
the binary class version does not match the source file. This may happen, |
|
3488 | 2433 |
for instance, if you compile a class library and then edit the ".st" file, |
2434 |
or you have checked out from the SCM into the file system over the existing source code, |
|
2435 |
from which the class was compiled. |
|
2436 |
<P>Be very careful with checkin or fileOut (do NOT save over any existing file), |
|
2437 |
and check the results for currupt source code, |
|
2438 |
<P>Sometimes, you can fix this by disabling the "Use Local Source" in the SCM manager''s settings |
|
2439 |
dialog. If that does not help, it is recommended to leave ST/X, restore the old source or compile a system |
|
2440 |
based on the current source, restart ST/X, reapply the changes via the Changebrowser and commit then.' |
|
2911 | 2441 |
bindWith: (self linkToMethod) |
3488 | 2442 |
with: package |
2854 | 2443 |
|
2444 |
"Modified: / 11-04-2012 / 12:47:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2445 |
! |
|
2446 |
||
2447 |
label |
|
2448 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
2449 |
||
4370 | 2450 |
^ 'Corrupted source code for %1 » %2' bindWith: className allBold with: selector allBold |
2854 | 2451 |
|
2452 |
"Modified: / 11-04-2012 / 12:42:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3160 | 2453 |
! ! |
2454 |
||
2455 |
!ProjectProblem::MethodSourceNotAvailable methodsFor:'accessing'! |
|
2854 | 2456 |
|
2457 |
severity |
|
2458 |
"Return a severity - one of #error, #warning, #info" |
|
2459 |
||
2460 |
^#error |
|
2461 |
||
3160 | 2462 |
"Created: / 11-04-2012 / 12:47:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2854 | 2463 |
! ! |
2464 |
||
3160 | 2465 |
!ProjectProblem::MethodSourceNotAvailable methodsFor:'accessing-description'! |
2854 | 2466 |
|
2467 |
description |
|
2468 |
"Return a (HTML) describing the problem." |
|
2469 |
||
2470 |
^ |
|
3147 | 2471 |
'Source code for %1 is not available. Check your package path |
2854 | 2472 |
and/or source code management settings. |
2473 |
' |
|
2911 | 2474 |
bindWith: (self linkToMethod) |
3779 | 2475 |
with: package |
2854 | 2476 |
|
2477 |
"Modified: / 11-04-2012 / 12:44:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2478 |
! |
|
2479 |
||
2480 |
label |
|
2481 |
"Return the label (possibly instance if a Text) shortly describing the problem" |
|
2482 |
||
4370 | 2483 |
^ 'Unavailable source code for %1 » %2' bindWith: className allBold with: selector allBold |
2854 | 2484 |
|
2485 |
"Modified: / 11-04-2012 / 12:41:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3160 | 2486 |
! ! |
2487 |
||
2488 |
!ProjectProblem::ProjectDefinitionDoesNotExist methodsFor:'accessing'! |
|
2854 | 2489 |
|
4077 | 2490 |
missing:arg |
2491 |
missing := arg |
|
2492 |
! |
|
2493 |
||
2854 | 2494 |
severity |
2495 |
"Return a severity - one of #error, #warning, #info" |
|
2496 |
||
2497 |
^#error |
|
2498 |
||
3160 | 2499 |
"Created: / 11-04-2012 / 12:48:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2854 | 2500 |
! ! |
2501 |
||
3160 | 2502 |
!ProjectProblem::ProjectDefinitionDoesNotExist methodsFor:'accessing-description'! |
2798 | 2503 |
|
2504 |
description |
|
2505 |
"Return a (HTML) describing the problem." |
|
2506 |
||
4077 | 2507 |
(missing ? package) = 'stx' ifTrue:[ |
3198 | 2508 |
^ |
3154 | 2509 |
'Move your code to another package. |
3198 | 2510 |
<br>The package name "stx" is reserveed for exept''s ST/X development.' |
3152 | 2511 |
]. |
2512 |
||
2798 | 2513 |
^ |
3152 | 2514 |
'A project definition class for package "%1" does not exist. |
2515 |
<br>Project definition classes keep the meta information of a package, |
|
2516 |
such as contents and build parameters. |
|
3198 | 2517 |
You <b>must</b> create it, otherwise package management won''t work, |
2518 |
and the package cannot be compiled to a binary dll.' |
|
4077 | 2519 |
bindWith: (missing ? package) |
2798 | 2520 |
|
2521 |
"Modified: / 23-02-2012 / 13:29:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2522 |
! |
|
2523 |
||
2524 |
label |
|
4077 | 2525 |
^'Project definition class for "%1" does not exist' bindWith: (missing ? package) |
2798 | 2526 |
|
2527 |
"Modified: / 23-02-2012 / 13:21:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2528 |
! ! |
|
2529 |
||
3152 | 2530 |
!ProjectProblem::ProjectDefinitionDoesNotExist methodsFor:'fixing'! |
2531 |
||
3225 | 2532 |
alreadyFixed |
4077 | 2533 |
^ (ProjectDefinition definitionClassForPackage:(missing ? package)) notNil |
4091 | 2534 |
! |
2535 |
||
2536 |
doCreateMissingPackage |
|
4092 | 2537 |
ProjectDefinition |
2538 |
definitionClassForPackage:missing |
|
2539 |
projectType: (ProjectDefinition defaultProjectType) |
|
2540 |
createIfAbsent:true. |
|
4091 | 2541 |
! |
2542 |
||
2543 |
doTryToLoadMissingPackage |
|
2544 |
(Smalltalk loadPackage:missing) ifFalse:[ |
|
4460 | 2545 |
Dialog warn:'Failed to load the missing package %1' with:missing |
4091 | 2546 |
]. |
4460 | 2547 |
|
2548 |
"Modified: / 10-07-2019 / 18:30:31 / Claus Gittinger" |
|
4091 | 2549 |
! |
2550 |
||
2551 |
fixes |
|
2552 |
"return a list of description-actionBlock pairs for possible fixes" |
|
2553 |
||
2554 |
|allFixes| |
|
2555 |
||
2556 |
allFixes := OrderedCollection new. |
|
2557 |
allFixes add:{ |
|
2558 |
'Try to load package %1' bindWith:missing . |
|
2559 |
[ self doTryToLoadMissingPackage ] |
|
2560 |
}. |
|
2561 |
allFixes add:{ |
|
2562 |
'Create package %1' bindWith:missing . |
|
2563 |
[ self doCreateMissingPackage ] |
|
2564 |
}. |
|
2565 |
allFixes addAll:super fixes. |
|
2566 |
^ allFixes |
|
3152 | 2567 |
! ! |
2568 |
||
2798 | 2569 |
!ProjectProblem class methodsFor:'documentation'! |
2570 |
||
2912 | 2571 |
version |
3894 | 2572 |
^ '$Header$' |
2912 | 2573 |
! |
2574 |
||
2575 |
version_CVS |
|
3894 | 2576 |
^ '$Header$' |
2912 | 2577 |
! |
2578 |
||
2854 | 2579 |
version_SVN |
3894 | 2580 |
^ '$Id$' |
2798 | 2581 |
! ! |
3160 | 2582 |