changed: #projectMenuCheckInProject:classes:extensions:buildSupport:askForMethodsInOtherPackages:
authorClaus Gittinger <cg@exept.de>
Fri, 09 Oct 2009 19:11:16 +0200
changeset 8920 188d92c1b191
parent 8919 e18fa0224d6e
child 8921 e1d9aa2c8a55
changed: #projectMenuCheckInProject:classes:extensions:buildSupport:askForMethodsInOtherPackages: extensions checkin cleanup
NewSystemBrowser.st
Tools__NewSystemBrowser.st
--- a/NewSystemBrowser.st	Fri Oct 09 18:26:50 2009 +0200
+++ b/NewSystemBrowser.st	Fri Oct 09 19:11:16 2009 +0200
@@ -26782,7 +26782,7 @@
 projectMenuCheckInProject:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
     |classes classesToCheckIn methodsToCheckIn
      methodsInOtherPackages looseMethods otherPackages
-     msg classesInChangeSet checkinInfo originalCheckinInfo answer labels values classesToTag|
+     msg classesInChangeSet checkinInfo originalCheckinInfo labels values classesToTag|
 
     classes := Smalltalk allClasses.
 
@@ -26808,7 +26808,7 @@
     "/ individual methods ...
     classes do:[:aClass |
         aClass isMeta ifFalse:[
-            "/ ... whose class is not in the ckechIn-set
+            "/ ... whose class is not in the chechIn-set
             (classesToCheckIn includes:aClass) ifFalse:[
                 aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
                     "/ methods in this project ...
@@ -26822,92 +26822,44 @@
 
     doExtensions ifTrue:[
         methodsToCheckIn notEmpty ifTrue:[
-            answer := true. "/ dont ask...
-"/false ifTrue:[
-"/            |classesWithExtensions|
-"/
-"/            classesWithExtensions := (methodsToCheckIn collect:[:mthd | mthd mclass]) asIdentitySet.
-"/
-"/            msg := 'Found %1 extension method'.
-"/            methodsToCheckIn size > 1 ifTrue:[
-"/                msg := msg , 's'
-"/            ].
-"/            classesWithExtensions size == 1 ifTrue:[
-"/                msg := msg , ' for ''%4'' in the %2 class.'
-"/            ] ifFalse:[
-"/                msg := msg , ' for ''%4'' in %3 classes.'
-"/            ].
-"/            methodsToCheckIn size == 1 ifTrue:[
-"/                msg := msg , '\\Check this method into the extensions container of the %4 project ?'.
-"/            ] ifFalse:[
-"/                msg := msg , '\\Check these methods into the extensions container of the %4 project ?'.
-"/            ].
-"/            msg := msg withCRs.
-"/            msg := msg bindWith:methodsToCheckIn size
-"/                           with:classesWithExtensions first name allBold
-"/                           with:classesWithExtensions size
-"/                           with:packageToCheckIn allBold.
-"/
-"/            labels := #('Cancel' 'Browse' 'No' 'Yes').
-"/            values := #(#cancel #browse false true).
-"/
-"/            answer := OptionBox
-"/                              request:msg withCRs
-"/                              label:'Checkin project'
-"/                              buttonLabels:(resources array:labels)
-"/                              values:values
-"/                              default:true
-"/                              onCancel:#cancel.
-"/            answer == #cancel ifTrue:[ AbortOperationRequest raise ].
-"/            answer == #browse ifTrue:[
-"/                self
-"/                    spawnMethodBrowserFor:methodsToCheckIn
-"/                    in:#newBrowser
-"/                    label:('Extension Methods of Project %1' bindWith:packageToCheckIn).
-"/                AbortOperationRequest raise
-"/            ].
-"/].
-
-            answer == true ifTrue:[
+            doClasses ifTrue:[
+                msg := '%1 classes (%4 changed) '.
+            ] ifFalse:[
+                msg := ''.
+            ].
+            doExtensions ifTrue:[
                 doClasses ifTrue:[
-                    msg := '%1 classes (%4 changed) '.
-                ] ifFalse:[
-                    msg := ''.
-                ].
-                doExtensions ifTrue:[
-                    doClasses ifTrue:[
-                        msg := msg , 'and '.
-                    ].
-                    msg := msg , '%2 extensions '.
-                ].
-                msg := msg , 'of project "%3"'.
-
-                checkinInfo := SourceCodeManagerUtilities
-                            getCheckinInfoFor:(msg
-                                                        bindWith:classesToCheckIn size
-                                                        with:methodsToCheckIn size
-                                                        with:packageToCheckIn allBold
-                                                        with:classesInChangeSet size)
-                            initialAnswer:nil
-                            withQuickOption:(classesToCheckIn size > 0).
-                checkinInfo isNil ifTrue:[
-                    ^ self.
-                ].
-                (SourceCodeManagerUtilities
-                    checkinExtensionMethods:methodsToCheckIn
-                    forPackage:packageToCheckIn
-                    withInfo:checkinInfo)
-                ifFalse:[
-                    self warn:'Could not check in extensions for project %1' with:packageToCheckIn.
-                    ^ self.
-                ]
+                    msg := msg , 'and '.
+                ].
+                msg := msg , '%2 extensions '.
+            ].
+            msg := msg , 'of project "%3"'.
+
+            checkinInfo := SourceCodeManagerUtilities
+                        getCheckinInfoFor:(msg
+                                                    bindWith:classesToCheckIn size
+                                                    with:methodsToCheckIn size
+                                                    with:packageToCheckIn allBold
+                                                    with:classesInChangeSet size)
+                        initialAnswer:nil
+                        withQuickOption:(classesToCheckIn size > 0).
+            checkinInfo isNil ifTrue:[
+                ^ self.
+            ].
+            (SourceCodeManagerUtilities
+                checkinExtensionMethods:methodsToCheckIn
+                forPackage:packageToCheckIn
+                withInfo:checkinInfo)
+            ifFalse:[
+                self warn:'Could not check in extensions for project %1' with:packageToCheckIn.
+                ^ self.
             ]
         ] ifFalse:[
             "/ there may have been extension-methods previously - if so, remove them
             (SourceCodeManager
                 checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn)
             ifTrue:[
-self halt.
+"/ self halt.
                 (SourceCodeManagerUtilities
                     checkinExtensionMethods:#()
                     forPackage:packageToCheckIn
@@ -26984,8 +26936,7 @@
                            with:otherPackages size
                            with:methodsInOtherPackages first selector allBold
                            with:methodsInOtherPackages first mclass name allBold.
-            answer := Dialog confirm:msg noLabel:(resources string:'Cancel').
-            answer ~~ true ifTrue:[^ self].
+            (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
         ].
     ].
 
@@ -27011,8 +26962,7 @@
                                with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold])
                                with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold])
                                with:packageToCheckIn allBold.
-                answer := Dialog confirm:msg noLabel:(resources string:'Cancel').
-                answer ~~ true ifTrue:[^ self].
+                (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
 
                 looseMethods do:[:mthd |
                     mthd package:packageToCheckIn
@@ -43009,11 +42959,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1343 2009-10-09 14:16:31 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1344 2009-10-09 17:11:16 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1343 2009-10-09 14:16:31 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.1344 2009-10-09 17:11:16 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st	Fri Oct 09 18:26:50 2009 +0200
+++ b/Tools__NewSystemBrowser.st	Fri Oct 09 19:11:16 2009 +0200
@@ -26782,7 +26782,7 @@
 projectMenuCheckInProject:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
     |classes classesToCheckIn methodsToCheckIn
      methodsInOtherPackages looseMethods otherPackages
-     msg classesInChangeSet checkinInfo originalCheckinInfo answer labels values classesToTag|
+     msg classesInChangeSet checkinInfo originalCheckinInfo labels values classesToTag|
 
     classes := Smalltalk allClasses.
 
@@ -26808,7 +26808,7 @@
     "/ individual methods ...
     classes do:[:aClass |
         aClass isMeta ifFalse:[
-            "/ ... whose class is not in the ckechIn-set
+            "/ ... whose class is not in the chechIn-set
             (classesToCheckIn includes:aClass) ifFalse:[
                 aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
                     "/ methods in this project ...
@@ -26822,92 +26822,44 @@
 
     doExtensions ifTrue:[
         methodsToCheckIn notEmpty ifTrue:[
-            answer := true. "/ dont ask...
-"/false ifTrue:[
-"/            |classesWithExtensions|
-"/
-"/            classesWithExtensions := (methodsToCheckIn collect:[:mthd | mthd mclass]) asIdentitySet.
-"/
-"/            msg := 'Found %1 extension method'.
-"/            methodsToCheckIn size > 1 ifTrue:[
-"/                msg := msg , 's'
-"/            ].
-"/            classesWithExtensions size == 1 ifTrue:[
-"/                msg := msg , ' for ''%4'' in the %2 class.'
-"/            ] ifFalse:[
-"/                msg := msg , ' for ''%4'' in %3 classes.'
-"/            ].
-"/            methodsToCheckIn size == 1 ifTrue:[
-"/                msg := msg , '\\Check this method into the extensions container of the %4 project ?'.
-"/            ] ifFalse:[
-"/                msg := msg , '\\Check these methods into the extensions container of the %4 project ?'.
-"/            ].
-"/            msg := msg withCRs.
-"/            msg := msg bindWith:methodsToCheckIn size
-"/                           with:classesWithExtensions first name allBold
-"/                           with:classesWithExtensions size
-"/                           with:packageToCheckIn allBold.
-"/
-"/            labels := #('Cancel' 'Browse' 'No' 'Yes').
-"/            values := #(#cancel #browse false true).
-"/
-"/            answer := OptionBox
-"/                              request:msg withCRs
-"/                              label:'Checkin project'
-"/                              buttonLabels:(resources array:labels)
-"/                              values:values
-"/                              default:true
-"/                              onCancel:#cancel.
-"/            answer == #cancel ifTrue:[ AbortOperationRequest raise ].
-"/            answer == #browse ifTrue:[
-"/                self
-"/                    spawnMethodBrowserFor:methodsToCheckIn
-"/                    in:#newBrowser
-"/                    label:('Extension Methods of Project %1' bindWith:packageToCheckIn).
-"/                AbortOperationRequest raise
-"/            ].
-"/].
-
-            answer == true ifTrue:[
+            doClasses ifTrue:[
+                msg := '%1 classes (%4 changed) '.
+            ] ifFalse:[
+                msg := ''.
+            ].
+            doExtensions ifTrue:[
                 doClasses ifTrue:[
-                    msg := '%1 classes (%4 changed) '.
-                ] ifFalse:[
-                    msg := ''.
-                ].
-                doExtensions ifTrue:[
-                    doClasses ifTrue:[
-                        msg := msg , 'and '.
-                    ].
-                    msg := msg , '%2 extensions '.
-                ].
-                msg := msg , 'of project "%3"'.
-
-                checkinInfo := SourceCodeManagerUtilities
-                            getCheckinInfoFor:(msg
-                                                        bindWith:classesToCheckIn size
-                                                        with:methodsToCheckIn size
-                                                        with:packageToCheckIn allBold
-                                                        with:classesInChangeSet size)
-                            initialAnswer:nil
-                            withQuickOption:(classesToCheckIn size > 0).
-                checkinInfo isNil ifTrue:[
-                    ^ self.
-                ].
-                (SourceCodeManagerUtilities
-                    checkinExtensionMethods:methodsToCheckIn
-                    forPackage:packageToCheckIn
-                    withInfo:checkinInfo)
-                ifFalse:[
-                    self warn:'Could not check in extensions for project %1' with:packageToCheckIn.
-                    ^ self.
-                ]
+                    msg := msg , 'and '.
+                ].
+                msg := msg , '%2 extensions '.
+            ].
+            msg := msg , 'of project "%3"'.
+
+            checkinInfo := SourceCodeManagerUtilities
+                        getCheckinInfoFor:(msg
+                                                    bindWith:classesToCheckIn size
+                                                    with:methodsToCheckIn size
+                                                    with:packageToCheckIn allBold
+                                                    with:classesInChangeSet size)
+                        initialAnswer:nil
+                        withQuickOption:(classesToCheckIn size > 0).
+            checkinInfo isNil ifTrue:[
+                ^ self.
+            ].
+            (SourceCodeManagerUtilities
+                checkinExtensionMethods:methodsToCheckIn
+                forPackage:packageToCheckIn
+                withInfo:checkinInfo)
+            ifFalse:[
+                self warn:'Could not check in extensions for project %1' with:packageToCheckIn.
+                ^ self.
             ]
         ] ifFalse:[
             "/ there may have been extension-methods previously - if so, remove them
             (SourceCodeManager
                 checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn)
             ifTrue:[
-self halt.
+"/ self halt.
                 (SourceCodeManagerUtilities
                     checkinExtensionMethods:#()
                     forPackage:packageToCheckIn
@@ -26984,8 +26936,7 @@
                            with:otherPackages size
                            with:methodsInOtherPackages first selector allBold
                            with:methodsInOtherPackages first mclass name allBold.
-            answer := Dialog confirm:msg noLabel:(resources string:'Cancel').
-            answer ~~ true ifTrue:[^ self].
+            (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
         ].
     ].
 
@@ -27011,8 +26962,7 @@
                                with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold])
                                with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold])
                                with:packageToCheckIn allBold.
-                answer := Dialog confirm:msg noLabel:(resources string:'Cancel').
-                answer ~~ true ifTrue:[^ self].
+                (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
 
                 looseMethods do:[:mthd |
                     mthd package:packageToCheckIn
@@ -43009,11 +42959,11 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1343 2009-10-09 14:16:31 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1344 2009-10-09 17:11:16 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1343 2009-10-09 14:16:31 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.1344 2009-10-09 17:11:16 cg Exp $'
 ! !
 
 NewSystemBrowser initialize!