diff -r 64f823c2b648 -r 9e7156478039 Tools__CheckinInfoDialog.st --- a/Tools__CheckinInfoDialog.st Thu May 17 21:12:12 2018 +0200 +++ b/Tools__CheckinInfoDialog.st Thu May 17 21:25:55 2018 +0200 @@ -539,13 +539,11 @@ withQuickOption:withQuickOption logHistory:logHistoryArg withValidateConsistencyOption:withValidateConsistencyOption - ^ self - getCheckinInfoFor:infoString - initialAnswer:initialAnswer + ^ self new + getCheckinInfoFor:infoString initialAnswer:initialAnswer withQuickOption:withQuickOption logHistory:logHistoryArg withValidateConsistencyOption:withValidateConsistencyOption - initialReason:(LastReason ? self reasonBugfix) " self getCheckinInfoFor:'hello' initialAnswer:'bla' @@ -561,50 +559,12 @@ withValidateConsistencyOption:withValidateConsistencyOption initialReason:defaultReason - |dialog warnMessage| - - warnMessage := nil. - [ - |lines infoString1 repositoryInfo branchInfo| - - dialog := self new. - - infoString1 := infoString. - lines := infoString asStringCollection. - lines size > 1 ifTrue:[ - repositoryInfo := lines second string. - dialog repositoryInfo:repositoryInfo. - lines size > 2 ifTrue:[ - branchInfo := lines third string. - dialog branchInfo:branchInfo. - ]. - infoString1 := lines first. - ]. - - dialog - description:infoString1; - logMessage:initialAnswer; - withQuickOption:withQuickOption; - withValidateConsistencyOption:withValidateConsistencyOption; - logHistory:logHistoryArg; - checkinReason:defaultReason. - - dialog warningMessageHolder value:warnMessage. - dialog open. - dialog accepted ifFalse:[ ^ nil ]. - ] doUntil:[ - |stopAsking| - - stopAsking := dialog allowEmptyLogMessage - or:[ (dialog logMessage) withoutSeparators notEmptyOrNil ]. - stopAsking ifFalse:[ - warnMessage := (self resources string:'Please enter a description of your changes!!') - withColor:Color red. - ]. - stopAsking - ]. - LastReason := dialog checkinReason. - ^ dialog + ^ self new + getCheckinInfoFor:infoString initialAnswer:initialAnswer + withQuickOption:withQuickOption + logHistory:logHistoryArg + withValidateConsistencyOption:withValidateConsistencyOption + initialReason:defaultReason " @@ -878,6 +838,78 @@ "Created: / 06-07-2010 / 11:30:29 / cg" ! ! +!CheckinInfoDialog methodsFor:'opening'! + +getCheckinInfoFor:infoString initialAnswer:initialAnswer + withQuickOption:withQuickOption + logHistory:logHistoryArg + withValidateConsistencyOption:withValidateConsistencyOption + ^ self + getCheckinInfoFor:infoString + initialAnswer:initialAnswer + withQuickOption:withQuickOption + logHistory:logHistoryArg + withValidateConsistencyOption:withValidateConsistencyOption + initialReason:(LastReason ? self class reasonBugfix) +! + +getCheckinInfoFor:infoString initialAnswer:initialAnswer + withQuickOption:withQuickOption + logHistory:logHistoryArg + withValidateConsistencyOption:withValidateConsistencyOption + initialReason:defaultReason + + |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. + ]. + + self + description:infoString1; + logMessage:initialAnswer; + withQuickOption:withQuickOption; + withValidateConsistencyOption:withValidateConsistencyOption; + logHistory:logHistoryArg; + checkinReason:defaultReason. + + self warningMessageHolder value:warnMessage. + self open. + self accepted ifFalse:[ ^ nil ]. + ] doUntil:[ + |stopAsking| + + stopAsking := self allowEmptyLogMessage + or:[ (self logMessage) withoutSeparators notEmptyOrNil ]. + stopAsking ifFalse:[ + warnMessage := (self resources string:'Please enter a description of your changes!!') + withColor:Color red. + ]. + stopAsking + ]. + LastReason := self checkinReason. + ^ self + + " + self getCheckinInfoFor:'hello' initialAnswer:'bla' + " + + "Created: / 12-03-2012 / 12:36:26 / cg" + "Modified: / 05-12-2017 / 23:07:06 / cg" +! ! + !CheckinInfoDialog class methodsFor:'documentation'! version