Tools__CheckinInfoDialog.st
changeset 18130 64f823c2b648
parent 17882 b1e8428466b8
child 18131 9e7156478039
--- a/Tools__CheckinInfoDialog.st	Thu May 17 12:53:20 2018 +0200
+++ b/Tools__CheckinInfoDialog.st	Thu May 17 21:12:12 2018 +0200
@@ -21,7 +21,8 @@
 		warningMessageHolder logHistory logHistoryHeadLineSelectionHolder
 		validateConsistencyHolder validateConsistencyVisibleHolder
 		checkinReasonHolder validateConsistencyEnabledHolder
-		quickCheckInEnabledHolder repositoryInfoHolder branchInfoHolder'
+		quickCheckInEnabledHolder repositoryInfoHolder branchInfoHolder
+		showChangesAction'
 	classVariableNames:'RecentlyUsedTags LastReason'
 	poolDictionaries:''
 	category:'System-SourceCodeManagement'
@@ -114,16 +115,42 @@
      the UIHelpTool may not be able to read the specification."
 
     "
-     UIHelpTool openOnClass:Tools::CheckinInfoDialog    
+     UIHelpTool openOnClass:Tools::CheckinInfoDialog
     "
 
     <resource: #help>
 
     ^ super helpSpec addPairsFrom:#(
 
+#checkinReason
+'Adds a keyword to the checkin info, to allow automatic generation of revision information from the log later'
+
+#checkinReasonBugfix
+'Some bug was fixed.\Please describe what was changed and\if possible, add a bug identifier (issue-ID) to the checkin info'
+
+#checkinReasonDocumentation
+'Only documentation, comments etc. were added/changed.\Tells others, that there is no need to test/verify/review the changes'
+
+#checkinReasonFeature
+'A new feature was added.\Please describe what was changed and\if possible, add a requirement identifier (issue-ID) to the checkin info'
+
+#checkinReasonOther
+'Some other change, which does not fit into one of the above.\Please describe in detail what you did in the checkin info'
+
+#checkinReasonQuality
+'The change enhanced the quality of the product (debuggability, testability, robustness, etc.)\Use this for test-cases.'
+
+#checkinReasonRefactoring
+'The code was refactored/improved for better structure or maintainability'
+
+#checkinReasonTuning
+'The change enhances the performance.\Be especially careful to always add test cases,\because statistically, many errors are introduced by "optimizations".'
+
+#checkinReasonUIEnhancement
+'Some enhancement in a UI which makes it look better or easier to use\(but does not add new functionality).\Please describe in detail what you did in the checkin info'
+
 #logMessage
-'This message is added as a check-in log message. 
-It can later be retrieved via the browser''s revision info menu function'
+'This message is added as a check-in log message. It can later be retrieved via the browser''s revision info menu function'
 
 #markAsStable
 'Mark this as a stable version (i.e. give it a "stable" tag)'
@@ -131,43 +158,16 @@
 #quickCheckin
 'Only checkin classes which have been created or changed during this session'
 
+#showDiffs
+'Oops - you forgot?\\Click here to see the differences.'
+
 #tag
 'Mark this version with a symbolic tag (combo list gives list of recently used tags)'
 
 #validateConsistency
-'Perform some consistency checks before checking in. 
-Especially checks the correctness of the ProjectDefinition vs. the actual set of classes in the image'
-
-#checkinReason
-'Adds a keyword to the checkin info, to allow automatic generation of revision information from the log later'
-
-#checkinReasonDocumentation
-'Only documentation, comments etc. were added/changed.\Tells others, that there is no need to test/verify/review the changes'
-
-#checkinReasonBugfix
-'Some bug was fixed.\Please describe what was changed and\if possible, add a bug identifier (issue-ID) to the checkin info'
-
-#checkinReasonFeature
-'A new feature was added.\Please describe what was changed and\if possible, add a requirement identifier (issue-ID) to the checkin info'
-
-#checkinReasonRefactoring
-'The code was refactored/improved for better structure or maintainability'
-
-#checkinReasonUIEnhancement
-'Some enhancement in a UI which makes it look better or easier to use\(but does not add new functionality).\Please describe in detail what you did in the checkin info'
-
-#checkinReasonQuality
-'The change enhanced the quality of the product (debuggability, testability, robustness, etc.)\Use this for test-cases.'
-
-#checkinReasonTuning
-'The change enhances the performance.\Be especially careful to always add test cases,\because statistically, many errors are introduced by "optimizations".'
-
-#checkinReasonOther
-'Some other change, which does not fit into one of the above.\Please describe in detail what you did in the checkin info'
+'Perform some consistency checks before checking in. Especially checks the correctness of the ProjectDefinition vs. the actual set of classes in the image'
 
 )
-
-    "Modified: / 31-03-2016 / 18:01:42 / cg"
 ! !
 
 !CheckinInfoDialog class methodsFor:'interface specs'!
@@ -190,14 +190,14 @@
     ^ 
     #(FullSpec
        name: windowSpec
-       uuid: '2d2af946-da09-11e7-a8cd-c42c033b4871'
+       uuid: '05617fd4-5a06-11e8-ad24-b8f6b1108e05'
        window: 
       (WindowSpec
          label: 'Enter Log Message'
          name: 'Enter Log Message'
          uuid: '35292892-d93d-11e7-8a1e-c42c033b4871'
          min: (Point 538 387)
-         bounds: (Rectangle 0 0 592 558)
+         bounds: (Rectangle 0 0 594 542)
        )
        component: 
       (SpecCollection
@@ -454,16 +454,26 @@
                    uuid: '352953a8-d93d-11e7-8a1e-c42c033b4871'
                    translateLabel: true
                    model: doCancel
-                   extent: (Point 282 35)
+                   extent: (Point 187 34)
                    usePreferredHeight: true
                  )
                 (ActionButtonSpec
+                   label: 'What Changed?'
+                   name: 'Button3'
+                   activeHelpKey: showDiffs
+                   uuid: '6573b3de-5a05-11e8-ad24-b8f6b1108e05'
+                   visibilityChannel: showChangesButtonVisible
+                   translateLabel: true
+                   model: showChanges
+                   extent: (Point 187 34)
+                 )
+                (ActionButtonSpec
                    label: 'OK'
                    name: 'Button1'
                    uuid: '35295560-d93d-11e7-8a1e-c42c033b4871'
                    translateLabel: true
                    model: doAccept
-                   extent: (Point 282 35)
+                   extent: (Point 188 34)
                    usePreferredHeight: true
                  )
                 )
@@ -680,6 +690,13 @@
     "Created: / 05-12-2017 / 23:08:05 / cg"
 !
 
+showChangesAction:aBlock
+    "if non-nil, an additional 'Show Changes' button appears,
+     which evaluates this action"
+     
+    showChangesAction := aBlock
+!
+
 tag
     ^ (self tagHolder value ? '') withoutSeparators
 !
@@ -710,6 +727,12 @@
     "/ self validateConsistencyVisibleHolder value:aBoolean
 ! !
 
+!CheckinInfoDialog methodsFor:'actions'!
+
+showChanges
+    showChangesAction value
+! !
+
 !CheckinInfoDialog methodsFor:'aspects'!
 
 branchInfoHolder
@@ -814,6 +837,10 @@
     "Created: / 05-12-2017 / 23:07:34 / cg"
 !
 
+showChangesButtonVisible
+    ^ showChangesAction notNil
+!
+
 tagHolder
     tagHolder isNil ifTrue:[
         tagHolder := ("CVSSourceCodeManager recentTag ?" '') asValue.