BrowserView.st
changeset 2056 4f78683e96ac
parent 2050 5ef6404d6172
child 2057 7a948179f949
--- a/BrowserView.st	Sat Mar 06 13:25:40 1999 +0100
+++ b/BrowserView.st	Sun Mar 07 16:05:27 1999 +0100
@@ -1356,14 +1356,14 @@
 
     currentClassCategory notNil ifTrue:[
         items :=  #(
-                    ('fileOut each binary...'   classCategoryFileOutBinaryEach      )
+                    ('fileOut each binary...'    classCategoryFileOutBinaryEach      )
                     ('-'                         nil                                 )
-                    ('repository history...'    classCategoryRepositoryHistory      )
+                    ('repository history...'     classCategoryRepositoryHistory      )
                     ('validate class revisions'  classCategoryValidateClassRevisions )
                     ('-'                         nil                                 )
-                    ('checkin each...'          classCategoryCheckinEach            )
+                    ('checkin each...'           classCategoryCheckinEach            )
                     ('-'                         nil                                 )
-                    ('load from repository...'  classCategoryLoadFromRepository     )
+                    ('load from repository...'   classCategoryLoadFromRepository     )
                    ).
     ] ifFalse:[
         items :=  #(
@@ -3053,14 +3053,15 @@
                        ('primitive variables'          classPrimitiveVariables      )
                        ('primitive functions'          classPrimitiveFunctions      )
                        ('-'                            nil                          )
-                       ('source container...'         classModifyContainer         )
-                       ('remove source container...'  classRemoveContainer         )
+                       ('package...'                   classModifyPackage         )
+                       ('source container...'          classModifyContainer         )
+                       ('remove source container...'   classRemoveContainer         )
                        ('-'                            nil                          )
                        ('revision log'                 classRevisionInfo            )
-                       ('compare with repository...'  classCompareWithRepository   )
+                       ('compare with repository...'   classCompareWithRepository   )
                        ('-'                            nil                          )
                        ('check into source repository' classCheckin                 )
-                       ('fileIn from repository...'   classLoadRevision            )
+                       ('fileIn from repository...'    classLoadRevision            )
                     ).
     ].
 
@@ -3103,6 +3104,7 @@
                                      classFileOutBinary
                                      classMakePrivate
                                      classMakePublic
+                                     classModifyPackage
                                      classModifyContainer 
                                      classRemoveContainer
                                      classRevisionInfo 
@@ -4454,7 +4456,7 @@
 !
 
 classModifyContainer
-    "check a class into the source repository"
+    "change the classes container in the source repository"
 
     currentClass isLoaded ifFalse:[
         self warn:'dont know anything about unloaded classes.'.
@@ -4473,6 +4475,31 @@
     "Modified: 6.2.1996 / 16:58:58 / cg"
 !
 
+classModifyPackage
+    "change the classes package assignment (dangerous)"
+
+    |newPackage|
+
+    currentClass isLoaded ifFalse:[
+        self warn:'will not change unloaded classes.'.
+        ^ self.
+    ].
+
+    newPackage := Dialog 
+                    request:(resources string:'Change the package-ID of ''%1'' to:\\(Warning - this may affect autoloading & source code access)' with:currentClass name asText allBold) withCRs
+                    initialAnswer:currentClass package.
+    newPackage size == 0 ifTrue:[
+        ^ self
+    ].
+
+    self doClassMenu:[:currentClass |
+        currentClass package:newPackage
+    ]
+
+    "Created: 23.11.1995 / 11:41:38 / cg"
+    "Modified: 6.2.1996 / 16:58:58 / cg"
+!
+
 classRemoveContainer
     "remove a container from the source repository"
 
@@ -9907,12 +9934,60 @@
 
 !BrowserView methodsFor:'namespace menu'!
 
+nameSpaceCheckInEach
+    |classes|
+
+    (self checkSelectionChangeAllowedWithCompare:false) ifFalse:[^ self].
+
+    classes := currentNamespace allClasses.
+    classes isEmpty ifTrue:[
+        self warn:(resources 
+                        string:'No classes in nameSpace ''%''.'
+                        with:currentNamespace name).
+        ^ self
+    ].
+
+    self withBusyCursorDo:[
+        |logMessage classes|
+
+        logMessage := self getLogMessageFor:'(any in nameSpace ', currentNamespace name, ')'.
+
+        logMessage notNil ifTrue:[
+            "/ ignore private classes
+            classes := classes select:[:aClass | aClass owningClass isNil].
+
+            lastSourceLogMessage := logMessage.
+            classes do:[:aClass |
+                self busyLabel:'checking in %1' with:aClass name.
+                "/ ca does not want boxes to pop up all over ...
+                InformationSignal handle:[:ex |
+                    Transcript showCR:ex errorString
+                ] do:[
+                    self classCheckin:aClass withLog:logMessage
+"/                    (aClass sourceCodeManager) 
+"/                        checkinClass:aClass 
+"/                        logMessage:logMessage.
+                ].
+                self normalLabel.
+            ]
+        ].
+        self normalLabel.
+    ]
+
+    "Created: 23.11.1995 / 11:41:38 / cg"
+    "Modified: 15.6.1996 / 00:25:58 / stefan"
+    "Modified: 18.8.1997 / 15:42:21 / cg"
+
+!
+
 nameSpaceMenu
     <resource: #programMenu >
 
     |items|
 
-    items := #( ('new namespace' nameSpaceNewNameSpace)).
+    items := #( 
+                ('new namespace' nameSpaceNewNameSpace)
+              ).
 
 "/    showAllNamespaces ifTrue:[
 "/        items := items , #( ('-') ('show topLevel namespaces only' showTopLevelNamespaces)).
@@ -9926,9 +10001,16 @@
     and:[currentNamespace ~= '* all *']]) ifTrue:[
         "/ is it all empty ?
         currentNamespace allClasses isEmpty ifTrue:[
-            items := items , #(('-') ('remove' nameSpaceRemove)).
+            items := items , #(
+                                ('-') 
+                                ('remove' nameSpaceRemove)).
         ] ifFalse:[
-            items := items , #(('-') ('remove all classes' nameSpaceRemoveAllClasses)).
+            items := items , #(
+                                ('-') 
+                                ('remove all classes'    nameSpaceRemoveAllClasses)
+                                ('-') 
+                                ('checkin each...'       nameSpaceCheckInEach)
+                              ).
         ]
     ].
 
@@ -11233,15 +11315,18 @@
                                           request: 
 ('You are about to define a class from another (system-) package.
 The classes original packageID was ''%1''. 
-If you proceed, the new class will be marked as belonging
+If you proceed with ''%3'', the new class will be marked as belonging
 to the ''%2'' package (and this warning will not be shown again).
-If you proceed with ''keep'', the class will be installed
+If you proceed with ''%4'', the class will be installed
 but the old packageID will be preserved.
-Otherwise, hit ''cancel'' to leave the class unchanged.
+Otherwise, hit ''%5'' to leave the class unchanged.
 
 PS: you can disable these checks in the launchers settings-compilation dialog.' 
                                               bindWith:(oldPkg asText allBold) 
-                                                  with:(newPkg asText allBold))
+                                                  with:(newPkg asText allBold)
+                                                  with:(resources string:'continue')
+                                                  with:(resources string:'keep')
+                                                  with:(resources string:'cancel'))
 
                                           label:'Class redefinition'
                                           form:(WarningBox iconBitmap)
@@ -12763,6 +12848,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.478 1999-03-06 03:03:36 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.479 1999-03-07 15:05:27 cg Exp $'
 ! !
 BrowserView initialize!