#UI_ENHANCEMENT by cg
class: AbstractSourceCodeManager
class definition
changed: #checkMethodPackagesOf:
category of:
#isPackageWithoutExtensionMethodConfirmation:
#rememberPackageWithoutExtensionMethodConfirmation:
can now completely disable the \"has extensions\" dialog.
--- a/AbstractSourceCodeManager.st Sat Nov 12 04:33:06 2016 +0100
+++ b/AbstractSourceCodeManager.st Fri Nov 18 11:37:40 2016 +0100
@@ -17,7 +17,8 @@
instanceVariableNames:''
classVariableNames:'CacheDirectoryName CachingSources DefaultManager ManagerPerModule
UseWorkTree Verbose WorkTreeDirectoryName
- PackagesWithoutExtensionMethodConfirmation'
+ PackagesWithoutExtensionMethodConfirmation
+ SuppressExtensionMethodConfirmation'
poolDictionaries:''
category:'System-SourceCodeManagement'
!
@@ -1009,13 +1010,16 @@
actions := #(#cancel false #browse true).
].
- (self isPackageWithoutExtensionMethodConfirmation:aClass package)
+ (SuppressExtensionMethodConfirmation == true
+ or:[ 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)')
+ andOptoutOption:[ SuppressExtensionMethodConfirmation := true ]
+ labelled:(SystemBrowser classResources string:'Do not show this dialog again (for any package)')
do:[
answer := OptionBox
request:(SystemBrowser classResources
@@ -1080,7 +1084,7 @@
].
^ #base
- "Modified: / 24-07-2011 / 07:13:58 / cg"
+ "Modified: / 18-11-2016 / 11:34:14 / cg"
!
checkTabSpaceConventionIn: aStream
@@ -1307,6 +1311,17 @@
"Created: / 23-08-2006 / 14:10:29 / 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]
+!
+
moduleFromContainerPath:containerPath forClass:aClass
"given a full path as in an RCS header, extract the module."
@@ -1469,6 +1484,19 @@
].
!
+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
+!
+
reportError:msg
|fullMsg|
@@ -1785,17 +1813,6 @@
"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
@@ -1940,19 +1957,6 @@
"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"