changeset 15436 | a254ee3d8a58 |
parent 15347 | 8397336f18b3 |
child 15566 | 184cea584be5 |
child 15648 | 629594de3115 |
15435:0f10cd04a1fa | 15436:a254ee3d8a58 |
---|---|
16 BrowserList subclass:#MethodCategoryList |
16 BrowserList subclass:#MethodCategoryList |
17 instanceVariableNames:'variableFilter filterClassVars lastSelectedProtocols classes |
17 instanceVariableNames:'variableFilter filterClassVars lastSelectedProtocols classes |
18 leafClasses protocolList rawProtocolList selectedProtocolIndices |
18 leafClasses protocolList rawProtocolList selectedProtocolIndices |
19 lastGeneratedProtocols packageFilterOnInput |
19 lastGeneratedProtocols packageFilterOnInput |
20 methodVisibilityHolder noAllItem noPseudoItems |
20 methodVisibilityHolder noAllItem noPseudoItems |
21 showPseudoProtocols' |
21 showPseudoProtocols showSyntheticMethods' |
22 classVariableNames:'AdditionalEmptyCategoriesPerClassName MethodInfoCache |
22 classVariableNames:'AdditionalEmptyCategoriesPerClassName MethodInfoCache |
23 MethodInfoCacheAccessLock' |
23 MethodInfoCacheAccessLock' |
24 poolDictionaries:'' |
24 poolDictionaries:'' |
25 category:'Interface-Browsers-New' |
25 category:'Interface-Browsers-New' |
26 ! |
26 ! |
35 privateIn:MethodCategoryList |
35 privateIn:MethodCategoryList |
36 ! |
36 ! |
37 |
37 |
38 Method variableSubclass:#MissingMethod |
38 Method variableSubclass:#MissingMethod |
39 instanceVariableNames:'selector' |
39 instanceVariableNames:'selector' |
40 classVariableNames:'' |
|
41 poolDictionaries:'' |
|
42 privateIn:MethodCategoryList |
|
43 ! |
|
44 |
|
45 MethodCategoryList::MissingMethod variableSubclass:#MethodStubForTestResult |
|
46 instanceVariableNames:'' |
|
40 classVariableNames:'' |
47 classVariableNames:'' |
41 poolDictionaries:'' |
48 poolDictionaries:'' |
42 privateIn:MethodCategoryList |
49 privateIn:MethodCategoryList |
43 ! |
50 ! |
44 |
51 |
217 #selectionChangeCondition |
224 #selectionChangeCondition |
218 #updateTrigger |
225 #updateTrigger |
219 #variableFilter |
226 #variableFilter |
220 #methodVisibilityHolder |
227 #methodVisibilityHolder |
221 #showCoverageInformation |
228 #showCoverageInformation |
229 #showSyntheticMethods |
|
222 ). |
230 ). |
223 |
231 |
224 "Modified: / 27-04-2010 / 16:40:39 / cg" |
232 "Modified: / 27-04-2010 / 16:40:39 / cg" |
225 "Modified: / 24-02-2014 / 10:37:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
233 "Modified: / 24-02-2014 / 10:37:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
226 ! ! |
234 ! ! |
381 showPseudoProtocols removeDependent:self |
389 showPseudoProtocols removeDependent:self |
382 ]. |
390 ]. |
383 showPseudoProtocols := aValueHolder. |
391 showPseudoProtocols := aValueHolder. |
384 showPseudoProtocols notNil ifTrue:[ |
392 showPseudoProtocols notNil ifTrue:[ |
385 showPseudoProtocols addDependent:self |
393 showPseudoProtocols addDependent:self |
394 ]. |
|
395 ! |
|
396 |
|
397 showSyntheticMethods |
|
398 showSyntheticMethods isNil ifTrue:[ |
|
399 showSyntheticMethods := ValueHolder with:true. |
|
400 showSyntheticMethods addDependent:self |
|
401 ]. |
|
402 ^ showSyntheticMethods |
|
403 ! |
|
404 |
|
405 showSyntheticMethods:aValueHolder |
|
406 showSyntheticMethods notNil ifTrue:[ |
|
407 showSyntheticMethods removeDependent:self |
|
408 ]. |
|
409 showSyntheticMethods := aValueHolder. |
|
410 showSyntheticMethods notNil ifTrue:[ |
|
411 showSyntheticMethods addDependent:self |
|
386 ]. |
412 ]. |
387 ! |
413 ! |
388 |
414 |
389 variableFilter |
415 variableFilter |
390 variableFilter isNil ifTrue:[ |
416 variableFilter isNil ifTrue:[ |
882 allProtocols superSendProtocols uncommentedProtocols obsoleteProtocols |
908 allProtocols superSendProtocols uncommentedProtocols obsoleteProtocols |
883 documentationProtocols longProtocols extensionProtocols redefinedProtocols |
909 documentationProtocols longProtocols extensionProtocols redefinedProtocols |
884 redefineProtocols overrideProtocols |
910 redefineProtocols overrideProtocols |
885 missingRequiredProtocols subclassResponsibilities |
911 missingRequiredProtocols subclassResponsibilities |
886 notInstrumentedProtocols annotatedProtocols fullyCoveredProtocols |
912 notInstrumentedProtocols annotatedProtocols fullyCoveredProtocols |
887 partiallyCoveredProtocols uncoveredProtocols |
913 partiallyCoveredProtocols uncoveredProtocols allTestsProtocols |
888 classSelectorPairsAlreadyDone |
914 classSelectorPairsAlreadyDone |
889 packages remainingClasses remainingCategories classesAlreadyDone |
915 packages remainingClasses remainingCategories classesAlreadyDone |
890 catListed showChanged| |
916 catListed showChanged| |
891 |
917 |
892 (leafClasses size > 0 and:[protocols size > 0]) ifTrue:[ |
918 (leafClasses size > 0 and:[protocols size > 0]) ifTrue:[ |
906 |
932 |
907 fullyCoveredProtocols := protocols includes:(self class nameListEntryForFullyCovered). |
933 fullyCoveredProtocols := protocols includes:(self class nameListEntryForFullyCovered). |
908 partiallyCoveredProtocols := protocols includes:(self class nameListEntryForPartiallyCovered). |
934 partiallyCoveredProtocols := protocols includes:(self class nameListEntryForPartiallyCovered). |
909 uncoveredProtocols := protocols includes:(self class nameListEntryForUncovered). |
935 uncoveredProtocols := protocols includes:(self class nameListEntryForUncovered). |
910 notInstrumentedProtocols := protocols includes:(self class nameListEntryForNotInstrumented). |
936 notInstrumentedProtocols := protocols includes:(self class nameListEntryForNotInstrumented). |
911 |
937 |
938 allTestsProtocols := protocols includes:(self class nameListEntryForAllTests). |
|
939 |
|
912 packages := packageFilter value value. |
940 packages := packageFilter value value. |
913 (packages notNil and:[packages includes:(self class nameListEntryForALL)]) ifTrue:[ |
941 (packages notNil and:[packages includes:(self class nameListEntryForALL)]) ifTrue:[ |
914 packages := nil. |
942 packages := nil. |
915 ]. |
943 ]. |
916 showChanged := packages notNil and:[packages includes:(self class nameListEntryForChanged)]. |
944 showChanged := packages notNil and:[packages includes:(self class nameListEntryForChanged)]. |
921 classesAlreadyDone := IdentitySet new. |
949 classesAlreadyDone := IdentitySet new. |
922 classSelectorPairsAlreadyDone := Set new. |
950 classSelectorPairsAlreadyDone := Set new. |
923 |
951 |
924 leafClasses do:[:aLeafClass | |
952 leafClasses do:[:aLeafClass | |
925 (self classesToProcessForClasses:(Array with:aLeafClass)) do:[:aClass | |
953 (self classesToProcessForClasses:(Array with:aLeafClass)) do:[:aClass | |
926 |supportsMethodCategories isJavaClass anyInThisClass requiredProtocolForClass| |
954 |supportsMethodCategories isJavaClass anyInThisClass requiredProtocolForClass |
955 isTestCase allTestSelectors| |
|
927 |
956 |
928 (classesAlreadyDone includes:aClass) ifFalse:[ |
957 (classesAlreadyDone includes:aClass) ifFalse:[ |
929 classesAlreadyDone add:aClass. |
958 classesAlreadyDone add:aClass. |
930 |
959 |
931 supportsMethodCategories := aClass supportsMethodCategories. |
960 supportsMethodCategories := aClass supportsMethodCategories. |
932 isJavaClass := aClass isJavaClass. |
961 isJavaClass := aClass isJavaClass. |
962 (allTestsProtocols) ifTrue:[ |
|
963 isTestCase := aClass isMetaclass not and:[aClass isTestCaseLike and:[aClass isAbstract not]]. |
|
964 isTestCase ifTrue:[ |
|
965 allTestsProtocols ifTrue:[ |
|
966 allTestSelectors := aClass allTestSelectors asSet. |
|
967 ]. |
|
968 ]. |
|
969 ]. |
|
933 anyInThisClass := false. |
970 anyInThisClass := false. |
934 |
971 |
935 aClass methodDictionary keysAndValuesDo:[:sel :mthd | |
972 aClass methodDictionary keysAndValuesDo:[:sel :mthd | |
936 |cat mPkg includeIt info| |
973 |cat mPkg includeIt info| |
937 |
974 |
956 ) ifTrue:[ |
993 ) ifTrue:[ |
957 "/ used to be a more readable or, but to reuse info, I've splitted it. |
994 "/ used to be a more readable or, but to reuse info, I've splitted it. |
958 "/ because we should use the parser only once, we reuse the same methodInfo. |
995 "/ because we should use the parser only once, we reuse the same methodInfo. |
959 "/ otherwise, the list update becomes too slow for long classes (NewSystemBrowser) |
996 "/ otherwise, the list update becomes too slow for long classes (NewSystemBrowser) |
960 includeIt := allProtocols. |
997 includeIt := allProtocols. |
961 includeIt ifFalse:[ includeIt := protocols includes:cat ]. |
998 includeIt ifFalse:[ |
999 includeIt := protocols includes:cat]. |
|
1000 includeIt ifFalse:[ |
|
1001 allTestsProtocols ifTrue:[ |
|
1002 includeIt := allTestSelectors notNil and:[allTestSelectors includes:sel]]]. |
|
962 includeIt ifFalse:[ |
1003 includeIt ifFalse:[ |
963 superSendProtocols ifTrue:[ |
1004 superSendProtocols ifTrue:[ |
964 info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
1005 info isNil ifTrue:[ info := self methodInfoFor:mthd in:aClass selector:sel ]. |
965 includeIt := info sendsSuper ]]. |
1006 includeIt := info sendsSuper ]]. |
966 includeIt ifFalse:[ |
1007 includeIt ifFalse:[ |
1032 ]. |
1073 ]. |
1033 ]. |
1074 ]. |
1034 anyInThisClass := true. |
1075 anyInThisClass := true. |
1035 remainingCategories remove:catListed ifAbsent:nil. |
1076 remainingCategories remove:catListed ifAbsent:nil. |
1036 ]. |
1077 ]. |
1037 ] |
1078 ]. |
1079 allTestSelectors notNil ifTrue:[ allTestSelectors remove: sel ifAbsent:[] ]. |
|
1038 ]. |
1080 ]. |
1039 |
1081 |
1040 missingRequiredProtocols ifTrue:[ |
1082 missingRequiredProtocols ifTrue:[ |
1041 requiredProtocolForClass := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:aClass. |
1083 requiredProtocolForClass := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:aClass. |
1042 requiredProtocolForClass do:[:sel | |
1084 requiredProtocolForClass do:[:sel | |
1043 |selectorInRed missingMethodPlaceHolder| |
1085 |selectorInRed missingMethodPlaceHolder| |
1044 |
1086 |
1045 selectorInRed := sel colorizeAllWith:Color red. |
1087 selectorInRed := sel colorizeAllWith:Color red. |
1046 missingMethodPlaceHolder := MissingMethod mclass:aClass selector:sel. |
1088 missingMethodPlaceHolder := MissingMethod mclass:aClass selector:sel. |
1047 whatToDo value:aClass value:'required' value:selectorInRed value:missingMethodPlaceHolder. |
1089 whatToDo value:aClass value:'required' value:selectorInRed value:missingMethodPlaceHolder. |
1090 ]. |
|
1091 ]. |
|
1092 allTestSelectors notEmptyOrNil ifTrue:[ |
|
1093 allTestSelectors do:[:sel | |
|
1094 |methodPlaceHolder implClass| |
|
1095 |
|
1096 implClass := aClass whichClassImplements:sel. |
|
1097 methodPlaceHolder := MethodStubForTestResult mclass:implClass selector:sel. |
|
1098 whatToDo value:aClass value:'all tests' value:sel value:methodPlaceHolder. |
|
1048 ]. |
1099 ]. |
1049 ]. |
1100 ]. |
1050 anyInThisClass ifTrue:[ remainingClasses remove:aClass ifAbsent:nil. ]. |
1101 anyInThisClass ifTrue:[ remainingClasses remove:aClass ifAbsent:nil. ]. |
1051 ]. |
1102 ]. |
1052 ]. |
1103 ]. |
1183 itemsWithPartiallyCoveredMethods itemsWithFullyCoveredMethods |
1234 itemsWithPartiallyCoveredMethods itemsWithFullyCoveredMethods |
1184 packageFilterOnInput packageFilter showChanges nameListEntryForALL changeSet |
1235 packageFilterOnInput packageFilter showChanges nameListEntryForALL changeSet |
1185 emphasizedPlus emphasisForRef emphasisForMod |
1236 emphasizedPlus emphasisForRef emphasisForMod |
1186 numAll numObsolete numSuper numUncommented numDocumentation numLong numOverride |
1237 numAll numObsolete numSuper numUncommented numDocumentation numLong numOverride |
1187 numRedefine numRedefined numExtension numMissingRequired numSubclassResponsibility |
1238 numRedefine numRedefined numExtension numMissingRequired numSubclassResponsibility |
1188 numAnnotated numFullyCovered numPartiallyCovered numUncovered numNotInstrumented |
1239 numAnnotated numFullyCovered numPartiallyCovered numUncovered numNotInstrumented numAllTestResults showPseudoProtocols showCoverageInformation |
1189 showPseudoProtocols showCoverageInformation |
|
1190 addPseudoEntry addPseudoEntryWithColor countAll pseudoEntryColor userPreferences |
1240 addPseudoEntry addPseudoEntryWithColor countAll pseudoEntryColor userPreferences |
1191 startTime suppressPseudoProtocolsNow needsSpecialColoring| |
1241 startTime suppressPseudoProtocolsNow needsSpecialColoring| |
1192 |
1242 |
1193 userPreferences := UserPreferences current. |
1243 userPreferences := UserPreferences current. |
1194 countAll := true. |
1244 countAll := true. |
1237 variablesToHighlight := variableFilter value. |
1287 variablesToHighlight := variableFilter value. |
1238 classVarsToHighLight := filterClassVars value. |
1288 classVarsToHighLight := filterClassVars value. |
1239 numObsolete := numSuper := numUncommented := numDocumentation := numLong := 0. |
1289 numObsolete := numSuper := numUncommented := numDocumentation := numLong := 0. |
1240 numRedefine := numRedefined := numOverride := numExtension := numMissingRequired := numSubclassResponsibility := 0. |
1290 numRedefine := numRedefined := numOverride := numExtension := numMissingRequired := numSubclassResponsibility := 0. |
1241 numNotInstrumented := numFullyCovered := numPartiallyCovered := numUncovered := 0. |
1291 numNotInstrumented := numFullyCovered := numPartiallyCovered := numUncovered := 0. |
1242 numAnnotated := 0. |
1292 numAnnotated := numAllTestResults := 0. |
1243 numAll := 0. |
1293 numAll := 0. |
1244 |
1294 |
1245 generator do:[:clsIn :catIn | |
1295 generator do:[:clsIn :catIn | |
1246 |emptyProtocols clsName doHighLight doHighLightRed includedCats| |
1296 |emptyProtocols clsName doHighLight doHighLightRed includedCats| |
1247 |
1297 |
1248 includedCats := Set new. |
1298 includedCats := Set new. |
1249 |
1299 |
1250 leafClassesProcessed add:clsIn. |
1300 leafClassesProcessed add:clsIn. |
1251 (self classesToProcessForClasses:(Array with:clsIn)) do:[:cls | |
1301 (self classesToProcessForClasses:(Array with:clsIn)) do:[:cls | |
1252 |cats processCategory| |
1302 |cats processCategory| |
1253 |
1303 |
1254 classesProcessed add:cls. |
1304 classesProcessed add:cls. |
1255 |
1305 |
1256 cls ~~ clsIn ifTrue:[ |
1306 cls ~~ clsIn ifTrue:[ |
1257 cats := cls categories |
1307 cats := cls categories |
1258 ] ifFalse:[ |
1308 ] ifFalse:[ |
1259 cats := Array with:catIn. |
1309 cats := Array with:catIn. |
1310 ]. |
|
1311 cats do:[:cat | |
|
1312 |suppress| |
|
1313 |
|
1314 cat notNil ifTrue:[ |
|
1315 suppress := packageFilterOnInput notNil |
|
1316 and:[ (self class:cls protocol:cat includesMethodsInAnyPackage:packageFilterOnInput) not ]. |
|
1317 suppress ifFalse:[ |
|
1318 includedCats add:cat. |
|
1319 |
|
1320 variablesToHighlight notEmptyOrNil ifTrue:[ |
|
1321 (itemsWithVarRefs includes:cat) ifFalse:[ |
|
1322 classVarsToHighLight ifTrue:[ |
|
1323 doHighLight := self class:cls protocol:cat includesRefsToClassVariable:variablesToHighlight. |
|
1324 doHighLight ifTrue:[ |
|
1325 doHighLightRed := self class:cls protocol:cat includesModsOfClassVariable:variablesToHighlight. |
|
1326 ]. |
|
1327 ] ifFalse:[ |
|
1328 doHighLight := self class:cls protocol:cat includesRefsToInstanceVariable:variablesToHighlight. |
|
1329 doHighLight ifTrue:[ |
|
1330 doHighLightRed := self class:cls protocol:cat includesModsOfInstanceVariable:variablesToHighlight. |
|
1331 ]. |
|
1332 ]. |
|
1333 doHighLight ifTrue:[ |
|
1334 itemsWithVarRefs add:cat. |
|
1335 doHighLightRed ifTrue:[ |
|
1336 itemsWithVarMods add:cat. |
|
1337 ]. |
|
1338 ] |
|
1339 ] |
|
1340 ]. |
|
1341 |
|
1342 AdditionalEmptyCategoriesPerClassName size > 0 ifTrue:[ |
|
1343 clsName := cls name. |
|
1344 emptyProtocols := AdditionalEmptyCategoriesPerClassName at:clsName ifAbsent:nil. |
|
1345 emptyProtocols size > 0 ifTrue:[ |
|
1346 emptyProtocols remove:cat ifAbsent:nil. |
|
1260 ]. |
1347 ]. |
1261 cats do:[:cat | |
1348 emptyProtocols size == 0 ifTrue:[ |
1262 |suppress| |
1349 AdditionalEmptyCategoriesPerClassName removeKey:clsName ifAbsent:nil |
1263 |
|
1264 cat notNil ifTrue:[ |
|
1265 suppress := packageFilterOnInput notNil |
|
1266 and:[ (self class:cls protocol:cat includesMethodsInAnyPackage:packageFilterOnInput) not ]. |
|
1267 suppress ifFalse:[ |
|
1268 includedCats add:cat. |
|
1269 |
|
1270 variablesToHighlight notEmptyOrNil ifTrue:[ |
|
1271 (itemsWithVarRefs includes:cat) ifFalse:[ |
|
1272 classVarsToHighLight ifTrue:[ |
|
1273 doHighLight := self class:cls protocol:cat includesRefsToClassVariable:variablesToHighlight. |
|
1274 doHighLight ifTrue:[ |
|
1275 doHighLightRed := self class:cls protocol:cat includesModsOfClassVariable:variablesToHighlight. |
|
1276 ]. |
|
1277 ] ifFalse:[ |
|
1278 doHighLight := self class:cls protocol:cat includesRefsToInstanceVariable:variablesToHighlight. |
|
1279 doHighLight ifTrue:[ |
|
1280 doHighLightRed := self class:cls protocol:cat includesModsOfInstanceVariable:variablesToHighlight. |
|
1281 ]. |
|
1282 ]. |
|
1283 doHighLight ifTrue:[ |
|
1284 itemsWithVarRefs add:cat. |
|
1285 doHighLightRed ifTrue:[ |
|
1286 itemsWithVarMods add:cat. |
|
1287 ]. |
|
1288 ] |
|
1289 ] |
|
1290 ]. |
|
1291 |
|
1292 AdditionalEmptyCategoriesPerClassName size > 0 ifTrue:[ |
|
1293 clsName := cls name. |
|
1294 emptyProtocols := AdditionalEmptyCategoriesPerClassName at:clsName ifAbsent:nil. |
|
1295 emptyProtocols size > 0 ifTrue:[ |
|
1296 emptyProtocols remove:cat ifAbsent:nil. |
|
1297 ]. |
|
1298 emptyProtocols size == 0 ifTrue:[ |
|
1299 AdditionalEmptyCategoriesPerClassName removeKey:clsName ifAbsent:nil |
|
1300 ]. |
|
1301 ]. |
|
1302 ] |
|
1303 ] |
|
1304 ]. |
1350 ]. |
1305 |
1351 ]. |
1306 cats := cats asSet. |
1352 ] |
1307 |
1353 ] |
1308 cls selectorsAndMethodsDo:[:sel :mthd | |
1354 ]. |
1309 |info cat suppress| |
1355 |
1310 |
1356 cats := cats asSet. |
1311 (includedCats includes:(cat := mthd category)) ifTrue:[ |
1357 |
1312 suppress := packageFilter notNil |
1358 cls selectorsAndMethodsDo:[:sel :mthd | |
1313 and:[ (packageFilter includes:mthd package) not |
1359 |info cat suppress| |
1314 and:[ showChanges not ]]. |
1360 |
1315 suppress ifFalse:[ |
1361 (includedCats includes:(cat := mthd category)) ifTrue:[ |
1316 numAll := numAll + 1. |
1362 suppress := packageFilter notNil |
1317 categoryBag add:cat. |
1363 and:[ (packageFilter includes:mthd package) not |
1318 (showPseudoProtocols and:[suppressPseudoProtocolsNow not]) ifTrue:[ |
1364 and:[ showChanges not ]]. |
1319 info := self methodInfoFor:mthd in:cls selector:sel lazy:suppressPseudoProtocolsNow. |
1365 suppress ifFalse:[ |
1320 info notNil ifTrue:[ |
1366 numAll := numAll + 1. |
1321 info isObsolete ifTrue:[ numObsolete := numObsolete + 1 ]. |
1367 categoryBag add:cat. |
1322 info sendsSuper ifTrue:[ numSuper := numSuper + 1 ]. |
1368 (showPseudoProtocols and:[suppressPseudoProtocolsNow not]) ifTrue:[ |
1323 info isUncommented ifTrue:[ numUncommented := numUncommented + 1 ]. |
1369 info := self methodInfoFor:mthd in:cls selector:sel lazy:suppressPseudoProtocolsNow. |
1324 info isDocumentationMethod ifTrue:[ numDocumentation := numDocumentation + 1 ]. |
1370 info notNil ifTrue:[ |
1325 info isLongMethod ifTrue:[ numLong := numLong + 1 ]. |
1371 info isObsolete ifTrue:[ numObsolete := numObsolete + 1 ]. |
1326 info isExtensionMethod ifTrue:[ numExtension := numExtension + 1 ]. |
1372 info sendsSuper ifTrue:[ numSuper := numSuper + 1 ]. |
1327 info isOverride ifTrue:[ numOverride := numOverride + 1 ]. |
1373 info isUncommented ifTrue:[ numUncommented := numUncommented + 1 ]. |
1328 info isRedefine ifTrue:[ numRedefine := numRedefine + 1 ]. |
1374 info isDocumentationMethod ifTrue:[ numDocumentation := numDocumentation + 1 ]. |
1329 info isRedefined ifTrue:[ numRedefined := numRedefined + 1 ]. |
1375 info isLongMethod ifTrue:[ numLong := numLong + 1 ]. |
1330 info isSubclassResponsibility ifTrue:[ numSubclassResponsibility := numSubclassResponsibility + 1]. |
1376 info isExtensionMethod ifTrue:[ numExtension := numExtension + 1 ]. |
1331 info isAnnotated ifTrue:[ numAnnotated := numAnnotated + 1]. |
1377 info isOverride ifTrue:[ numOverride := numOverride + 1 ]. |
1332 ]. |
1378 info isRedefine ifTrue:[ numRedefine := numRedefine + 1 ]. |
1333 (Timestamp now secondDeltaFrom:startTime) > 5 ifTrue:[ |
1379 info isRedefined ifTrue:[ numRedefined := numRedefined + 1 ]. |
1334 suppressPseudoProtocolsNow := true. |
1380 info isSubclassResponsibility ifTrue:[ numSubclassResponsibility := numSubclassResponsibility + 1]. |
1335 "/ because we already computed for 5 seconds, more and more will be found in |
1381 info isAnnotated ifTrue:[ numAnnotated := numAnnotated + 1]. |
1336 "/ the cache, and eventually, pseudo protocols will be shown anyway |
1382 ]. |
1337 masterApplication showInfo:'suppress pseudo protocols - parsing took too long'. |
1383 (Timestamp now secondDeltaFrom:startTime) > 5 ifTrue:[ |
1338 "/ self enqueueDelayedUpdateList. |
1384 suppressPseudoProtocolsNow := true. |
1339 ]. |
1385 "/ because we already computed for 5 seconds, more and more will be found in |
1340 ] |
1386 "/ the cache, and eventually, pseudo protocols will be shown anyway |
1341 ] |
1387 masterApplication showInfo:'suppress pseudo protocols - parsing took too long'. |
1342 ]. |
1388 "/ self enqueueDelayedUpdateList. |
1343 ]. |
1389 ]. |
1344 ] |
1390 ] |
1345 ]. |
1391 ] |
1392 ]. |
|
1393 ]. |
|
1394 ] |
|
1395 ]. |
|
1346 |
1396 |
1347 changeSet := ChangeSet current. |
1397 changeSet := ChangeSet current. |
1348 |
1398 |
1349 classesProcessed do:[:eachClass | |
1399 classesProcessed do:[:eachClass | |
1350 |classPackage required| |
1400 |classPackage required testOutcomes| |
1401 |
|
1402 showSyntheticMethods value ifTrue:[ |
|
1403 (eachClass isMeta not and:[eachClass isTestCaseLike and:[eachClass isAbstract not]]) ifTrue:[ |
|
1404 testOutcomes := eachClass testSelectorsWithLastOutcomes. |
|
1405 numAllTestResults := numAllTestResults + testOutcomes size. |
|
1406 ]. |
|
1407 ]. |
|
1351 |
1408 |
1352 classPackage := eachClass package. |
1409 classPackage := eachClass package. |
1353 eachClass methodDictionary keysAndValuesDo:[:mSelector :mthd | |
1410 eachClass methodDictionary keysAndValuesDo:[:mSelector :mthd | |
1354 |mPackage mCategory| |
1411 |mPackage mCategory| |
1355 |
1412 |
1406 ] |
1463 ] |
1407 ]. |
1464 ]. |
1408 (SmallTeam notNil and:[ SmallTeam includesChangeForClass:eachClass selector:mSelector] ) ifTrue:[ |
1465 (SmallTeam notNil and:[ SmallTeam includesChangeForClass:eachClass selector:mSelector] ) ifTrue:[ |
1409 itemsInRemoteChangeSet add:mCategory. |
1466 itemsInRemoteChangeSet add:mCategory. |
1410 ]. |
1467 ]. |
1468 testOutcomes notNil ifTrue:[ testOutcomes remove: mSelector ifAbsent:[] ]. |
|
1411 ]. |
1469 ]. |
1412 |
1470 |
1413 (packageFilter isNil or:[ packageFilter includes:eachClass package ]) ifTrue:[ |
1471 (packageFilter isNil or:[ packageFilter includes:eachClass package ]) ifTrue:[ |
1414 (showPseudoProtocols and:[suppressPseudoProtocolsNow not]) ifTrue:[ |
1472 (showPseudoProtocols and:[suppressPseudoProtocolsNow not]) ifTrue:[ |
1415 "/ see if there is a subclassResponsibility in a superclass |
1473 showSyntheticMethods value ifTrue:[ |
1416 required := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:eachClass. |
1474 "/ see if there is a subclassResponsibility in a superclass |
1417 numMissingRequired := numMissingRequired + required size. |
1475 required := SmalltalkCodeGeneratorTool missingRequiredProtocolFor:eachClass. |
1476 numMissingRequired := numMissingRequired + required size. |
|
1477 ]. |
|
1418 ]. |
1478 ]. |
1419 ]. |
1479 ]. |
1420 ]. |
1480 ]. |
1421 |
1481 |
1422 pseudoEntryColor := self class pseudoEntryForegroundColor. |
1482 pseudoEntryColor := self class pseudoEntryForegroundColor. |
1571 "/ rawProtocolList add:self class nameListEntryForRequired. |
1631 "/ rawProtocolList add:self class nameListEntryForRequired. |
1572 "/ ]. |
1632 "/ ]. |
1573 addPseudoEntry value:self class nameListEntryForRequired value:numMissingRequired. |
1633 addPseudoEntry value:self class nameListEntryForRequired value:numMissingRequired. |
1574 addPseudoEntry value:self class nameListEntryForSuperSend value:numSuper. |
1634 addPseudoEntry value:self class nameListEntryForSuperSend value:numSuper. |
1575 addPseudoEntry value:self class nameListEntryForUncommented value:numUncommented. |
1635 addPseudoEntry value:self class nameListEntryForUncommented value:numUncommented. |
1636 addPseudoEntry value:self class nameListEntryForAllTests value:numAllTestResults. |
|
1576 |
1637 |
1577 showCoverageInformation ifTrue:[ |
1638 showCoverageInformation ifTrue:[ |
1578 addPseudoEntry value:self class nameListEntryForNotInstrumented value:numNotInstrumented. |
1639 addPseudoEntry value:self class nameListEntryForNotInstrumented value:numNotInstrumented. |
1579 addPseudoEntryWithColor value:self class nameListEntryForUncovered value:numUncovered value:userPreferences colorForInstrumentedNeverCalledCode. |
1640 addPseudoEntryWithColor value:self class nameListEntryForUncovered value:numUncovered value:userPreferences colorForInstrumentedNeverCalledCode. |
1580 addPseudoEntryWithColor value:self class nameListEntryForPartiallyCovered value:numPartiallyCovered value:userPreferences colorForInstrumentedPartiallyCoveredCode. |
1641 addPseudoEntryWithColor value:self class nameListEntryForPartiallyCovered value:numPartiallyCovered value:userPreferences colorForInstrumentedPartiallyCoveredCode. |
2104 ]. |
2165 ]. |
2105 |
2166 |
2106 "Created: / 01-04-2014 / 12:21:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2167 "Created: / 01-04-2014 / 12:21:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2107 ! |
2168 ! |
2108 |
2169 |
2170 isSynthetic |
|
2171 ^ true |
|
2172 ! |
|
2173 |
|
2109 who |
2174 who |
2110 | savedMclass | |
2175 | savedMclass | |
2111 |
2176 |
2112 "/ Save mclass here as Method>>who clobbers it!! |
2177 "/ Save mclass here as Method>>who clobbers it!! |
2113 [ |
2178 [ |
2118 ]. |
2183 ]. |
2119 |
2184 |
2120 "Created: / 01-04-2014 / 12:28:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2185 "Created: / 01-04-2014 / 12:28:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2121 ! ! |
2186 ! ! |
2122 |
2187 |
2188 !MethodCategoryList::MethodStubForTestResult methodsFor:'accessing'! |
|
2189 |
|
2190 source |
|
2191 ^ (mclass compiledMethodAt:selector) source |
|
2192 colorizeAllWith:Color grey |
|
2193 ! ! |
|
2194 |
|
2195 !MethodCategoryList::MethodStubForTestResult methodsFor:'printing & storing'! |
|
2196 |
|
2197 printStringForBrowserWithSelector:selector inClass:aClass |
|
2198 ^ (selector,' (** from ',self mclass name,' **)') colorizeAllWith:Color gray |
|
2199 ! ! |
|
2200 |
|
2123 !MethodCategoryList class methodsFor:'documentation'! |
2201 !MethodCategoryList class methodsFor:'documentation'! |
2124 |
2202 |
2125 version |
2203 version |
2126 ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodCategoryList.st,v 1.110 2015-02-21 01:02:13 cg Exp $' |
2204 ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodCategoryList.st,v 1.111 2015-02-26 03:58:30 cg Exp $' |
2127 ! |
2205 ! |
2128 |
2206 |
2129 version_CVS |
2207 version_CVS |
2130 ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodCategoryList.st,v 1.110 2015-02-21 01:02:13 cg Exp $' |
2208 ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodCategoryList.st,v 1.111 2015-02-26 03:58:30 cg Exp $' |
2131 ! ! |
2209 ! ! |
2132 |
2210 |
2133 |
2211 |
2134 MethodCategoryList initialize! |
2212 MethodCategoryList initialize! |
2135 MethodCategoryList::CachedMethodInfo initialize! |
2213 MethodCategoryList::CachedMethodInfo initialize! |