1354 |
1354 |
1355 |specialMenu m items labels selectors shorties| |
1355 |specialMenu m items labels selectors shorties| |
1356 |
1356 |
1357 currentClassCategory notNil ifTrue:[ |
1357 currentClassCategory notNil ifTrue:[ |
1358 items := #( |
1358 items := #( |
1359 ('fileOut each binary...' classCategoryFileOutBinaryEach ) |
1359 ('fileOut each binary...' classCategoryFileOutBinaryEach ) |
1360 ('-' nil ) |
1360 ('-' nil ) |
1361 ('repository history...' classCategoryRepositoryHistory ) |
1361 ('repository history...' classCategoryRepositoryHistory ) |
1362 ('validate class revisions' classCategoryValidateClassRevisions ) |
1362 ('validate class revisions' classCategoryValidateClassRevisions ) |
1363 ('-' nil ) |
1363 ('-' nil ) |
1364 ('checkin each...' classCategoryCheckinEach ) |
1364 ('checkin each...' classCategoryCheckinEach ) |
1365 ('-' nil ) |
1365 ('-' nil ) |
1366 ('load from repository...' classCategoryLoadFromRepository ) |
1366 ('load from repository...' classCategoryLoadFromRepository ) |
1367 ). |
1367 ). |
1368 ] ifFalse:[ |
1368 ] ifFalse:[ |
1369 items := #( |
1369 items := #( |
1370 ('repository history...' classCategoryRepositoryHistory ) |
1370 ('repository history...' classCategoryRepositoryHistory ) |
1371 ('-' nil ) |
1371 ('-' nil ) |
3051 ('-' nil ) |
3051 ('-' nil ) |
3052 ('primitive definitions' classPrimitiveDefinitions ) |
3052 ('primitive definitions' classPrimitiveDefinitions ) |
3053 ('primitive variables' classPrimitiveVariables ) |
3053 ('primitive variables' classPrimitiveVariables ) |
3054 ('primitive functions' classPrimitiveFunctions ) |
3054 ('primitive functions' classPrimitiveFunctions ) |
3055 ('-' nil ) |
3055 ('-' nil ) |
3056 ('source container...' classModifyContainer ) |
3056 ('package...' classModifyPackage ) |
3057 ('remove source container...' classRemoveContainer ) |
3057 ('source container...' classModifyContainer ) |
|
3058 ('remove source container...' classRemoveContainer ) |
3058 ('-' nil ) |
3059 ('-' nil ) |
3059 ('revision log' classRevisionInfo ) |
3060 ('revision log' classRevisionInfo ) |
3060 ('compare with repository...' classCompareWithRepository ) |
3061 ('compare with repository...' classCompareWithRepository ) |
3061 ('-' nil ) |
3062 ('-' nil ) |
3062 ('check into source repository' classCheckin ) |
3063 ('check into source repository' classCheckin ) |
3063 ('fileIn from repository...' classLoadRevision ) |
3064 ('fileIn from repository...' classLoadRevision ) |
3064 ). |
3065 ). |
3065 ]. |
3066 ]. |
3066 |
3067 |
3067 specialMenu := PopUpMenu itemList:items resources:resources. |
3068 specialMenu := PopUpMenu itemList:items resources:resources. |
3068 |
3069 |
4452 "Created: / 14.11.1995 / 16:43:15 / cg" |
4454 "Created: / 14.11.1995 / 16:43:15 / cg" |
4453 "Modified: / 18.6.1998 / 14:29:40 / cg" |
4455 "Modified: / 18.6.1998 / 14:29:40 / cg" |
4454 ! |
4456 ! |
4455 |
4457 |
4456 classModifyContainer |
4458 classModifyContainer |
4457 "check a class into the source repository" |
4459 "change the classes container in the source repository" |
4458 |
4460 |
4459 currentClass isLoaded ifFalse:[ |
4461 currentClass isLoaded ifFalse:[ |
4460 self warn:'dont know anything about unloaded classes.'. |
4462 self warn:'dont know anything about unloaded classes.'. |
4461 ^ self. |
4463 ^ self. |
4462 ]. |
4464 ]. |
4465 self |
4467 self |
4466 classDefineSourceContainerFor:currentClass |
4468 classDefineSourceContainerFor:currentClass |
4467 title:(resources string:'Repository information for %1' with:currentClass name) |
4469 title:(resources string:'Repository information for %1' with:currentClass name) |
4468 text:'defining/changing the source code container' |
4470 text:'defining/changing the source code container' |
4469 createDirectories:true createContainer:true. |
4471 createDirectories:true createContainer:true. |
|
4472 ] |
|
4473 |
|
4474 "Created: 23.11.1995 / 11:41:38 / cg" |
|
4475 "Modified: 6.2.1996 / 16:58:58 / cg" |
|
4476 ! |
|
4477 |
|
4478 classModifyPackage |
|
4479 "change the classes package assignment (dangerous)" |
|
4480 |
|
4481 |newPackage| |
|
4482 |
|
4483 currentClass isLoaded ifFalse:[ |
|
4484 self warn:'will not change unloaded classes.'. |
|
4485 ^ self. |
|
4486 ]. |
|
4487 |
|
4488 newPackage := Dialog |
|
4489 request:(resources string:'Change the package-ID of ''%1'' to:\\(Warning - this may affect autoloading & source code access)' with:currentClass name asText allBold) withCRs |
|
4490 initialAnswer:currentClass package. |
|
4491 newPackage size == 0 ifTrue:[ |
|
4492 ^ self |
|
4493 ]. |
|
4494 |
|
4495 self doClassMenu:[:currentClass | |
|
4496 currentClass package:newPackage |
4470 ] |
4497 ] |
4471 |
4498 |
4472 "Created: 23.11.1995 / 11:41:38 / cg" |
4499 "Created: 23.11.1995 / 11:41:38 / cg" |
4473 "Modified: 6.2.1996 / 16:58:58 / cg" |
4500 "Modified: 6.2.1996 / 16:58:58 / cg" |
4474 ! |
4501 ! |
9905 "Modified: / 17.6.1998 / 12:44:24 / cg" |
9932 "Modified: / 17.6.1998 / 12:44:24 / cg" |
9906 ! ! |
9933 ! ! |
9907 |
9934 |
9908 !BrowserView methodsFor:'namespace menu'! |
9935 !BrowserView methodsFor:'namespace menu'! |
9909 |
9936 |
|
9937 nameSpaceCheckInEach |
|
9938 |classes| |
|
9939 |
|
9940 (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self]. |
|
9941 |
|
9942 classes := currentNamespace allClasses. |
|
9943 classes isEmpty ifTrue:[ |
|
9944 self warn:(resources |
|
9945 string:'No classes in nameSpace ''%''.' |
|
9946 with:currentNamespace name). |
|
9947 ^ self |
|
9948 ]. |
|
9949 |
|
9950 self withBusyCursorDo:[ |
|
9951 |logMessage classes| |
|
9952 |
|
9953 logMessage := self getLogMessageFor:'(any in nameSpace ', currentNamespace name, ')'. |
|
9954 |
|
9955 logMessage notNil ifTrue:[ |
|
9956 "/ ignore private classes |
|
9957 classes := classes select:[:aClass | aClass owningClass isNil]. |
|
9958 |
|
9959 lastSourceLogMessage := logMessage. |
|
9960 classes do:[:aClass | |
|
9961 self busyLabel:'checking in %1' with:aClass name. |
|
9962 "/ ca does not want boxes to pop up all over ... |
|
9963 InformationSignal handle:[:ex | |
|
9964 Transcript showCR:ex errorString |
|
9965 ] do:[ |
|
9966 self classCheckin:aClass withLog:logMessage |
|
9967 "/ (aClass sourceCodeManager) |
|
9968 "/ checkinClass:aClass |
|
9969 "/ logMessage:logMessage. |
|
9970 ]. |
|
9971 self normalLabel. |
|
9972 ] |
|
9973 ]. |
|
9974 self normalLabel. |
|
9975 ] |
|
9976 |
|
9977 "Created: 23.11.1995 / 11:41:38 / cg" |
|
9978 "Modified: 15.6.1996 / 00:25:58 / stefan" |
|
9979 "Modified: 18.8.1997 / 15:42:21 / cg" |
|
9980 |
|
9981 ! |
|
9982 |
9910 nameSpaceMenu |
9983 nameSpaceMenu |
9911 <resource: #programMenu > |
9984 <resource: #programMenu > |
9912 |
9985 |
9913 |items| |
9986 |items| |
9914 |
9987 |
9915 items := #( ('new namespace' nameSpaceNewNameSpace)). |
9988 items := #( |
|
9989 ('new namespace' nameSpaceNewNameSpace) |
|
9990 ). |
9916 |
9991 |
9917 "/ showAllNamespaces ifTrue:[ |
9992 "/ showAllNamespaces ifTrue:[ |
9918 "/ items := items , #( ('-') ('show topLevel namespaces only' showTopLevelNamespaces)). |
9993 "/ items := items , #( ('-') ('show topLevel namespaces only' showTopLevelNamespaces)). |
9919 "/ ] ifFalse:[ |
9994 "/ ] ifFalse:[ |
9920 "/ items := items , #( ('-') ('show all namespaces' showAllNamespaces)). |
9995 "/ items := items , #( ('-') ('show all namespaces' showAllNamespaces)). |
9924 (currentNamespace notNil |
9999 (currentNamespace notNil |
9925 and:[currentNamespace ~~ Smalltalk |
10000 and:[currentNamespace ~~ Smalltalk |
9926 and:[currentNamespace ~= '* all *']]) ifTrue:[ |
10001 and:[currentNamespace ~= '* all *']]) ifTrue:[ |
9927 "/ is it all empty ? |
10002 "/ is it all empty ? |
9928 currentNamespace allClasses isEmpty ifTrue:[ |
10003 currentNamespace allClasses isEmpty ifTrue:[ |
9929 items := items , #(('-') ('remove' nameSpaceRemove)). |
10004 items := items , #( |
|
10005 ('-') |
|
10006 ('remove' nameSpaceRemove)). |
9930 ] ifFalse:[ |
10007 ] ifFalse:[ |
9931 items := items , #(('-') ('remove all classes' nameSpaceRemoveAllClasses)). |
10008 items := items , #( |
|
10009 ('-') |
|
10010 ('remove all classes' nameSpaceRemoveAllClasses) |
|
10011 ('-') |
|
10012 ('checkin each...' nameSpaceCheckInEach) |
|
10013 ). |
9932 ] |
10014 ] |
9933 ]. |
10015 ]. |
9934 |
10016 |
9935 ^ PopUpMenu itemList:items resources:resources performer:self |
10017 ^ PopUpMenu itemList:items resources:resources performer:self |
9936 |
10018 |
11231 newPkg := oldVsNew value package. |
11313 newPkg := oldVsNew value package. |
11232 answer := OptionBox |
11314 answer := OptionBox |
11233 request: |
11315 request: |
11234 ('You are about to define a class from another (system-) package. |
11316 ('You are about to define a class from another (system-) package. |
11235 The classes original packageID was ''%1''. |
11317 The classes original packageID was ''%1''. |
11236 If you proceed, the new class will be marked as belonging |
11318 If you proceed with ''%3'', the new class will be marked as belonging |
11237 to the ''%2'' package (and this warning will not be shown again). |
11319 to the ''%2'' package (and this warning will not be shown again). |
11238 If you proceed with ''keep'', the class will be installed |
11320 If you proceed with ''%4'', the class will be installed |
11239 but the old packageID will be preserved. |
11321 but the old packageID will be preserved. |
11240 Otherwise, hit ''cancel'' to leave the class unchanged. |
11322 Otherwise, hit ''%5'' to leave the class unchanged. |
11241 |
11323 |
11242 PS: you can disable these checks in the launchers settings-compilation dialog.' |
11324 PS: you can disable these checks in the launchers settings-compilation dialog.' |
11243 bindWith:(oldPkg asText allBold) |
11325 bindWith:(oldPkg asText allBold) |
11244 with:(newPkg asText allBold)) |
11326 with:(newPkg asText allBold) |
|
11327 with:(resources string:'continue') |
|
11328 with:(resources string:'keep') |
|
11329 with:(resources string:'cancel')) |
11245 |
11330 |
11246 label:'Class redefinition' |
11331 label:'Class redefinition' |
11247 form:(WarningBox iconBitmap) |
11332 form:(WarningBox iconBitmap) |
11248 buttonLabels:#('cancel' 'keep' 'continue') |
11333 buttonLabels:#('cancel' 'keep' 'continue') |
11249 values:#(#cancel #keep #continue) |
11334 values:#(#cancel #keep #continue) |