125 LockChangesFile := false. |
126 LockChangesFile := false. |
126 CatchMethodRedefinitions := true. |
127 CatchMethodRedefinitions := true. |
127 TryLocalSourceFirst := false. |
128 TryLocalSourceFirst := false. |
128 |
129 |
129 FileOutErrorSignal isNil ifTrue:[ |
130 FileOutErrorSignal isNil ifTrue:[ |
130 FileOutErrorSignal := ErrorSignal newSignalMayProceed:false. |
131 FileOutErrorSignal := ErrorSignal newSignalMayProceed:false. |
131 FileOutErrorSignal nameClass:self message:#fileOutErrorSignal. |
132 FileOutErrorSignal nameClass:self message:#fileOutErrorSignal. |
132 FileOutErrorSignal notifierString:'error during fileOut'. |
133 FileOutErrorSignal notifierString:'error during fileOut'. |
133 |
134 |
134 MethodRedefinitionSignal := ErrorSignal newSignalMayProceed:true. |
135 MethodRedefinitionSignal := ErrorSignal newSignalMayProceed:true. |
135 MethodRedefinitionSignal nameClass:self message:#methodRedefinitionSignal. |
136 MethodRedefinitionSignal nameClass:self message:#methodRedefinitionSignal. |
136 MethodRedefinitionSignal notifierString:'attempt to redefine method from different package'. |
137 MethodRedefinitionSignal notifierString:'attempt to redefine method from different package'. |
137 |
138 |
138 UpdateChangeFileQuerySignal := QuerySignal new mayProceed:true. |
139 UpdateChangeFileQuerySignal := QuerySignal new mayProceed:true. |
139 UpdateChangeFileQuerySignal nameClass:self message:#updateChangeFileQuerySignal. |
140 UpdateChangeFileQuerySignal nameClass:self message:#updateChangeFileQuerySignal. |
140 UpdateChangeFileQuerySignal notifierString:'asking if changeFile update is wanted'. |
141 UpdateChangeFileQuerySignal notifierString:'asking if changeFile update is wanted'. |
141 UpdateChangeFileQuerySignal handlerBlock:[:ex | ex proceedWith:UpdatingChanges]. |
142 UpdateChangeFileQuerySignal handlerBlock:[:ex | ex proceedWith:UpdatingChanges]. |
142 ] |
143 |
|
144 ChangeFileAccessLock := Semaphore forMutualExclusion. |
|
145 ] |
|
146 |
|
147 "Modified: 21.3.1996 / 16:31:30 / cg" |
143 ! ! |
148 ! ! |
144 |
149 |
145 !Class class methodsFor:'Signal constants'! |
150 !Class class methodsFor:'Signal constants'! |
146 |
151 |
147 fileOutErrorSignal |
152 fileOutErrorSignal |
1286 "add a category change record to the changes file" |
1291 "add a category change record to the changes file" |
1287 |
1292 |
1288 self writingChangePerform:#addChangeRecordForChangeCategory:to: with:category. |
1293 self writingChangePerform:#addChangeRecordForChangeCategory:to: with:category. |
1289 ! |
1294 ! |
1290 |
1295 |
1291 addChangeRecordForChangeCategory:category to:aStream |
|
1292 "append a category change record to aStream" |
|
1293 |
|
1294 self printClassNameOn:aStream. |
|
1295 aStream nextPutAll:(' category:' , category storeString). |
|
1296 aStream nextPutChunkSeparator. |
|
1297 |
|
1298 "this test allows a smalltalk without Projects/ChangeSets" |
|
1299 Project notNil ifTrue:[ |
|
1300 Project addClassDefinitionChangeFor:self |
|
1301 ] |
|
1302 |
|
1303 "Created: 3.12.1995 / 13:43:33 / cg" |
|
1304 "Modified: 3.12.1995 / 14:10:34 / cg" |
|
1305 ! |
|
1306 |
|
1307 addChangeRecordForClass:aClass |
1296 addChangeRecordForClass:aClass |
1308 "add a class-definition-record to the changes file" |
1297 "add a class-definition-record to the changes file" |
1309 |
1298 |
1310 self writingChangePerform:#addChangeRecordForClass:to: with:aClass. |
1299 self writingChangePerform:#addChangeRecordForClass:to: with:aClass. |
1311 ! |
1300 ! |
1312 |
1301 |
1313 addChangeRecordForClass:aClass to:aStream |
|
1314 "append a class-definition-record to aStream" |
|
1315 |
|
1316 aClass isLoaded ifTrue:[ |
|
1317 aClass fileOutDefinitionOn:aStream. |
|
1318 aStream nextPutChunkSeparator. |
|
1319 Project notNil ifTrue:[ |
|
1320 Project addClassDefinitionChangeFor:aClass |
|
1321 ] |
|
1322 ] |
|
1323 |
|
1324 "Created: 3.12.1995 / 13:57:44 / cg" |
|
1325 "Modified: 3.12.1995 / 14:11:26 / cg" |
|
1326 ! |
|
1327 |
|
1328 addChangeRecordForClassCheckIn:aClass |
1302 addChangeRecordForClassCheckIn:aClass |
1329 "append a class-was-checkedIn-record to the changes file" |
1303 "append a class-was-checkedIn-record to the changes file" |
1330 |
1304 |
1331 self addInfoRecord:('checkin ' , aClass name , ' (' , aClass revision , ')') |
1305 self addInfoRecord:('checkin ' , aClass name , ' (' , aClass revision , ')') |
1332 |
1306 |
1358 "add a class-instvars-record to the changes file" |
1324 "add a class-instvars-record to the changes file" |
1359 |
1325 |
1360 self writingChangePerform:#addChangeRecordForClassInstvars:to: with:aClass. |
1326 self writingChangePerform:#addChangeRecordForClassInstvars:to: with:aClass. |
1361 ! |
1327 ! |
1362 |
1328 |
1363 addChangeRecordForClassInstvars:aClass to:aStream |
|
1364 "append a class-instvars-record to aStream" |
|
1365 |
|
1366 aClass fileOutClassInstVarDefinitionOn:aStream. |
|
1367 aStream nextPutChunkSeparator. |
|
1368 ! |
|
1369 |
|
1370 addChangeRecordForClassRemove:oldName |
1329 addChangeRecordForClassRemove:oldName |
1371 "add a class-remove-record to the changes file" |
1330 "add a class-remove-record to the changes file" |
1372 |
1331 |
1373 self writingChangePerform:#addChangeRecordForClassRemove:to: with:oldName. |
1332 self writingChangePerform:#addChangeRecordForClassRemove:to: with:oldName. |
1374 ! |
1333 ! |
1375 |
1334 |
1376 addChangeRecordForClassRemove:oldName to:aStream |
|
1377 "append a class-remove-record to aStream" |
|
1378 |
|
1379 aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
|
1380 aStream nextPutChunkSeparator. |
|
1381 ! |
|
1382 |
|
1383 addChangeRecordForClassRename:oldName to:newName |
1335 addChangeRecordForClassRename:oldName to:newName |
1384 "add a class-rename-record to the changes file" |
1336 "add a class-rename-record to the changes file" |
1385 |
1337 |
1386 self writingChangeDo:[:aStream | |
1338 self writingChangeDo:[:aStream | |
1387 self addChangeRecordForClassRename:oldName to:newName to:aStream |
1339 self addChangeRecordForClassRename:oldName to:newName to:aStream |
1388 ] |
1340 ] |
1389 ! |
|
1390 |
|
1391 addChangeRecordForClassRename:oldName to:newName to:aStream |
|
1392 "append a class-rename-record to aStream" |
|
1393 |
|
1394 aStream nextPutAll:('Smalltalk renameClass:' , oldName , ' to:''' , newName , ''''). |
|
1395 aStream nextPutChunkSeparator. |
|
1396 ! |
1341 ! |
1397 |
1342 |
1398 addChangeRecordForMethod:aMethod |
1343 addChangeRecordForMethod:aMethod |
1399 "add a method-change-record to the changes file" |
1344 "add a method-change-record to the changes file" |
1400 |
1345 |
1521 Project addPrimitiveVariablesChangeFor:aClass |
1412 Project addPrimitiveVariablesChangeFor:aClass |
1522 ] |
1413 ] |
1523 ] |
1414 ] |
1524 ! |
1415 ! |
1525 |
1416 |
1526 addChangeRecordForPrimitiveVariables:aClass to:aStream |
|
1527 "append a primitiveVariables-record to aStream" |
|
1528 |
|
1529 aStream nextPutAll:aClass name; nextPutAll:' primitiveVariables:'''; cr; |
|
1530 nextPutAll:(aClass primitiveVariablesString storeString copyFrom:2). |
|
1531 aStream nextPutChunkSeparator. |
|
1532 ! |
|
1533 |
|
1534 addChangeRecordForRemoveSelector:aSelector |
1417 addChangeRecordForRemoveSelector:aSelector |
1535 "add a method-remove-record to the changes file" |
1418 "add a method-remove-record to the changes file" |
1536 |
1419 |
1537 self writingChangePerform:#addChangeRecordForRemoveSelector:to: with:aSelector. |
1420 self writingChangePerform:#addChangeRecordForRemoveSelector:to: with:aSelector. |
1538 ! |
1421 ! |
1539 |
1422 |
1540 addChangeRecordForRemoveSelector:aSelector to:aStream |
|
1541 "append a method-remove-record to aStream" |
|
1542 |
|
1543 self printClassNameOn:aStream. |
|
1544 aStream nextPutAll:(' removeSelector:#' , aSelector). |
|
1545 aStream nextPutChunkSeparator. |
|
1546 ! |
|
1547 |
|
1548 addChangeRecordForRenameCategory:oldCategory to:newCategory |
1423 addChangeRecordForRenameCategory:oldCategory to:newCategory |
1549 "add a category-rename record to the changes file" |
1424 "add a category-rename record to the changes file" |
1550 |
1425 |
1551 self writingChangeDo:[:aStream | |
1426 self writingChangeDo:[:aStream | |
1552 self addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream. |
1427 self addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream. |
1553 ] |
1428 ] |
1554 ! |
1429 ! |
1555 |
1430 |
1556 addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream |
|
1557 "append a category-rename record to aStream" |
|
1558 |
|
1559 self printClassNameOn:aStream. |
|
1560 aStream nextPutAll:(' renameCategory:' , oldCategory storeString). |
|
1561 aStream nextPutAll:(' to:' , newCategory storeString). |
|
1562 aStream nextPutChunkSeparator. |
|
1563 ! |
|
1564 |
|
1565 addChangeRecordForSnapshot:aFileName |
1431 addChangeRecordForSnapshot:aFileName |
1566 "add a snapshot-record to the changes file" |
1432 "add a snapshot-record to the changes file" |
1567 |
1433 |
1568 self addInfoRecord:('snapshot ' , aFileName) |
1434 self addInfoRecord:('snapshot ' , aFileName) |
1569 ! |
1435 ! |
1663 UpdateChangeFileQuerySignal handle:[:ex | |
1519 UpdateChangeFileQuerySignal handle:[:ex | |
1664 ex proceedWith:false |
1520 ex proceedWith:false |
1665 ] do:[ |
1521 ] do:[ |
1666 aBlock value |
1522 aBlock value |
1667 ]. |
1523 ]. |
1668 ! |
|
1669 |
|
1670 writingChangeDo:aBlock |
|
1671 "common helper to write a change record. |
|
1672 Opens the changefile and executes aBlock passing the stream |
|
1673 as argument. WriteErrors are cought and will lead to a warning. |
|
1674 The changefile is not kept open, to force the change to go to disk |
|
1675 as soon as possible - thus, in case of a crash, no changes should |
|
1676 be lost due to buffering." |
|
1677 |
|
1678 self writingChangeWithTimeStamp:true do:aBlock |
|
1679 |
|
1680 "Modified: 18.11.1995 / 15:43:36 / cg" |
|
1681 ! |
|
1682 |
|
1683 writingChangePerform:aSelector with:anArgument |
|
1684 self writingChangeWithTimeStamp:true perform:aSelector with:anArgument |
|
1685 |
|
1686 "Created: 28.10.1995 / 16:50:48 / cg" |
|
1687 "Modified: 18.11.1995 / 15:44:53 / cg" |
|
1688 ! |
|
1689 |
|
1690 writingChangeWithTimeStamp:doStampIt do:aBlock |
|
1691 "common helper to write a change record. |
|
1692 Opens the changefile and executes aBlock passing the stream |
|
1693 as argument. WriteErrors are cought and will lead to a warning. |
|
1694 The changefile is not kept open, to force the change to go to disk |
|
1695 as soon as possible - thus, in case of a crash, no changes should |
|
1696 be lost due to buffering." |
|
1697 |
|
1698 |aStream| |
|
1699 |
|
1700 aStream := self changesStream. |
|
1701 aStream notNil ifTrue:[ |
|
1702 FileStream writeErrorSignal handle:[:ex | |
|
1703 self warn:('could not update the changes-file\\' , ex errorString) withCRs. |
|
1704 ex return |
|
1705 ] do:[ |
|
1706 doStampIt ifTrue:[self addChangeTimeStampTo:aStream]. |
|
1707 aBlock value:aStream. |
|
1708 aStream cr. |
|
1709 ]. |
|
1710 aStream close |
|
1711 ] |
|
1712 |
|
1713 "Created: 18.11.1995 / 15:36:02 / cg" |
|
1714 ! |
|
1715 |
|
1716 writingChangeWithTimeStamp:stampIt perform:aSelector with:anArgument |
|
1717 self writingChangeWithTimeStamp:stampIt do:[:stream | |
|
1718 self perform:aSelector with:anArgument with:stream. |
|
1719 ] |
|
1720 |
|
1721 "Created: 18.11.1995 / 15:44:28 / cg" |
|
1722 ! ! |
1524 ! ! |
1723 |
1525 |
1724 !Class methodsFor:'compiling'! |
1526 !Class methodsFor:'compiling'! |
1725 |
1527 |
1726 compile:code |
1528 compile:code |
3003 " |
2805 " |
3004 Float printOutProtocolOn:Stdout |
2806 Float printOutProtocolOn:Stdout |
3005 " |
2807 " |
3006 ! ! |
2808 ! ! |
3007 |
2809 |
3008 !Class methodsFor:'private'! |
2810 !Class methodsFor:'private changes management'! |
|
2811 |
|
2812 addChangeRecordForChangeCategory:category to:aStream |
|
2813 "append a category change record to aStream" |
|
2814 |
|
2815 self printClassNameOn:aStream. |
|
2816 aStream nextPutAll:(' category:' , category storeString). |
|
2817 aStream nextPutChunkSeparator. |
|
2818 |
|
2819 "this test allows a smalltalk without Projects/ChangeSets" |
|
2820 Project notNil ifTrue:[ |
|
2821 Project addClassDefinitionChangeFor:self |
|
2822 ] |
|
2823 |
|
2824 "Created: 3.12.1995 / 13:43:33 / cg" |
|
2825 "Modified: 3.12.1995 / 14:10:34 / cg" |
|
2826 ! |
|
2827 |
|
2828 addChangeRecordForClass:aClass to:aStream |
|
2829 "append a class-definition-record to aStream" |
|
2830 |
|
2831 aClass isLoaded ifTrue:[ |
|
2832 aClass fileOutDefinitionOn:aStream. |
|
2833 aStream nextPutChunkSeparator. |
|
2834 Project notNil ifTrue:[ |
|
2835 Project addClassDefinitionChangeFor:aClass |
|
2836 ] |
|
2837 ] |
|
2838 |
|
2839 "Created: 3.12.1995 / 13:57:44 / cg" |
|
2840 "Modified: 3.12.1995 / 14:11:26 / cg" |
|
2841 ! |
|
2842 |
|
2843 addChangeRecordForClassComment:aClass to:aStream |
|
2844 "append a class-comment-record to aStream" |
|
2845 |
|
2846 aClass fileOutCommentOn:aStream. |
|
2847 |
|
2848 "Modified: 4.3.1996 / 16:49:08 / cg" |
|
2849 ! |
|
2850 |
|
2851 addChangeRecordForClassInstvars:aClass to:aStream |
|
2852 "append a class-instvars-record to aStream" |
|
2853 |
|
2854 aClass fileOutClassInstVarDefinitionOn:aStream. |
|
2855 aStream nextPutChunkSeparator. |
|
2856 ! |
|
2857 |
|
2858 addChangeRecordForClassRemove:oldName to:aStream |
|
2859 "append a class-remove-record to aStream" |
|
2860 |
|
2861 aStream nextPutAll:('Smalltalk removeClass:' , oldName). |
|
2862 aStream nextPutChunkSeparator. |
|
2863 ! |
|
2864 |
|
2865 addChangeRecordForClassRename:oldName to:newName to:aStream |
|
2866 "append a class-rename-record to aStream" |
|
2867 |
|
2868 aStream nextPutAll:('Smalltalk renameClass:' , oldName , ' to:''' , newName , ''''). |
|
2869 aStream nextPutChunkSeparator. |
|
2870 ! |
|
2871 |
|
2872 addChangeRecordForMethod:aMethod to:aStream |
|
2873 "append a method-change-record to aStream" |
|
2874 |
|
2875 self fileOutMethod:aMethod on:aStream. |
|
2876 ! |
|
2877 |
|
2878 addChangeRecordForMethodCategory:aMethod category:newCategory to:aStream |
|
2879 "append a methodCategory-change-record to aStream" |
|
2880 |
|
2881 |selector| |
|
2882 |
|
2883 selector := aMethod selector. |
|
2884 selector notNil ifTrue:[ |
|
2885 aStream nextPutAll:'('. |
|
2886 self printClassNameOn:aStream. |
|
2887 aStream nextPutAll:(' compiledMethodAt:' , selector storeString). |
|
2888 aStream nextPutAll:(') category:' , newCategory storeString). |
|
2889 aStream nextPutChunkSeparator. |
|
2890 ] |
|
2891 ! |
|
2892 |
|
2893 addChangeRecordForMethodPrivacy:aMethod to:aStream |
|
2894 "append a method-privacy-change-record to aStream" |
|
2895 |
|
2896 |selector| |
|
2897 |
|
2898 selector := aMethod selector. |
|
2899 selector notNil ifTrue:[ |
|
2900 aStream nextPutAll:'('. |
|
2901 self printClassNameOn:aStream. |
|
2902 aStream nextPutAll:(' compiledMethodAt:' , selector storeString). |
|
2903 aStream nextPutAll:(') privacy:' , aMethod privacy storeString). |
|
2904 aStream nextPutChunkSeparator. |
|
2905 ] |
|
2906 |
|
2907 "Modified: 27.8.1995 / 22:59:56 / claus" |
|
2908 ! |
|
2909 |
|
2910 addChangeRecordForPrimitiveDefinitions:aClass to:aStream |
|
2911 "append a primitiveDefinitions-record to aStream" |
|
2912 |
|
2913 aStream nextPutAll:aClass name; nextPutAll:' primitiveDefinitions:'''; cr; |
|
2914 nextPutAll:(aClass primitiveDefinitionsString storeString copyFrom:2). |
|
2915 aStream nextPutChunkSeparator. |
|
2916 ! |
|
2917 |
|
2918 addChangeRecordForPrimitiveFunctions:aClass to:aStream |
|
2919 "append a primitiveFunctions-record to aStream" |
|
2920 |
|
2921 aStream nextPutAll:aClass name; nextPutAll:' primitiveFunctions:'''; cr; |
|
2922 nextPutAll:(aClass primitiveFunctionsString storeString copyFrom:2). |
|
2923 aStream nextPutChunkSeparator. |
|
2924 ! |
|
2925 |
|
2926 addChangeRecordForPrimitiveVariables:aClass to:aStream |
|
2927 "append a primitiveVariables-record to aStream" |
|
2928 |
|
2929 aStream nextPutAll:aClass name; nextPutAll:' primitiveVariables:'''; cr; |
|
2930 nextPutAll:(aClass primitiveVariablesString storeString copyFrom:2). |
|
2931 aStream nextPutChunkSeparator. |
|
2932 ! |
|
2933 |
|
2934 addChangeRecordForRemoveSelector:aSelector to:aStream |
|
2935 "append a method-remove-record to aStream" |
|
2936 |
|
2937 self printClassNameOn:aStream. |
|
2938 aStream nextPutAll:(' removeSelector:#' , aSelector). |
|
2939 aStream nextPutChunkSeparator. |
|
2940 ! |
|
2941 |
|
2942 addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream |
|
2943 "append a category-rename record to aStream" |
|
2944 |
|
2945 self printClassNameOn:aStream. |
|
2946 aStream nextPutAll:(' renameCategory:' , oldCategory storeString). |
|
2947 aStream nextPutAll:(' to:' , newCategory storeString). |
|
2948 aStream nextPutChunkSeparator. |
|
2949 ! |
|
2950 |
|
2951 addInfoRecord:aMessage to:aStream |
|
2952 "append an info-record (snapshot, class fileOut etc.) to aStream" |
|
2953 |
|
2954 aStream nextPutAll:('''---- ' , aMessage , ' ', |
|
2955 Date today printString , ' ' , |
|
2956 Time now printString , |
|
2957 ' ----'''). |
|
2958 aStream nextPutChunkSeparator. |
|
2959 ! |
|
2960 |
|
2961 writingChangeDo:aBlock |
|
2962 "common helper to write a change record. |
|
2963 Opens the changefile and executes aBlock passing the stream |
|
2964 as argument. WriteErrors are cought and will lead to a warning. |
|
2965 The changefile is not kept open, to force the change to go to disk |
|
2966 as soon as possible - thus, in case of a crash, no changes should |
|
2967 be lost due to buffering." |
|
2968 |
|
2969 self writingChangeWithTimeStamp:true do:aBlock |
|
2970 |
|
2971 "Modified: 18.11.1995 / 15:43:36 / cg" |
|
2972 ! |
|
2973 |
|
2974 writingChangePerform:aSelector with:anArgument |
|
2975 self writingChangeWithTimeStamp:true perform:aSelector with:anArgument |
|
2976 |
|
2977 "Created: 28.10.1995 / 16:50:48 / cg" |
|
2978 "Modified: 18.11.1995 / 15:44:53 / cg" |
|
2979 ! |
|
2980 |
|
2981 writingChangeWithTimeStamp:doStampIt do:aBlock |
|
2982 "common helper to write a change record. |
|
2983 Opens the changefile and executes aBlock passing the stream |
|
2984 as argument. WriteErrors are cought and will lead to a warning. |
|
2985 The changefile is not kept open, to force the change to go to disk |
|
2986 as soon as possible - thus, in case of a crash, no changes should |
|
2987 be lost due to buffering." |
|
2988 |
|
2989 ChangeFileAccessLock critical:[ |
|
2990 |aStream| |
|
2991 |
|
2992 aStream := self changesStream. |
|
2993 aStream notNil ifTrue:[ |
|
2994 FileStream writeErrorSignal handle:[:ex | |
|
2995 self warn:('could not update the changes-file\\' , ex errorString) withCRs. |
|
2996 ex return |
|
2997 ] do:[ |
|
2998 doStampIt ifTrue:[self addChangeTimeStampTo:aStream]. |
|
2999 aBlock value:aStream. |
|
3000 aStream cr. |
|
3001 ]. |
|
3002 aStream close |
|
3003 ] |
|
3004 ] |
|
3005 |
|
3006 "Created: 18.11.1995 / 15:36:02 / cg" |
|
3007 "Modified: 21.3.1996 / 16:32:30 / cg" |
|
3008 ! |
|
3009 |
|
3010 writingChangeWithTimeStamp:stampIt perform:aSelector with:anArgument |
|
3011 self writingChangeWithTimeStamp:stampIt do:[:stream | |
|
3012 self perform:aSelector with:anArgument with:stream. |
|
3013 ] |
|
3014 |
|
3015 "Created: 18.11.1995 / 15:44:28 / cg" |
|
3016 ! ! |
|
3017 |
|
3018 !Class methodsFor:'private helpers'! |
3009 |
3019 |
3010 addAllCategoriesTo:aCollection |
3020 addAllCategoriesTo:aCollection |
3011 "helper - add categories and all superclasses categories |
3021 "helper - add categories and all superclasses categories |
3012 to the argument, aCollection" |
3022 to the argument, aCollection" |
3013 |
3023 |
3085 ! ! |
3095 ! ! |
3086 |
3096 |
3087 !Class methodsFor:'queries'! |
3097 !Class methodsFor:'queries'! |
3088 |
3098 |
3089 allCategories |
3099 allCategories |
3090 "Return a Collection of all method-category strings known in class |
3100 "Return a collection of all method-categories known in class |
3091 and all superclasses. The returned collection is not sorted by any order." |
3101 and all superclasses. This does NOT include the metaclass categories. |
|
3102 The returned collection is not sorted by any order." |
3092 |
3103 |
3093 |coll| |
3104 |coll| |
3094 |
3105 |
3095 coll := OrderedCollection new. |
3106 coll := OrderedCollection new. |
3096 self addAllCategoriesTo:coll. |
3107 self addAllCategoriesTo:coll. |
3097 ^ coll |
3108 ^ coll |
3098 |
3109 |
3099 " |
3110 " |
3100 Point categories |
3111 Point categories |
3101 Point allCategories |
3112 Point allCategories |
3102 " |
3113 |
|
3114 Point class categories |
|
3115 Point class allCategories |
|
3116 " |
|
3117 |
|
3118 "Modified: 21.3.1996 / 16:28:57 / cg" |
3103 ! |
3119 ! |
3104 |
3120 |
3105 categories |
3121 categories |
3106 "Return a Collection of all method-category strings known in class. |
3122 "Return a collection of all method-categories known in the receiver class. |
|
3123 This does NOT include the metaclasses categories. |
3107 The returned collection is not sorted by any order." |
3124 The returned collection is not sorted by any order." |
3108 |
3125 |
3109 |newList cat| |
3126 |newList cat| |
3110 |
3127 |
3111 newList := OrderedCollection new. |
3128 newList := OrderedCollection new. |
3112 methodArray do:[:aMethod | |
3129 methodArray do:[:aMethod | |
3113 cat := aMethod category. |
3130 cat := aMethod category. |
3114 newList indexOf:cat ifAbsent:[newList add:cat] |
3131 newList indexOf:cat ifAbsent:[newList add:cat] |
3115 ]. |
3132 ]. |
3116 ^ newList |
3133 ^ newList |
3117 |
3134 |
3118 " |
3135 " |
3119 Point categories |
3136 Point categories |
3120 " |
3137 Point class categories |
|
3138 " |
|
3139 |
|
3140 "Modified: 21.3.1996 / 16:28:06 / cg" |
3121 ! |
3141 ! |
3122 |
3142 |
3123 isClass |
3143 isClass |
3124 "return true, if the receiver is some kind of class |
3144 "return true, if the receiver is some kind of class |
3125 (a real class, not just behavior); |
3145 (a real class, not just behavior); |