10 hereby transferred. |
10 hereby transferred. |
11 " |
11 " |
12 |
12 |
13 StandardSystemView subclass:#BrowserView |
13 StandardSystemView subclass:#BrowserView |
14 instanceVariableNames:'classCategoryListView classListView methodCategoryListView |
14 instanceVariableNames:'classCategoryListView classListView methodCategoryListView |
15 methodListView classMethodListView codeView classToggle |
15 methodListView classMethodListView codeView classToggle |
16 instanceToggle currentClassCategory currentClassHierarchy |
16 instanceToggle currentClassCategory currentClassHierarchy |
17 currentClass currentMethodCategory currentMethod currentSelector |
17 currentClass currentMethodCategory currentMethod currentSelector |
18 showInstance actualClass fullClass lastMethodCategory aspect |
18 showInstance actualClass fullClass lastMethodCategory aspect |
19 variableListView fullProtocol lockUpdates autoSearch myLabel |
19 variableListView fullProtocol lockUpdates autoSearch myLabel |
20 acceptClass lastSourceLogMessage' |
20 acceptClass lastSourceLogMessage' |
21 classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon' |
21 classVariableNames:'CheckForInstancesWhenRemovingClasses RememberAspect DefaultIcon' |
22 poolDictionaries:'' |
22 poolDictionaries:'' |
23 category:'Interface-Browsers' |
23 category:'Interface-Browsers' |
24 ! |
24 ! |
25 |
25 |
1087 |
1087 |
1088 |labels selectors m| |
1088 |labels selectors m| |
1089 |
1089 |
1090 (device ctrlDown |
1090 (device ctrlDown |
1091 and:[currentClass notNil]) ifTrue:[ |
1091 and:[currentClass notNil]) ifTrue:[ |
1092 labels := #( |
1092 labels := #( |
1093 'inspect class' |
1093 'inspect class' |
1094 '-' |
1094 '-' |
1095 'primitive definitions' |
1095 'primitive definitions' |
1096 'primitive variables' |
1096 'primitive variables' |
1097 'primitive functions' |
1097 'primitive functions' |
1098 ). |
1098 ). |
1099 selectors := #( |
1099 selectors := #( |
1100 classInspect |
1100 classInspect |
1101 nil |
1101 nil |
1102 classPrimitiveDefinitions |
1102 classPrimitiveDefinitions |
1103 classPrimitiveVariables |
1103 classPrimitiveVariables |
1104 classPrimitiveFunctions |
1104 classPrimitiveFunctions |
1105 ). |
1105 ). |
1106 |
1106 |
1107 labels := labels , #( |
1107 labels := labels , #( |
1108 '-' |
1108 '-' |
1109 'revision info' |
1109 'revision info' |
1110 'compare with repository' |
1110 'compare with repository' |
1111 '-' |
1111 '-' |
1112 'check into source repository' |
1112 'check into source repository' |
1113 'fileIn from repository' |
1113 'fileIn from repository' |
1114 ). |
1114 ). |
1115 |
1115 |
1116 selectors := selectors , #( |
1116 selectors := selectors , #( |
1117 nil |
1117 nil |
1118 classRevisionInfo |
1118 classRevisionInfo |
1119 classCompareWithNewestInRepository |
1119 classCompareWithNewestInRepository |
1120 nil |
1120 nil |
1121 classCheckin |
1121 classCheckin |
1122 classLoadRevision |
1122 classLoadRevision |
1123 ). |
1123 ). |
1124 ] ifFalse:[ |
1124 ] ifFalse:[ |
1125 currentClass isNil ifTrue:[ |
1125 currentClass isNil ifTrue:[ |
1126 labels := #( |
1126 labels := #( |
1127 'new class' |
1127 'new class' |
1128 ). |
1128 ). |
1129 selectors := #( |
1129 selectors := #( |
1130 classNewClass |
1130 classNewClass |
1131 ). |
1131 ). |
1132 ] ifFalse:[ |
1132 ] ifFalse:[ |
1133 currentClass isLoaded ifFalse:[ |
1133 currentClass isLoaded ifFalse:[ |
1134 labels := #( |
1134 labels := #( |
1135 'new class' |
1135 'definition' |
1136 '-' |
1136 '-' |
1137 'load ' |
1137 'new class' |
1138 ). |
1138 '-' |
1139 selectors := #( |
1139 'load ' |
1140 classNewClass |
1140 ). |
1141 nil |
1141 selectors := #( |
1142 classLoad |
1142 classDefinition |
1143 ). |
1143 nil |
1144 ] ifTrue:[ |
1144 classNewClass |
1145 fullProtocol ifTrue:[ |
1145 nil |
1146 labels := #( |
1146 classLoad |
1147 'hierarchy' |
1147 ). |
1148 'definition' |
1148 ] ifTrue:[ |
1149 'comment' |
1149 fullProtocol ifTrue:[ |
1150 'class instvars' |
1150 labels := #( |
1151 ). |
1151 'hierarchy' |
1152 selectors := #( |
1152 'definition' |
1153 classHierarchy |
1153 'comment' |
1154 classDefinition |
1154 'class instvars' |
1155 classComment |
1155 ). |
1156 classClassInstVars |
1156 selectors := #( |
1157 ). |
1157 classHierarchy |
1158 ] ifFalse:[ |
1158 classDefinition |
1159 labels := #( |
1159 classComment |
1160 'fileOut' |
1160 classClassInstVars |
1161 'printOut' |
1161 ). |
1162 'printOut protocol' |
1162 ] ifFalse:[ |
1163 " 'printOut full protocol' " |
1163 labels := #( |
1164 '-' |
1164 'fileOut' |
1165 'SPAWN_CLASS' |
1165 'printOut' |
1166 'spawn full protocol' |
1166 'printOut protocol' |
1167 'spawn hierarchy' |
1167 " 'printOut full protocol' " |
1168 'spawn subclasses' |
1168 '-' |
1169 '-' |
1169 'SPAWN_CLASS' |
1170 ). |
1170 'spawn full protocol' |
1171 selectors := #( |
1171 'spawn hierarchy' |
1172 classFileOut |
1172 'spawn subclasses' |
1173 classPrintOut |
1173 '-' |
1174 classPrintOutProtocol |
1174 ). |
1175 " classPrintOutFullProtocol " |
1175 selectors := #( |
1176 nil |
1176 classFileOut |
1177 classSpawn |
1177 classPrintOut |
1178 classSpawnFullProtocol |
1178 classPrintOutProtocol |
1179 classSpawnHierarchy |
1179 " classPrintOutFullProtocol " |
1180 classSpawnSubclasses |
1180 nil |
1181 nil |
1181 classSpawn |
1182 ). |
1182 classSpawnFullProtocol |
1183 |
1183 classSpawnHierarchy |
1184 fullClass ifFalse:[ |
1184 classSpawnSubclasses |
1185 labels := labels , #( |
1185 nil |
1186 'hierarchy' |
1186 ). |
1187 'definition' |
1187 |
1188 'comment' |
1188 fullClass ifFalse:[ |
1189 'class instvars' |
1189 labels := labels , #( |
1190 "/ 'protocols' |
1190 'hierarchy' |
1191 '-' |
1191 'definition' |
1192 ). |
1192 'comment' |
1193 selectors := selectors , #( |
1193 'class instvars' |
1194 classHierarchy |
1194 "/ 'protocols' |
1195 classDefinition |
1195 '-' |
1196 classComment |
1196 ). |
1197 classClassInstVars |
1197 selectors := selectors , #( |
1198 "/ classProtocols |
1198 classHierarchy |
1199 nil |
1199 classDefinition |
1200 ). |
1200 classComment |
1201 ]. |
1201 classClassInstVars |
1202 |
1202 "/ classProtocols |
1203 labels := labels , #( |
1203 nil |
1204 "/ 'variable search' |
1204 ). |
1205 'class refs' |
1205 ]. |
1206 '-' |
1206 |
1207 'new class' |
1207 labels := labels , #( |
1208 'new subclass' |
1208 "/ 'variable search' |
1209 'rename ...' |
1209 'class refs' |
1210 'remove' |
1210 '-' |
1211 ). |
1211 'new class' |
1212 selectors := selectors , #( |
1212 'new subclass' |
1213 "/ variables |
1213 'rename ...' |
1214 classRefs |
1214 'remove' |
1215 nil |
1215 ). |
1216 classNewClass |
1216 selectors := selectors , #( |
1217 classNewSubclass |
1217 "/ variables |
1218 classRename |
1218 classRefs |
1219 classRemove |
1219 nil |
1220 ). |
1220 classNewClass |
1221 currentClass wasAutoloaded ifTrue:[ |
1221 classNewSubclass |
1222 labels := labels , #( |
1222 classRename |
1223 'unload' |
1223 classRemove |
1224 ). |
1224 ). |
1225 selectors := selectors , #( |
1225 currentClass wasAutoloaded ifTrue:[ |
1226 classUnload |
1226 labels := labels , #( |
1227 ). |
1227 'unload' |
1228 ] |
1228 ). |
1229 ] |
1229 selectors := selectors , #( |
1230 ]. |
1230 classUnload |
1231 ]. |
1231 ). |
|
1232 ] |
|
1233 ] |
|
1234 ]. |
|
1235 ]. |
1232 ]. |
1236 ]. |
1233 |
1237 |
1234 |
1238 |
1235 m := PopUpMenu |
1239 m := PopUpMenu |
1236 labels:(resources array:labels) |
1240 labels:(resources array:labels) |
1237 selectors:selectors. |
1241 selectors:selectors. |
1238 |
1242 |
1239 (currentClass isNil |
1243 (currentClass isNil |
1240 or:[currentClass sourceCodeManager isNil]) ifTrue:[ |
1244 or:[currentClass sourceCodeManager isNil]) ifTrue:[ |
1241 m disableAll:#(classRevisionInfo classLoadRevision classCheckin classCompareWithNewestInRepository). |
1245 m disableAll:#(classRevisionInfo classLoadRevision classCheckin classCompareWithNewestInRepository). |
1242 ]. |
1246 ]. |
1243 |
1247 |
1244 ^ m |
1248 ^ m |
1245 |
1249 |
1246 "Modified: 7.12.1995 / 13:19:57 / cg" |
1250 "Modified: 7.12.1995 / 23:56:14 / cg" |
1247 ! |
1251 ! |
1248 |
1252 |
1249 classNewClass |
1253 classNewClass |
1250 "create a class-definition prototype in codeview" |
1254 "create a class-definition prototype in codeview" |
1251 |
1255 |
1622 self doClassMenu:[:currentClass | aBlock value:currentClass value:sel] |
1626 self doClassMenu:[:currentClass | aBlock value:currentClass value:sel] |
1623 ! ! |
1627 ! ! |
1624 |
1628 |
1625 !BrowserView methodsFor:'class list source administration'! |
1629 !BrowserView methodsFor:'class list source administration'! |
1626 |
1630 |
1627 classCreateSourceContainerFor:aClass |
|
1628 "let user specify the source-repository values for aClass" |
|
1629 |
|
1630 |box |
|
1631 moduleDirectory subDirectory |
|
1632 fileName specialFlags |
|
1633 check y component info fn project| |
|
1634 |
|
1635 moduleDirectory := 'stx' asValue. |
|
1636 subDirectory := '' asValue. |
|
1637 |
|
1638 (Project notNil and:[(project := Project current) notNil]) ifTrue:[ |
|
1639 subDirectory value:(project name) |
|
1640 ]. |
|
1641 |
|
1642 info := (aClass sourceCodeManager) sourceInfoOfClass:aClass. |
|
1643 info notNil ifTrue:[ |
|
1644 (info includesKey:#module) ifTrue:[ |
|
1645 moduleDirectory value:(info at:#module). |
|
1646 ]. |
|
1647 (info includesKey:#directory) ifTrue:[ |
|
1648 subDirectory value:(info at:#directory). |
|
1649 ]. |
|
1650 (info includesKey:#expectedFileName) ifTrue:[ |
|
1651 fn := (info at:#expectedFileName). |
|
1652 ] ifFalse:[ |
|
1653 (info includesKey:#classFileName) ifTrue:[ |
|
1654 fn := (info at:#classFileName). |
|
1655 ] |
|
1656 ] |
|
1657 ]. |
|
1658 |
|
1659 fn isNil ifTrue:[ |
|
1660 fn := (Smalltalk fileNameForClass:aClass) , '.st'. |
|
1661 ]. |
|
1662 "/ |
|
1663 "/ should check for conflicts ... |
|
1664 "/ |
|
1665 |
|
1666 fileName := fn asValue. |
|
1667 |
|
1668 box := DialogBox new. |
|
1669 box label:(resources string:'Repository information for %1' with:aClass name). |
|
1670 |
|
1671 component := box addTextLabel:(resources string:'CREATE_REPOSITORY' with:currentClass name) withCRs. |
|
1672 component adjust:#left; borderWidth:0. |
|
1673 |
|
1674 y := box yPosition. |
|
1675 component := box addTextLabel:(resources string:'Module:'). |
|
1676 component width:0.5; adjust:#right. |
|
1677 box yPosition:y. |
|
1678 component := box addInputFieldOn:moduleDirectory tabable:true. |
|
1679 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1680 |
|
1681 box addVerticalSpace. |
|
1682 y := box yPosition. |
|
1683 component := box addTextLabel:'Package:'. |
|
1684 component width:0.5; adjust:#right. |
|
1685 box yPosition:y. |
|
1686 component := box addInputFieldOn:subDirectory tabable:true. |
|
1687 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1688 |
|
1689 box addVerticalSpace. |
|
1690 y := box yPosition. |
|
1691 component := box addTextLabel:'Filename:'. |
|
1692 component width:0.5; adjust:#right. |
|
1693 box yPosition:y. |
|
1694 component := box addInputFieldOn:fileName tabable:true. |
|
1695 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1696 |
|
1697 box addVerticalSpace. |
|
1698 box addVerticalSpace. |
|
1699 |
|
1700 box addAbortButton; addOkButton. |
|
1701 |
|
1702 box showAtPointer. |
|
1703 |
|
1704 box accepted ifTrue:[ |
|
1705 self halt. |
|
1706 ] |
|
1707 |
|
1708 "Modified: 7.12.1995 / 13:18:37 / cg" |
|
1709 ! |
|
1710 |
|
1711 classCheckin |
1631 classCheckin |
1712 "check a class into the source repository" |
1632 "check a class into the source repository" |
1713 |
1633 |
1714 self doClassMenu:[:currentClass | |
1634 self doClassMenu:[:currentClass | |
1715 |logMessage info mgr| |
1635 |logMessage info mgr| |
1782 |
1702 |
1783 "Created: 14.11.1995 / 16:43:15 / cg" |
1703 "Created: 14.11.1995 / 16:43:15 / cg" |
1784 "Modified: 7.12.1995 / 13:18:12 / cg" |
1704 "Modified: 7.12.1995 / 13:18:12 / cg" |
1785 ! |
1705 ! |
1786 |
1706 |
1787 classRevisionInfo |
1707 classCreateSourceContainerFor:aClass |
1788 "show current classes revision info in codeView" |
1708 "let user specify the source-repository values for aClass" |
1789 |
1709 |
1790 self doClassMenu:[:currentClass | |
1710 |box |
1791 |aStream info info2 s rv mgr| |
1711 moduleDirectory subDirectory |
1792 |
1712 fileName specialFlags |
1793 aStream := WriteStream on:(String new:200). |
1713 check y component info fn project| |
1794 currentClass notNil ifTrue:[ |
1714 |
1795 self busyLabel:'extracting revision info' with:nil. |
1715 moduleDirectory := 'stx' asValue. |
1796 info := currentClass revisionInfo. |
1716 subDirectory := '' asValue. |
1797 |
1717 |
1798 rv := currentClass binaryRevision. |
1718 (Project notNil and:[(project := Project current) notNil]) ifTrue:[ |
1799 rv notNil ifTrue:[ |
1719 subDirectory value:(project name) |
1800 aStream nextPutAll:'**** Loaded classes binary information ****'; cr; cr. |
1720 ]. |
1801 aStream nextPutAll:' Binary based upon : ' , rv; cr. |
1721 |
1802 aStream cr. |
1722 info := (aClass sourceCodeManager) sourceInfoOfClass:aClass. |
1803 ]. |
1723 info notNil ifTrue:[ |
1804 |
1724 (info includesKey:#module) ifTrue:[ |
1805 info notNil ifTrue:[ |
1725 moduleDirectory value:(info at:#module). |
1806 aStream nextPutAll:'**** Classes source information ****'; cr; cr. |
1726 ]. |
1807 s := info at:#repositoryPath ifAbsent:nil. |
1727 (info includesKey:#directory) ifTrue:[ |
1808 s notNil ifTrue:[ |
1728 subDirectory value:(info at:#directory). |
1809 aStream nextPut:' Source repository : ' , s; cr |
1729 ]. |
1810 ]. |
1730 (info includesKey:#expectedFileName) ifTrue:[ |
1811 aStream nextPutAll:' Filename ........ : ' , (info at:#fileName ifAbsent:'?'); cr. |
1731 fn := (info at:#expectedFileName). |
1812 aStream nextPutAll:' Revision ........ : ' , (info at:#revision ifAbsent:'?'); cr. |
1732 ] ifFalse:[ |
1813 aStream nextPutAll:' Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?'); cr. |
1733 (info includesKey:#classFileName) ifTrue:[ |
1814 aStream nextPutAll:' Checkin user .... : ' , (info at:#user ifAbsent:'?'); cr. |
1734 fn := (info at:#classFileName). |
1815 |
|
1816 (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[ |
|
1817 aStream nextPutAll:' Repository: ..... : ' , (info2 at:#module ifAbsent:'?'); cr. |
|
1818 aStream nextPutAll:' Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'); cr. |
|
1819 ]. |
|
1820 aStream nextPutAll:' Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?'); cr. |
|
1821 aStream cr. |
|
1822 |
|
1823 (mgr := currentClass sourceCodeManager) notNil ifTrue:[ |
|
1824 aStream nextPutAll:'**** Repository information ****'; cr; cr. |
|
1825 mgr writeRevisionLogOf:currentClass to:aStream. |
|
1826 ] |
|
1827 ] ifFalse:[ |
|
1828 aStream nextPutAll:'No revision info found' |
|
1829 ] |
1735 ] |
1830 ]. |
1736 ] |
1831 codeView contents:(aStream contents). |
1737 ]. |
1832 |
1738 |
1833 codeView modified:false. |
1739 fn isNil ifTrue:[ |
1834 codeView acceptAction:nil. |
1740 fn := (Smalltalk fileNameForClass:aClass) , '.st'. |
1835 codeView explainAction:nil. |
1741 ]. |
1836 methodListView notNil ifTrue:[ |
1742 "/ |
1837 methodListView deselect |
1743 "/ should check for conflicts ... |
1838 ]. |
1744 "/ |
1839 aspect := #revisionInfo. |
1745 |
1840 self normalLabel |
1746 fileName := fn asValue. |
1841 ] |
1747 |
1842 |
1748 box := DialogBox new. |
1843 "Created: 14.11.1995 / 16:43:15 / cg" |
1749 box label:(resources string:'Repository information for %1' with:aClass name). |
1844 "Modified: 7.12.1995 / 13:20:42 / cg" |
1750 |
|
1751 component := box addTextLabel:(resources string:'CREATE_REPOSITORY' with:currentClass name) withCRs. |
|
1752 component adjust:#left; borderWidth:0. |
|
1753 |
|
1754 y := box yPosition. |
|
1755 component := box addTextLabel:(resources string:'Module:'). |
|
1756 component width:0.5; adjust:#right. |
|
1757 box yPosition:y. |
|
1758 component := box addInputFieldOn:moduleDirectory tabable:true. |
|
1759 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1760 |
|
1761 box addVerticalSpace. |
|
1762 y := box yPosition. |
|
1763 component := box addTextLabel:'Package:'. |
|
1764 component width:0.5; adjust:#right. |
|
1765 box yPosition:y. |
|
1766 component := box addInputFieldOn:subDirectory tabable:true. |
|
1767 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1768 |
|
1769 box addVerticalSpace. |
|
1770 y := box yPosition. |
|
1771 component := box addTextLabel:'Filename:'. |
|
1772 component width:0.5; adjust:#right. |
|
1773 box yPosition:y. |
|
1774 component := box addInputFieldOn:fileName tabable:true. |
|
1775 component width:0.5; left:0.5; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine. |
|
1776 |
|
1777 box addVerticalSpace. |
|
1778 box addVerticalSpace. |
|
1779 |
|
1780 box addAbortButton; addOkButton. |
|
1781 |
|
1782 box showAtPointer. |
|
1783 |
|
1784 box accepted ifTrue:[ |
|
1785 self halt. |
|
1786 ] |
|
1787 |
|
1788 "Modified: 7.12.1995 / 13:18:37 / cg" |
1845 ! |
1789 ! |
1846 |
1790 |
1847 classLoadRevision |
1791 classLoadRevision |
1848 "load a specific revision into the system - especially useful to |
1792 "load a specific revision into the system - especially useful to |
1849 upgrade a class to the newest revision" |
1793 upgrade a class to the newest revision" |
1881 ] |
1825 ] |
1882 ] |
1826 ] |
1883 |
1827 |
1884 "Created: 14.11.1995 / 16:43:15 / cg" |
1828 "Created: 14.11.1995 / 16:43:15 / cg" |
1885 "Modified: 7.12.1995 / 13:19:06 / cg" |
1829 "Modified: 7.12.1995 / 13:19:06 / cg" |
|
1830 ! |
|
1831 |
|
1832 classRevisionInfo |
|
1833 "show current classes revision info in codeView" |
|
1834 |
|
1835 self doClassMenu:[:currentClass | |
|
1836 |aStream info info2 s rv mgr| |
|
1837 |
|
1838 aStream := WriteStream on:(String new:200). |
|
1839 currentClass notNil ifTrue:[ |
|
1840 self busyLabel:'extracting revision info' with:nil. |
|
1841 info := currentClass revisionInfo. |
|
1842 |
|
1843 rv := currentClass binaryRevision. |
|
1844 rv notNil ifTrue:[ |
|
1845 aStream nextPutAll:'**** Loaded classes binary information ****'; cr; cr. |
|
1846 aStream nextPutAll:' Binary based upon : ' , rv; cr. |
|
1847 aStream cr. |
|
1848 ]. |
|
1849 |
|
1850 info notNil ifTrue:[ |
|
1851 aStream nextPutAll:'**** Classes source information ****'; cr; cr. |
|
1852 s := info at:#repositoryPath ifAbsent:nil. |
|
1853 s notNil ifTrue:[ |
|
1854 aStream nextPut:' Source repository : ' , s; cr |
|
1855 ]. |
|
1856 aStream nextPutAll:' Filename ........ : ' , (info at:#fileName ifAbsent:'?'); cr. |
|
1857 aStream nextPutAll:' Revision ........ : ' , (info at:#revision ifAbsent:'?'); cr. |
|
1858 aStream nextPutAll:' Checkin date .... : ' , (info at:#date ifAbsent:'?') , ' ' , (info at:#time ifAbsent:'?'); cr. |
|
1859 aStream nextPutAll:' Checkin user .... : ' , (info at:#user ifAbsent:'?'); cr. |
|
1860 |
|
1861 (info2 := currentClass packageSourceCodeInfo) notNil ifTrue:[ |
|
1862 aStream nextPutAll:' Repository: ..... : ' , (info2 at:#module ifAbsent:'?'); cr. |
|
1863 aStream nextPutAll:' Directory: ...... : ' , (info2 at:#directory ifAbsent:'?'); cr. |
|
1864 ]. |
|
1865 aStream nextPutAll:' Container ....... : ' , (info at:#repositoryPathName ifAbsent:'?'); cr. |
|
1866 aStream cr. |
|
1867 |
|
1868 (mgr := currentClass sourceCodeManager) notNil ifTrue:[ |
|
1869 aStream nextPutAll:'**** Repository information ****'; cr; cr. |
|
1870 mgr writeRevisionLogOf:currentClass to:aStream. |
|
1871 ] |
|
1872 ] ifFalse:[ |
|
1873 aStream nextPutAll:'No revision info found'; cr. |
|
1874 currentClass isLoaded ifFalse:[ |
|
1875 aStream cr; nextPutAll:'This is an autoloaded class - you may see more after its loaded.' |
|
1876 ] |
|
1877 ] |
|
1878 ]. |
|
1879 codeView contents:(aStream contents). |
|
1880 |
|
1881 codeView modified:false. |
|
1882 codeView acceptAction:nil. |
|
1883 codeView explainAction:nil. |
|
1884 methodListView notNil ifTrue:[ |
|
1885 methodListView deselect |
|
1886 ]. |
|
1887 aspect := #revisionInfo. |
|
1888 self normalLabel |
|
1889 ] |
|
1890 |
|
1891 "Created: 14.11.1995 / 16:43:15 / cg" |
|
1892 "Modified: 7.12.1995 / 23:54:04 / cg" |
1886 ! ! |
1893 ! ! |
1887 |
1894 |
1888 !BrowserView methodsFor:'class stuff'! |
1895 !BrowserView methodsFor:'class stuff'! |
1889 |
1896 |
1890 checkClassSelected |
1897 checkClassSelected |
4961 "set the title for some warning" |
4968 "set the title for some warning" |
4962 |
4969 |
4963 self label:('System Browser - ' , (resources string:what with:someArgument)) |
4970 self label:('System Browser - ' , (resources string:what with:someArgument)) |
4964 ! |
4971 ! |
4965 |
4972 |
4966 checkSelectionChangeAllowedWithCompare:compareOffered |
|
4967 "return true, if selection change is ok; |
|
4968 its not ok, if code has been changed. |
|
4969 in this case, return the result of a user query" |
|
4970 |
|
4971 |action labels values| |
|
4972 |
|
4973 codeView modified ifFalse:[ |
|
4974 ^ true |
|
4975 ]. |
|
4976 |
|
4977 compareOffered ifTrue:[ |
|
4978 labels := #('abort' 'compare' 'accept' 'continue'). |
|
4979 values := #(false #compare #accept true). |
|
4980 ] ifFalse:[ |
|
4981 labels := #('abort' 'accept' 'continue'). |
|
4982 values := #(false #accept true). |
|
4983 ]. |
|
4984 |
|
4985 action := OptionBox |
|
4986 request:(resources at:'text has not been accepted.\\Your modifications will be lost when continuing.') withCRs |
|
4987 label:(resources string:'Attention') |
|
4988 form:(WarningBox iconBitmap) |
|
4989 buttonLabels:(resources array:labels) |
|
4990 values:values |
|
4991 default:true. |
|
4992 action ~~ #accept ifTrue:[ |
|
4993 ^ action |
|
4994 ]. |
|
4995 codeView accept. |
|
4996 ^ true |
|
4997 |
|
4998 "Created: 24.11.1995 / 10:54:46 / cg" |
|
4999 ! |
|
5000 |
|
5001 checkSelectionChangeAllowed |
4973 checkSelectionChangeAllowed |
5002 "return true, if selection change is ok; |
4974 "return true, if selection change is ok; |
5003 its not ok, if code has been changed. |
4975 its not ok, if code has been changed. |
5004 in this case, return the result of a user query" |
4976 in this case, return the result of a user query" |
5005 |
4977 |
5024 |
4996 |
5025 ^ self checkSelectionChangeAllowedWithCompare:false |
4997 ^ self checkSelectionChangeAllowedWithCompare:false |
5026 |
4998 |
5027 "Created: 24.11.1995 / 11:03:33 / cg" |
4999 "Created: 24.11.1995 / 11:03:33 / cg" |
5028 "Modified: 24.11.1995 / 11:05:49 / cg" |
5000 "Modified: 24.11.1995 / 11:05:49 / cg" |
|
5001 ! |
|
5002 |
|
5003 checkSelectionChangeAllowedWithCompare:compareOffered |
|
5004 "return true, if selection change is ok; |
|
5005 its not ok, if code has been changed. |
|
5006 in this case, return the result of a user query" |
|
5007 |
|
5008 |action labels values| |
|
5009 |
|
5010 codeView modified ifFalse:[ |
|
5011 ^ true |
|
5012 ]. |
|
5013 |
|
5014 compareOffered ifTrue:[ |
|
5015 labels := #('abort' 'compare' 'accept' 'continue'). |
|
5016 values := #(false #compare #accept true). |
|
5017 ] ifFalse:[ |
|
5018 labels := #('abort' 'accept' 'continue'). |
|
5019 values := #(false #accept true). |
|
5020 ]. |
|
5021 |
|
5022 action := OptionBox |
|
5023 request:(resources at:'text has not been accepted.\\Your modifications will be lost when continuing.') withCRs |
|
5024 label:(resources string:'Attention') |
|
5025 form:(WarningBox iconBitmap) |
|
5026 buttonLabels:(resources array:labels) |
|
5027 values:values |
|
5028 default:true. |
|
5029 action ~~ #accept ifTrue:[ |
|
5030 ^ action |
|
5031 ]. |
|
5032 codeView accept. |
|
5033 ^ true |
|
5034 |
|
5035 "Created: 24.11.1995 / 10:54:46 / cg" |
5029 ! |
5036 ! |
5030 |
5037 |
5031 classHierarchyDo:aBlock |
5038 classHierarchyDo:aBlock |
5032 "eavluate the 2-arg block for every class, |
5039 "eavluate the 2-arg block for every class, |
5033 starting at Object; passing class and nesting level to the block." |
5040 starting at Object; passing class and nesting level to the block." |