#FEATURE by cg
class: AbstractSourceCodeManager
class definition
added:
#isPackageWithoutExtensionMethodConfirmation:
#rememberPackageWithoutExtensionMethodConfirmation:
changed: #checkMethodPackagesOf:
--- a/AbstractSourceCodeManager.st Tue Oct 18 18:44:38 2016 +0200
+++ b/AbstractSourceCodeManager.st Mon Oct 31 14:45:25 2016 +0100
@@ -16,7 +16,8 @@
Object subclass:#AbstractSourceCodeManager
instanceVariableNames:''
classVariableNames:'CacheDirectoryName CachingSources DefaultManager ManagerPerModule
- UseWorkTree Verbose WorkTreeDirectoryName'
+ UseWorkTree Verbose WorkTreeDirectoryName
+ PackagesWithoutExtensionMethodConfirmation'
poolDictionaries:''
category:'System-SourceCodeManagement'
!
@@ -1008,16 +1009,25 @@
actions := #(#cancel false #browse true).
].
- answer := OptionBox
- request:(SystemBrowser classResources
- stringWithCRs:msg
- withArgs:args)
- label:'Change packageID ?'
- image:(InfoBox iconBitmap)
- buttonLabels:(Dialog resources array:labels)
- values:actions
- default:true.
-
+ (self isPackageWithoutExtensionMethodConfirmation:aClass package)
+ ifTrue:[
+ answer := true
+ ] ifFalse:[
+ Dialog
+ withOptoutOption:[ self rememberPackageWithoutExtensionMethodConfirmation:aClass package ]
+ labelled:(SystemBrowser classResources string:'Do not show this dialog again (for this package)')
+ do:[
+ answer := OptionBox
+ request:(SystemBrowser classResources
+ stringWithCRs:msg
+ withArgs:args)
+ label:'Change packageID ?'
+ image:(InfoBox iconBitmap)
+ buttonLabels:(Dialog resources array:labels)
+ values:actions
+ default:true.
+ ].
+ ].
answer == #browse ifTrue:[
UserPreferences systemBrowserClass
browseMethods:unassignedMethods
@@ -1775,6 +1785,17 @@
"Created: / 26-01-2012 / 14:30:45 / cg"
!
+isPackageWithoutExtensionMethodConfirmation:aPackageID
+ "usually, the checkin dialog asks if unpackaged methods should be moved
+ to the package.
+ This can be suppressed on a per-package base with a checkbox ('do not...again')
+ in the dialog.
+ This method returns true, if this was done for a particular package"
+
+ ^ PackagesWithoutExtensionMethodConfirmation notNil
+ and:[ PackagesWithoutExtensionMethodConfirmation includes:aPackageID]
+!
+
isResponsibleForModule:module
^ self repositoryInfoPerModule keys includes:module
@@ -1919,6 +1940,19 @@
"Created: / 29-09-2011 / 13:26:29 / cg"
!
+rememberPackageWithoutExtensionMethodConfirmation:aPackageID
+ "usually, the checkin dialog asks if unpackaged methods should be moved
+ to the package.
+ This can be suppressed on a per-package base with a checkbox ('do not...again')
+ in the dialog.
+ This method adds a package to the set of non-asking packages"
+
+ PackagesWithoutExtensionMethodConfirmation isNil ifTrue:[
+ PackagesWithoutExtensionMethodConfirmation := Set new
+ ].
+ PackagesWithoutExtensionMethodConfirmation add:aPackageID
+!
+
revisionAfter:aRevisionString
"generate the next revision number after the given number"