SourceCodeManagerUtilities.st
changeset 2325 a15e7231c04f
parent 2313 3dbafc3a51a4
child 2326 c0b55d3a8f08
--- a/SourceCodeManagerUtilities.st	Wed Feb 09 14:04:39 2011 +0100
+++ b/SourceCodeManagerUtilities.st	Wed Feb 09 14:06:20 2011 +0100
@@ -356,7 +356,7 @@
                                   with:moduleName) .
             ^ false
         ].
-        AbortAllOperationRequest isHandled ifTrue:[
+        AbortAllOperationWantedQuery query ifTrue:[
             answer := Dialog 
                 confirmWithCancel:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName)
                 labels:(resources array:#('Cancel All' 'Cancel' 'Yes' )).
@@ -374,6 +374,8 @@
         ]
     ].
     ^ true.
+
+    "Modified: / 09-02-2011 / 13:54:01 / cg"
 !
 
 checkinClass:aClass
@@ -500,7 +502,7 @@
             aborted ifTrue:[  |con|
                 Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'.
 
-                AbortAllOperationRequest isHandled ifTrue:[
+                AbortAllOperationWantedQuery query ifTrue:[
                     (Dialog 
                         confirm:(resources stringWithCRs:'Checkin of ''' , aClass name , ''' aborted.\\Cancel all ?')
                         default:false)
@@ -514,7 +516,7 @@
     ].
     ^ true
 
-    "Modified: / 27-01-2011 / 09:25:50 / cg"
+    "Modified: / 09-02-2011 / 13:54:05 / cg"
 !
 
 checkinClasses:aCollectionOfClass
@@ -574,9 +576,8 @@
         classes := classes select:[:aClass | aClass hasUnsavedChanges].
     ].
 
-    AbortAllOperationRequest handle:[:ex |
-        ex return
-    ] do:[
+    "abortAll is handled, and also asked for here!!"
+    AbortAllOperationRequest handleAndAnswerQueryIn:[
         classes notEmpty ifTrue:[
             self yesToAllNotification handle:[:ex |
                 yesOrNoToAll := ex parameter.
@@ -624,7 +625,7 @@
         ].
     ].
 
-    "Modified: / 12-09-2006 / 13:07:49 / cg"
+    "Modified: / 09-02-2011 / 14:01:35 / cg"
 !
 
 checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
@@ -2736,7 +2737,10 @@
 
     |partialLog revisions items newestRev
      box y component resources 
-     revisionHolder symbolicNames stableRevision releasedRevision|
+     revisionHolder symbolicNames stableRevision releasedRevision
+     tagHolder tagList lockChange|
+
+    resources := self classResources.
 
     partialLog := aSourceCodeManager
         revisionLogOf:clsOrNil
@@ -2752,6 +2756,8 @@
         symbolicNames notNil ifTrue:[
             stableRevision := symbolicNames at:'stable' ifAbsent:[].
             releasedRevision := symbolicNames at:'released' ifAbsent:[].
+            tagList := ((symbolicNames associations sort:[:a :b | a value < b value])
+                         collect:[:assoc | assoc key]) reverse.
         ].
             
         items := revisions collect:[:each | |rev date who flag|
@@ -2787,12 +2793,12 @@
             ]
         ]
     ].
-    revisionHolder  := newestRev asValue.
-    resources := self classResources.
-
+
+    lockChange := false.
+    revisionHolder := newestRev asValue.
     revisionHolder onChangeEvaluate:[
         "/ cut off everything after revision
-        |s first words|
+        |s first words tag|
 
         s := revisionHolder value.
         words := s asCollectionOfWords.
@@ -2801,9 +2807,27 @@
             first ~= s ifTrue:[
                 revisionHolder value:first
             ]
-        ]
+        ].
+        lockChange ifFalse:[
+            tagHolder value:''
+        ].
     ].
 
+    tagHolder := '' asValue.
+    tagHolder 
+        onChangeEvaluate:[
+            |tag rev|
+
+            (tag := tagHolder value) notEmptyOrNil ifTrue:[
+                rev := symbolicNames at:tag.
+                rev ~= revisionHolder value ifTrue:[
+                    lockChange := true.
+                    revisionHolder value:rev.
+                    lockChange := false.
+                ].
+            ]
+        ].
+
     "/
     "/ open a dialog for this
     "/
@@ -2823,11 +2847,22 @@
     component list:items.
     component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
 
+    y := box yPosition.
+    component := box addTextLabel:(resources string:'or Tag:').
+    component width:0.4; adjust:#right.
+    box yPosition:y.
+    component := box addComboListOn:tagHolder tabable:true.
+    component list:tagList.
+    component width:0.6; left:0.4.
+    tagList isNil ifTrue:[
+        component disable
+    ].
+
     box addVerticalSpace.
 
     box addAbortAndOkButtons.
 
-    AbortAllOperationRequest isHandled ifTrue:[
+    AbortAllOperationWantedQuery query ifTrue:[
         (box addAbortButtonLabelled:'Cancel all') action:[AbortAllSignal raise].
     ].
 
@@ -2852,7 +2887,7 @@
         fileName:'Array.st'
     "
 
-    "Modified: / 13-09-2006 / 18:24:46 / cg"
+    "Modified: / 09-02-2011 / 13:53:52 / cg"
 !
 
 checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
@@ -3218,9 +3253,9 @@
 !SourceCodeManagerUtilities class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.209 2011-01-27 08:26:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.210 2011-02-09 13:06:20 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.209 2011-01-27 08:26:11 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.210 2011-02-09 13:06:20 cg Exp $'
 ! !