#REFACTORING by exept
class: MultiViewToolApplication
added: #askForFile:default:forSave:thenDo:
changed:
#askForFile:default:thenDo:
#askForFile:thenDo:
#menuSaveAllAs
#menuSaveAs
"{ Encoding: utf8 }"
"
COPYRIGHT (c) 2005 eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
"{ Package: 'stx:libtool' }"
"{ NameSpace: Tools }"
SimpleDialog subclass:#CheckinInfoDialog
instanceVariableNames:'descriptionHolder logMessageHolder isStableHolder tagHolder
quickCheckInHolder quickCheckInVisibleHolder allowEmptyLogMessage
warningMessageHolder logHistory logHistoryHeadLineSelectionHolder
validateConsistencyHolder validateConsistencyVisibleHolder
checkinReasonHolder validateConsistencyEnabledHolder
quickCheckInEnabledHolder repositoryInfoHolder branchInfoHolder
showChangesAction rememberTagAsDefaultHolder'
classVariableNames:'RecentlyUsedTags LastReason DefaultTag'
poolDictionaries:''
category:'System-SourceCodeManagement'
!
!CheckinInfoDialog class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 2005 eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
documentation
"
checkin-dialog.
used to be private in SourceCodeManagerUtilites.
moved to libtool because libbasic3 should not contain code inheriting from GUI classes.
[author:]
[see also:]
[instance variables:]
[class variables:]
"
! !
!CheckinInfoDialog class methodsFor:'constants'!
possibleReasons
^ #(reasonBugfix reasonDocumentation reasonFeature reasonRefactoring
reasonOther reasonUIEnhancement reasonTuning reasonQuality reasonWorkaround)
"Created: / 31-03-2016 / 17:53:16 / cg"
!
reasonBugfix
^ #reasonBugfix
!
reasonDocumentation
^ #reasonDocumentation
!
reasonFeature
^ #reasonFeature
!
reasonOther
^ #reasonOther
!
reasonQuality
^ #reasonQuality
"Created: / 31-03-2016 / 17:53:57 / cg"
!
reasonRefactoring
^ #reasonRefactoring
!
reasonTuning
^ #reasonTuning
"Created: / 31-03-2016 / 17:53:26 / cg"
!
reasonUIEnhancement
^ #reasonUIEnhancement
!
reasonWorkaround
^ #reasonWorkaround
! !
!CheckinInfoDialog class methodsFor:'help specs'!
helpSpec
"This resource specification was automatically generated
by the UIHelpTool of ST/X."
"Do not manually edit this!! If it is corrupted,
the UIHelpTool may not be able to read the specification."
"
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'
#checkinReasonWorkaround
'Some bug was fixed as a quick hack (eg. to satisfy a customer).\The change should be further investigated,\and propably a better technical solution be found.\\But still, please describe what was changed and\if possible, add a bug identifier (issue-ID) to 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'
#markAsStable
'Mark this as a stable version (i.e. give it a "stable" tag)'
#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'
)
! !
!CheckinInfoDialog class methodsFor:'interface specs'!
windowSpec
"This resource specification was automatically generated
by the UIPainter of ST/X."
"Do not manually edit this!! If it is corrupted,
the UIPainter may not be able to read the specification."
"
UIPainter new openOnClass:Tools::CheckinInfoDialog andSelector:#windowSpec
Tools::CheckinInfoDialog new openInterface:#windowSpec
Tools::CheckinInfoDialog open
"
<resource: #canvas>
^
#(FullSpec
name: windowSpec
uuid: '925c1eaa-3870-11b2-aba0-00d861a3d4eb'
window:
(WindowSpec
label: 'Enter Log Message'
name: 'Enter Log Message'
uuid: '35292892-d93d-11e7-8a1e-c42c033b4871'
min: (Point 538 387) bounds: (Rectangle 0 0 579 567)
) component:
(SpecCollection
collection: (
(HorizontalPanelViewSpec
name: 'HorizontalPanel2'
layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0) uuid: '35292b58-d93d-11e7-8a1e-c42c033b4871'
horizontalLayout: left
verticalLayout: center
horizontalSpace: 0
verticalSpace: 3
component:
(SpecCollection
collection: (
(LabelSpec
label: 'Enter checkIn log-message for:'
name: 'Label1'
uuid: '35292da6-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
resizeForLabel: true
useDefaultExtent: true
)
(LabelSpec
name: 'Label2'
uuid: '35293008-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
labelChannel: descriptionHolder
useDefaultExtent: true
)
)
)
)
(LabelSpec
name: 'BranchInfoLabel'
layout: (LayoutFrame 0 0 31 0 200 0 57 0) style: (FontDescription helvetica medium roman 12 #'iso10646-1' nil nil) uuid: '35293166-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
labelChannel: branchInfoHolder
resizeForLabel: true
adjust: left
)
(LabelSpec
name: 'RepositoryInfoLabel'
layout: (LayoutFrame 149 0 31 0 0 1 57 0) style: (FontDescription helvetica medium roman 12 #'iso10646-1' nil nil) uuid: '35293166-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
labelChannel: repositoryInfoHolder
resizeForLabel: true
adjust: right
)
(LabelSpec
label: 'Previous Log Messages:'
name: 'Label5'
layout: (LayoutFrame 0 0 73 0 220 0 103 0) uuid: '3529329c-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
adjust: right
)
(ComboListSpec
name: 'ComboList1'
layout: (LayoutFrame 220 0.0 73 0 0 1.0 103 0) uuid: '352933b4-d93d-11e7-8a1e-c42c033b4871'
model: logHistoryHeadLineSelectionHolder
comboList: logHistoryHeadLines
useIndex: true
)
(TextEditorSpec
name: 'LogTextEditor'
layout: (LayoutFrame 2 0.0 105 0 -2 1 -300 1) activeHelpKey: logMessage
uuid: '35293602-d93d-11e7-8a1e-c42c033b4871'
model: logMessageHolder
hasHorizontalScrollBar: true
hasVerticalScrollBar: true
hasKeyboardFocusInitially: false
)
(LabelSpec
name: 'Label4'
layout: (LayoutFrame 0 0.0 -293 1 0 1.0 -271 1) uuid: '35293828-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
labelChannel: warningMessageHolder
)
(CheckBoxSpec
label: 'Quick Checkin (Only Classes in ChangeSet)'
name: 'CheckInChangedOnlyCheckbox'
layout: (LayoutFrame 3 0 -268 1 -3 1 -246 1) activeHelpKey: quickCheckin
uuid: '35293954-d93d-11e7-8a1e-c42c033b4871'
visibilityChannel: quickCheckInVisibleHolder
enableChannel: quickCheckInEnabledHolder
model: quickCheckInHolder
translateLabel: true
)
(CheckBoxSpec
label: 'Validate Class/Package Consistency'
name: 'CheckBox1'
layout: (LayoutFrame 3 0 -241 1 -3 1 -219 1) activeHelpKey: validateConsistency
uuid: '35293b70-d93d-11e7-8a1e-c42c033b4871'
visibilityChannel: validateConsistencyVisibleHolder
enableChannel: validateConsistencyEnabledHolder
model: validateConsistencyHolder
translateLabel: true
)
(CheckBoxSpec
label: 'Mark as Stable'
name: 'MarkStableCheckBox'
layout: (LayoutFrame 3 0 -214 1 -3 1 -192 1) activeHelpKey: markAsStable
uuid: '35293c9c-d93d-11e7-8a1e-c42c033b4871'
model: isStableHolder
translateLabel: true
)
(LabelSpec
label: 'Tag:'
name: 'Label3'
layout: (LayoutFrame -40 0.5 -241 1 0 0.5 -219 1) activeHelpKey: tag
uuid: '35293db4-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
adjust: right
)
(ComboBoxSpec
name: 'ComboBox1'
layout: (LayoutFrame 0 0.5 -244 1 -3 1 -218 1) activeHelpKey: tag
uuid: '35293ee0-d93d-11e7-8a1e-c42c033b4871'
enableChannel: notMarkAsStableHolder
model: tagHolder
acceptOnReturn: true
acceptOnTab: true
acceptOnLostFocus: true
acceptOnPointerLeave: false
comboList: recentTagsList
)
(CheckBoxSpec
label: 'Remember as Default'
name: 'CheckBox2'
layout: (LayoutFrame 0 0.5 356 0 0 1 378 0) uuid: '52187b7c-3870-11b2-aba0-00d861a3d4eb'
model: rememberTagAsDefaultHolder
translateLabel: true
)
(LabelSpec
label: 'Reason for Checkin:'
name: 'Label6'
layout: (LayoutOrigin 2 0 -184 1) activeHelpKey: checkinReason
uuid: '35294232-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
resizeForLabel: true
adjust: right
)
(RadioButtonSpec
label: 'Bugfix'
name: 'RadioButton1'
layout: (LayoutFrame 20 0.0 -159 1 300 0 -137 1) activeHelpKey: checkinReasonBugfix
uuid: '3529437c-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonBugfix
)
(RadioButtonSpec
label: 'Feature / Enhancement'
name: 'RadioButton2'
layout: (LayoutFrame 20 0 -135 1 -279 1 -113 1) activeHelpKey: checkinReasonFeature
uuid: '35294656-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonFeature
)
(RadioButtonSpec
label: 'Refactoring / Code Cleanup'
name: 'RadioButton3'
layout: (LayoutFrame 9 0.5 -159 1 0 1 -137 1) activeHelpKey: checkinReasonRefactoring
uuid: '35294840-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonRefactoring
)
(RadioButtonSpec
label: 'UI Enhancement / Beautification'
name: 'RadioButton6'
layout: (LayoutFrame 20 0 -111 1 -279 1 -89 1) activeHelpKey: checkinReasonUIEnhancement
uuid: '35294a02-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonUIEnhancement
)
(RadioButtonSpec
label: 'Documentation / Comment Only'
name: 'RadioButton5'
layout: (LayoutFrame 9 0.5 -111 1 0 1 -89 1) activeHelpKey: checkinReasonDocumentation
uuid: '35294bb0-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonDocumentation
)
(RadioButtonSpec
label: 'Tuning'
name: 'RadioButton4a'
layout: (LayoutFrame 20 0 -87 1 -279 1 -65 1) activeHelpKey: checkinReasonTuning
uuid: '35294d5e-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonTuning
)
(RadioButtonSpec
label: 'Quality (Debuggability / Testability)'
name: 'RadioButton4'
layout: (LayoutFrame 9 0.5 -135 1 0 1 -113 1) activeHelpKey: checkinReasonQuality
uuid: '35294f0c-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonQuality
)
(RadioButtonSpec
label: 'None of the Above'
name: 'RadioButton7'
layout: (LayoutFrame 20 0 -63 1 -279 1 -41 1) activeHelpKey: checkinReasonOther
uuid: '352950ba-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonOther
)
(HorizontalPanelViewSpec
name: 'ButtonPanel1'
layout: (LayoutFrame 0 0.0 -40 1 -16 1.0 0 1.0) uuid: '35295268-d93d-11e7-8a1e-c42c033b4871'
horizontalLayout: fitSpace
verticalLayout: centerMax
horizontalSpace: 3
verticalSpace: 2
reverseOrderIfOKAtLeft: true
component:
(SpecCollection
collection: (
(ActionButtonSpec
label: 'Cancel'
name: 'Button2'
uuid: '352953a8-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: doCancel
extent: (Point 183 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 183 34)
)
(ActionButtonSpec
label: 'OK'
name: 'Button1'
uuid: '35295560-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: doAccept
extent: (Point 184 34) usePreferredHeight: true
)
)
) keepSpaceForOSXResizeHandleH: true
)
(RadioButtonSpec
label: 'Workaround (Investigate Further)'
name: 'RadioButton8'
layout: (LayoutFrame 9 0.5 -87 1 0 1 -65 1) activeHelpKey: checkinReasonWorkaround
uuid: '35294d5e-d93d-11e7-8a1e-c42c033b4871'
translateLabel: true
model: checkinReasonHolder
isTriggerOnDown: true
select: reasonWorkaround
)
)
)
)
! !
!CheckinInfoDialog class methodsFor:'opening'!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
^ self
getCheckinInfoFor:infoString
initialAnswer:initialAnswer
withQuickOption:false
"
self getCheckinInfoFor:'hello' initialAnswer:'bla'
"
"Modified (format): / 04-12-2017 / 23:08:50 / cg"
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer withQuickOption:withQuickOption
^ self
getCheckinInfoFor:infoString
initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:#()
"
self getCheckinInfoFor:'hello' initialAnswer:'bla'
"
"Modified: / 12-03-2012 / 12:39:00 / cg"
"Modified (format): / 04-12-2017 / 23:08:40 / cg"
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer withQuickOption:withQuickOption logHistory:logHistoryArg
^ self
getCheckinInfoFor:infoString
initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:logHistoryArg
withValidateConsistencyOption:false
"
self getCheckinInfoFor:'hello' initialAnswer:'bla'
self getCheckinInfoFor:'hello' initialAnswer:'bla' withQuickOption:true
self getCheckinInfoFor:'hello' initialAnswer:'bla' withQuickOption:true logHistory:nil withConsistencyCheckOption:true
"
"Created: / 12-03-2012 / 12:36:26 / cg"
"Modified (format): / 04-12-2017 / 23:08:35 / cg"
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
^ self new
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
"
self getCheckinInfoFor:'hello' initialAnswer:'bla'
"
"Created: / 12-03-2012 / 12:36:26 / cg"
"Modified (format): / 04-12-2017 / 23:07:46 / cg"
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:defaultReason
^ self new
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
isClassCheckin:false
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:defaultReason
"
self getCheckinInfoFor:'hello' initialAnswer:'bla'
"
"Created: / 12-03-2012 / 12:36:26 / cg"
"Modified: / 05-12-2017 / 23:07:06 / cg"
! !
!CheckinInfoDialog methodsFor:'accessing'!
allowEmptyLogMessage
^ allowEmptyLogMessage ? false
"Created: / 06-07-2010 / 11:23:18 / cg"
!
allowEmptyLogMessage:aBoolean
allowEmptyLogMessage := aBoolean
"Created: / 06-07-2010 / 11:23:31 / cg"
!
branchInfo:aString
self branchInfoHolder value:aString
"Created: / 05-12-2017 / 23:08:09 / cg"
!
checkinReason
"returns one of: #(reasonBugfix reasonFeature reasonRefactoring reasonDocumentation reasonOther reasonWorkaround)"
^ self checkinReasonHolder value
!
checkinReason:aSymbolicReason
self assert:( self class possibleReasons includes:aSymbolicReason).
self checkinReasonHolder value:aSymbolicReason
"Modified: / 31-03-2016 / 17:58:45 / cg"
!
description
^ self descriptionHolder value
!
description:aString
self descriptionHolder value:aString allBold
!
isStable
^ self isStableHolder value
!
isStable:aBoolean
self isStableHolder value:aBoolean
!
logHistory:something
logHistory := something.
!
logMessage
^ self logMessageHolder value ? ''
!
logMessage:aString
self logMessageHolder value:aString
!
quickCheckIn
^ self quickCheckInHolder value
!
quickCheckIn:aBoolean
self quickCheckInHolder value:aBoolean
!
repositoryInfo:aString
self repositoryInfoHolder value:aString
"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
!
tag:aStringOrNil
self tagHolder value:aStringOrNil
"Modified: / 12-09-2006 / 12:03:50 / cg"
!
tagIt
^ self tag notEmptyOrNil
"Created: / 12-09-2006 / 13:06:49 / cg"
!
validateConsistency
^ self validateConsistencyHolder value
!
withQuickOption:aBoolean
self quickCheckInEnabledHolder value:aBoolean
"/ self quickCheckInVisibleHolder value:aBoolean
!
withValidateConsistencyOption:aBoolean
self validateConsistencyEnabledHolder value:aBoolean
"/ self validateConsistencyVisibleHolder value:aBoolean
! !
!CheckinInfoDialog methodsFor:'actions'!
showChanges
showChangesAction value
! !
!CheckinInfoDialog methodsFor:'aspects'!
branchInfoHolder
branchInfoHolder isNil ifTrue:[
branchInfoHolder := ValueHolder new.
].
^ branchInfoHolder
"Created: / 05-12-2017 / 23:07:40 / cg"
!
checkinReasonHolder
checkinReasonHolder isNil ifTrue:[
checkinReasonHolder := (LastReason ? self class reasonBugfix) asValue.
].
^ checkinReasonHolder
!
descriptionHolder
descriptionHolder isNil ifTrue:[
descriptionHolder := ValueHolder new.
].
^ descriptionHolder
!
isStableHolder
isStableHolder isNil ifTrue:[
isStableHolder := false asValue.
].
^ isStableHolder.
"Modified: / 16-01-2007 / 16:00:26 / cg"
!
logHistoryHeadLineSelectionHolder
logHistoryHeadLineSelectionHolder isNil ifTrue:[
logHistoryHeadLineSelectionHolder := nil asValue.
logHistoryHeadLineSelectionHolder
onChangeEvaluate:
[
self logMessageHolder value:(logHistory at:logHistoryHeadLineSelectionHolder value)
].
].
^ logHistoryHeadLineSelectionHolder
"Created: / 12-03-2012 / 12:40:36 / cg"
!
logHistoryHeadLines
^ (logHistory ? #())
collect:[:msg |
msg withoutLeadingSeparators asCollectionOfLines first , '...'
]
"Created: / 12-03-2012 / 12:39:35 / cg"
!
logMessageHolder
logMessageHolder isNil ifTrue:[
logMessageHolder := '' asValue.
].
^ logMessageHolder.
"Modified: / 12-03-2012 / 12:34:13 / cg"
!
notMarkAsStableHolder
^ BlockValue forLogicalNot:self isStableHolder
!
quickCheckInEnabledHolder
quickCheckInEnabledHolder isNil ifTrue:[
quickCheckInEnabledHolder := false asValue.
].
^ quickCheckInEnabledHolder
!
quickCheckInHolder
quickCheckInHolder isNil ifTrue:[
quickCheckInHolder := true asValue.
].
^ quickCheckInHolder
!
quickCheckInVisibleHolder
quickCheckInVisibleHolder isNil ifTrue:[
quickCheckInVisibleHolder := true asValue.
].
^ quickCheckInVisibleHolder
!
recentTagsList
^ [ CVSSourceCodeManager recentTags ]
!
rememberTagAsDefaultHolder
rememberTagAsDefaultHolder isNil ifTrue:[
rememberTagAsDefaultHolder := false asValue.
].
^ rememberTagAsDefaultHolder
"Created: / 05-12-2017 / 23:07:40 / cg"
!
repositoryInfoHolder
repositoryInfoHolder isNil ifTrue:[
repositoryInfoHolder := ValueHolder new.
].
^ repositoryInfoHolder
"Created: / 05-12-2017 / 23:07:34 / cg"
!
showChangesButtonVisible
^ showChangesAction notNil
!
tagHolder
tagHolder isNil ifTrue:[
tagHolder := ("CVSSourceCodeManager recentTag ?" '') asValue.
].
^ tagHolder
!
validateConsistencyEnabledHolder
validateConsistencyEnabledHolder isNil ifTrue:[
validateConsistencyEnabledHolder := false asValue.
].
^ validateConsistencyEnabledHolder
!
validateConsistencyHolder
validateConsistencyHolder isNil ifTrue:[
validateConsistencyHolder := true asValue.
].
^ validateConsistencyHolder
!
validateConsistencyVisibleHolder
validateConsistencyVisibleHolder isNil ifTrue:[
validateConsistencyVisibleHolder := true asValue.
].
^ validateConsistencyVisibleHolder
!
warningMessageHolder
warningMessageHolder isNil ifTrue:[
warningMessageHolder := nil asValue.
].
^ warningMessageHolder.
"Created: / 06-07-2010 / 11:30:29 / cg"
! !
!CheckinInfoDialog methodsFor:'opening'!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
isClassCheckin:isClassCheckin
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
^ self
getCheckinInfoFor:infoString
initialAnswer:initialAnswer
withQuickOption:withQuickOption
isClassCheckin:isClassCheckin
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:(LastReason ? self class reasonBugfix)
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption isClassCheckin:isClassCheckin
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:defaultReason
"ask the user for a log-message to be attached to a commit.
Do not allow an empty input (i.e. ask again, until either canceled or a string was given)"
|warnMessage|
warnMessage := nil.
[
|lines infoString1 repositoryInfo branchInfo|
infoString1 := infoString.
lines := infoString asStringCollection.
lines size > 1 ifTrue:[
repositoryInfo := lines second string.
self repositoryInfo:repositoryInfo.
lines size > 2 ifTrue:[
branchInfo := lines third string.
self branchInfo:branchInfo.
].
infoString1 := lines first.
].
DefaultTag notNil ifTrue:[
self tagHolder value:DefaultTag.
self rememberTagAsDefaultHolder value:true.
].
self
description:infoString1;
logMessage:initialAnswer;
withQuickOption:withQuickOption;
withValidateConsistencyOption:withValidateConsistencyOption;
logHistory:logHistoryArg;
checkinReason:defaultReason.
self warningMessageHolder value:warnMessage.
isClassCheckin ifFalse:[
self quickCheckInVisibleHolder value:false.
self quickCheckInEnabledHolder value:false.
self validateConsistencyVisibleHolder value:false.
self validateConsistencyEnabledHolder value:false.
].
self open.
self accepted ifFalse:[ ^ nil ].
] doUntil:[
|stopAsking|
stopAsking := self allowEmptyLogMessage
or:[ (self logMessage) withoutSeparators notEmptyOrNil ].
stopAsking ifFalse:[
warnMessage := (resources string:'Please enter a description of your changes!!') allRed.
].
stopAsking
].
LastReason := self checkinReason.
rememberTagAsDefaultHolder value ifTrue:[
DefaultTag := tagHolder value.
] ifFalse:[
DefaultTag := nil
].
^ self
"
self getCheckinInfoFor:'hello' initialAnswer:'bla'
"
"Created: / 12-03-2012 / 12:36:26 / cg"
"Modified: / 05-12-2017 / 23:07:06 / cg"
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
^ self
getCheckinInfoFor:infoString
initialAnswer:initialAnswer
withQuickOption:withQuickOption
isClassCheckin:false
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:(LastReason ? self class reasonBugfix)
!
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:defaultReason
"ask the user for a log-message to be attached to a commit.
Do not allow an empty input (i.e. ask again, until either canceled or a string was given)"
^ self
getCheckinInfoFor:infoString initialAnswer:initialAnswer
withQuickOption:withQuickOption isClassCheckin:true
logHistory:logHistoryArg
withValidateConsistencyOption:withValidateConsistencyOption
initialReason:defaultReason
! !
!CheckinInfoDialog class methodsFor:'documentation'!
version
^ '$Header$'
!
version_CVS
^ '$Header$'
! !