SourceCodeManagerUtilitiesForContainerBasedManagers.st
changeset 4354 f27b60626e89
parent 4333 c6441a31864d
child 4400 aeafd5d622d7
--- a/SourceCodeManagerUtilitiesForContainerBasedManagers.st	Sun Sep 23 01:27:04 2018 +0200
+++ b/SourceCodeManagerUtilitiesForContainerBasedManagers.st	Sun Sep 23 04:18:37 2018 +0200
@@ -357,58 +357,59 @@
                 "/ could have changed/recompiled methods...
                 "/ mhmh - should we checkin what is specified in the prj-def,
                 "/ or what is actually present in the image (in case user did not repair)???
-                
-                methodsInPrjDef  := packageToCheckIn asPackageId projectDefinitionClass extensionMethods.
-                methodsInPrjDef := methodsInPrjDef reject:[:m | m isNil].
-                (setInProjectDef := methodsInPrjDef asSet) ~= (setForCheckin := extensionMethodsToCheckIn asSet) ifTrue:[
-                    onlyInPrjDef := setInProjectDef copy removeAllFoundIn:setForCheckin.
-                    onlyForCheckin := setForCheckin copy removeAllFoundIn:setInProjectDef.
-                    moreInfo := ''.
-                    onlyInPrjDef notEmpty ifTrue:[
-                        moreInfo := moreInfo , '\Only in Project: '.
-                        moreInfo := moreInfo , (((onlyInPrjDef asOrderedCollection copyTo:(5 min:onlyInPrjDef size))
-                                                collect:#whoString) asStringWith:', ').
-                        onlyInPrjDef size > 5 ifTrue:[ moreInfo := moreInfo , '...' ].
-                    ].
-                    onlyForCheckin notEmpty ifTrue:[
-                        moreInfo := moreInfo , '\Only in Image: '.
-                        moreInfo := moreInfo , (((onlyForCheckin asOrderedCollection copyTo:(5 min:onlyForCheckin size))
-                                                collect:#whoString) asStringWith:', ').
-                        onlyForCheckin size > 5 ifTrue:[ moreInfo := moreInfo , '...' ].
+                packageToCheckIn asPackageId projectDefinitionClass notNil ifTrue:[
+                    methodsInPrjDef  := packageToCheckIn asPackageId projectDefinitionClass extensionMethods.
+                    methodsInPrjDef := methodsInPrjDef reject:[:m | m isNil].
+                    (setInProjectDef := methodsInPrjDef asSet) ~= (setForCheckin := extensionMethodsToCheckIn asSet) ifTrue:[
+                        onlyInPrjDef := setInProjectDef copy removeAllFoundIn:setForCheckin.
+                        onlyForCheckin := setForCheckin copy removeAllFoundIn:setInProjectDef.
+                        moreInfo := ''.
+                        onlyInPrjDef notEmpty ifTrue:[
+                            moreInfo := moreInfo , '\Only in Project: '.
+                            moreInfo := moreInfo , (((onlyInPrjDef asOrderedCollection copyTo:(5 min:onlyInPrjDef size))
+                                                    collect:#whoString) asStringWith:', ').
+                            onlyInPrjDef size > 5 ifTrue:[ moreInfo := moreInfo , '...' ].
+                        ].
+                        onlyForCheckin notEmpty ifTrue:[
+                            moreInfo := moreInfo , '\Only in Image: '.
+                            moreInfo := moreInfo , (((onlyForCheckin asOrderedCollection copyTo:(5 min:onlyForCheckin size))
+                                                    collect:#whoString) asStringWith:', ').
+                            onlyForCheckin size > 5 ifTrue:[ moreInfo := moreInfo , '...' ].
+                        ].
+                        moreInfo notEmpty ifTrue:[ (moreInfo := moreInfo , '\') withCRs ].
+    self halt.
+                        answer:= Dialog 
+                            confirmWithCancel:('The set of methods in image is different from what is specified in the project definition.\%1\You should probably make sure that all extension methods are all associated to the correct package.\\Check in image methods (%2) or definition methods (%3)?'
+                                            bindWith: moreInfo
+                                            with: extensionMethodsToCheckIn size
+                                            with: methodsInPrjDef size) withCRs
+                            labels:#('Image Methods' 'Definition Methods' 'Cancel') 
+                            values:#(true false nil) 
+                            default:nil.
+
+    "/                    answer := Dialog 
+    "/                        confirm:('Set of methods in image is different from what is specified in the project definition.\Check in image methods (%1) or definition methods (%2)?'
+    "/                                        bindWith: extensionMethodsToCheckIn size
+    "/                                        with: methodsInPrjDef size)
+    "/                        yesLabel:'Image Methods' 
+    "/                        noLabel:'Definition Methods'.
+                        answer isNil ifTrue:[AbortOperationRequest raise].
+                        answer ifFalse:[
+                            extensionMethodsToCheckIn := methodsInPrjDef.
+                        ].
                     ].
-                    moreInfo notEmpty ifTrue:[ (moreInfo := moreInfo , '\') withCRs ].
-self halt.
-                    answer:= Dialog 
-                        confirmWithCancel:('The set of methods in image is different from what is specified in the project definition.\%1\You should probably make sure that all extension methods are all associated to the correct package.\\Check in image methods (%2) or definition methods (%3)?'
-                                        bindWith: moreInfo
-                                        with: extensionMethodsToCheckIn size
-                                        with: methodsInPrjDef size) withCRs
-                        labels:#('Image Methods' 'Definition Methods' 'Cancel') 
-                        values:#(true false nil) 
-                        default:nil.
-
-"/                    answer := Dialog 
-"/                        confirm:('Set of methods in image is different from what is specified in the project definition.\Check in image methods (%1) or definition methods (%2)?'
-"/                                        bindWith: extensionMethodsToCheckIn size
-"/                                        with: methodsInPrjDef size)
-"/                        yesLabel:'Image Methods' 
-"/                        noLabel:'Definition Methods'.
-                    answer isNil ifTrue:[AbortOperationRequest raise].
-                    answer ifFalse:[
-                        extensionMethodsToCheckIn := methodsInPrjDef.
+            
+                    "/ also need the extensionVersion methods in the projectDefinition class,
+                    "/ which are kept in the extensions container. (the reason is that we need the proper
+                    "/ CVS id for the extensions container, not for the projDefinition container.
+                    packageToCheckIn asPackageId projectDefinitionClass theMetaclass selectorsAndMethodsDo:[:sel :mthd |
+                        (AbstractSourceCodeManager isExtensionsVersionMethodSelector:sel) ifTrue:[
+                            extensionMethodsToCheckIn add:mthd
+                        ].
                     ].
                 ].
             ].
 
-            "/ also need the extensionVersion methods in the projectDefinition class,
-            "/ which are kept in the extensions container. (the reason is that we need the proper
-            "/ CVS id for the extensions container, not for the projDefinition container.
-            packageToCheckIn asPackageId projectDefinitionClass theMetaclass selectorsAndMethodsDo:[:sel :mthd |
-                (AbstractSourceCodeManager isExtensionsVersionMethodSelector:sel) ifTrue:[
-                    extensionMethodsToCheckIn add:mthd
-                ].
-            ].
-
             (self
                 checkinExtensionMethods:extensionMethodsToCheckIn
                 forPackage:packageToCheckIn
@@ -606,6 +607,7 @@
 
     "Created: / 05-12-2017 / 20:03:19 / cg"
     "Modified: / 05-12-2017 / 23:15:52 / cg"
+    "Modified: / 23-09-2018 / 04:18:14 / Claus Gittinger"
 ! !
 
 !SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!