initial checkin
authorClaus Gittinger <cg@exept.de>
Mon, 18 Apr 2011 20:13:44 +0200
changeset 9823 d663bd23a9e0
parent 9822 29cfe9e3a532
child 9824 8da0bd3562a9
initial checkin
SmallTeamSourceCodeManagementSettingsAppl.st
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SmallTeamSourceCodeManagementSettingsAppl.st	Mon Apr 18 20:13:44 2011 +0200
@@ -0,0 +1,923 @@
+"
+ COPYRIGHT (c) 2002 by 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' }"
+
+AbstractSettingsApplication subclass:#SmallTeamSourceCodeManagementSettingsAppl
+	instanceVariableNames:'sourceCacheDir useManager availableManagers condenseSourceCache
+		setupSourceCodeManager checkClassesWhenCheckingIn
+		formattingConfiguration flushSourceCache localSourceFirst
+		repositoryHolder manager repository listOfModules
+		cvsRootPrototypeList addPerModuleRoot removeEnabled
+		perModuleRootModule acceptChannel removePerModuleRoot
+		perModuleRoot cvsRootHolder selectedPerModuleRoot
+		cvsBinDirectoryHolder cvsExecutableHolder rootsPerModule
+		cvsLoginInModuleEnabled cvsLoginEnabled
+		selectedManagerTypeIndexHolder managerIsCVSSourceCodeManager
+		managerIsStoreSourceCodeManager storeLoginEnabled
+		storeHostPrototypeList storeHostnameHolder storeUsernameHolder
+		storePasswordHolder perStoreModuleHostnameHolder
+		perStoreModuleUsernameHolder perStoreModulePasswordHolder
+		perStoreModuleRoot perStoreModuleRootModule
+		selectedPerStoreModuleRoot storeConnectEnabled
+		storeConnectInModuleEnabled perModuleFieldsEnableHolder
+		managerIsSmallTeamSourceCodeManager
+		selectedPerSmallTeamModuleRoot
+		perSmallTeamModuleFieldsEnableHolder perSmallTeamModuleRoot
+		perSmallTeamModuleRootModule perSmallTeamModuleHostnameHolder
+		smallTeamHostnameHolder verboseSourceCodeAccess keepMethodSource'
+	classVariableNames:'RecentlyUsedCVSRoots RecentlyUsedStoreHosts
+		RecentlyUsedSmallTeamHosts LastStoreHost LastStoreUser
+		LastStorePassword'
+	poolDictionaries:''
+	category:'System-SourceCodeManagement'
+!
+
+!SmallTeamSourceCodeManagementSettingsAppl class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 2002 by 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
+"
+    SmallTeam source code settings - highly experimental and unsupported.  
+"
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl class methodsFor:'image specs'!
+
+defaultIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self defaultIcon inspect
+     ImageEditor openOnClass:self andSelector:#defaultIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'AbstractSettingsApplication::SourceCodeManagementSettingsAppl class defaultIcon'
+        ifAbsentPut:[(Depth8Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(8 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+@@@@@@@@@@@A@PHB@0P@@@@@@@@@@@@@@@@@@@HEA \HA $JB0HD@@@@@@@@@@@@@@HLA04NC0HD@@L@@ P@@@@@@@@@@@@ED@ NDP@@@@@@@@@D@@@@@@@@
+@@@BA \FAPP@@@@@@@@@@@P@@@@@@@@@AQ@RC0@@@@@@@@@@@@@@@@@@@@@@@@TGA!!DD@@@@@@@@@@@@@@@@@@@D@PDIA08OA@@@@@@@@@@@@@@@@@@@AP S
+A0XIBPXGC0P@@@@@@@@@@@@@@@@ECAPLBPXOAP@@@@@@EQX@@@@@@@@@@@TIE@XOAP@@@@@@EQ\XE @@@@@@@@@@AP$OAP@@@@@@FQ\ZE!! V@@@@@@@@@@@E
+F0@@@@@@EQ\ZF!!(VFAX@@@@@@@@@@@@@@@@ZEQ\VE!!(ZF!!XWF @@@@@@@@@@@@@@@@@@@A\ZE!!(@@@@@@@@@@@@@@@@@@@@@@@@XE!!XZ@@@@@@@@@@@@@@@@
+@@@@@@@@EQ(V@@@@@@@@@@@@@@@@@@@@@@@@EQ\VE @@@@@@@@@@@@@@@@@@@@@@EQ VE @@@@@@@@@@@@@@F @@@@@WEQ VE!!(@@@@@@@@@@@@@@@@@E!!\W
+EQXVE @@@@@@@@@@@@@@@@@@@@@@@A(Z@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 32 64 0 0 64 0 32 32 0 0 32 0 32 96 32 96 192 128 192 224 192 160 224 160 32 128 64 64 96 64 64 96 32 32 160 64 160 224 192 64 160 96 32 128 32 224 224 224 64 128 64 160 192 160 224 224 192 32 160 96 160 160 160 64 64 64 96 96 96 128 128 128 192 192 192 32 32 32 32 64 32]; mask:((ImageMask new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@O8@@?>@A??@A?C C<@0C8@PC8@@??@@??F@_>O@O<_ G8?0C1?8A#?<@C?<@@_@H@_@L@?@GC>@C?>@A?<@@_0@') ; yourself); yourself]
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl 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:SmallTeamSourceCodeManagementSettingsAppl andSelector:#windowSpec
+     SmallTeamSourceCodeManagementSettingsAppl new openInterface:#windowSpec
+     SmallTeamSourceCodeManagementSettingsAppl open
+    "
+
+    <resource: #canvas>
+
+    ^ 
+     #(FullSpec
+        name: windowSpec
+        window: 
+       (WindowSpec
+          label: 'Small Team Settings'
+          name: 'Small Team Settings'
+          min: (Point 10 10)
+          bounds: (Rectangle 0 0 659 580)
+        )
+        component: 
+       (SpecCollection
+          collection: (
+           (VerticalPanelViewSpec
+              name: 'VerticalPanel2'
+              layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              horizontalLayout: fit
+              verticalLayout: topSpace
+              horizontalSpace: 3
+              verticalSpace: 20
+              component: 
+             (SpecCollection
+                collection: (
+                 (VerticalPanelViewSpec
+                    name: 'VerticalPanel3'
+                    horizontalLayout: fit
+                    verticalLayout: top
+                    horizontalSpace: 3
+                    verticalSpace: 4
+                    component: 
+                   (SpecCollection
+                      collection: (
+                       (ViewSpec
+                          name: 'ManagerSetupBoxx'
+                          component: 
+                         (SpecCollection
+                            collection: (
+                             (FramedBoxSpec
+                                label: 'SmallTeam Setup'
+                                name: 'SmalltalkSmallTeamSetupBox'
+                                layout: (LayoutFrame 0 0 0 0 0 1 0 1)
+                                labelPosition: topLeft
+                                translateLabel: true
+                                component: 
+                               (SpecCollection
+                                  collection: (
+                                   (ViewSpec
+                                      name: 'HostBoxSS'
+                                      layout: (LayoutFrame 0 0 0 0 0 1 25 0)
+                                      component: 
+                                     (SpecCollection
+                                        collection: (
+                                         (LabelSpec
+                                            label: 'Host:'
+                                            name: 'SmallTeamHostLabel'
+                                            layout: (LayoutFrame 0 0.0 0 0 40 0.25 22 0)
+                                            level: 0
+                                            translateLabel: true
+                                            adjust: right
+                                          )
+                                         (ComboBoxSpec
+                                            name: 'SmallTeamHostComboBox'
+                                            layout: (LayoutFrame 44 0.25 0 0 0 1 22 0)
+                                            tabable: true
+                                            model: smallTeamHostnameHolder
+                                            immediateAccept: true
+                                            acceptOnLeave: true
+                                            acceptOnReturn: true
+                                            acceptOnTab: true
+                                            acceptOnLostFocus: true
+                                            acceptChannel: acceptChannel
+                                            acceptOnPointerLeave: true
+                                            comboList: smallTeamHostPrototypeList
+                                          )
+                                         )
+                                       
+                                      )
+                                    )
+                                   (HorizontalPanelViewSpec
+                                      name: 'HorizontalPanel7'
+                                      layout: (LayoutFrame -130 1 51 0 0 1 82 0)
+                                      horizontalLayout: fitSpace
+                                      verticalLayout: center
+                                      horizontalSpace: 3
+                                      verticalSpace: 3
+                                      component: 
+                                     (SpecCollection
+                                        collection: (
+                                         (ActionButtonSpec
+                                            label: 'Try to Connect'
+                                            name: 'TryConnectButton4'
+                                            translateLabel: true
+                                            tabable: true
+                                            model: smallTeamConnect
+                                            enableChannel: storeConnectEnabled
+                                            extent: (Point 124 22)
+                                          )
+                                         )
+                                       
+                                      )
+                                    )
+                                   (LabelSpec
+                                      label: 'Host per Module:'
+                                      name: 'perSmallTeamModuleLabel'
+                                      layout: (LayoutFrame 0 0.0 82 0 40 0.25 104 0)
+                                      translateLabel: true
+                                      adjust: right
+                                    )
+                                   (SequenceViewSpec
+                                      name: 'List3'
+                                      layout: (LayoutFrame 44 0.25 82 0 0 1 180 0)
+                                      tabable: true
+                                      model: selectedPerSmallTeamModuleRoot
+                                      hasHorizontalScrollBar: true
+                                      hasVerticalScrollBar: true
+                                      miniScrollerHorizontal: true
+                                      useIndex: false
+                                      sequenceList: listOfModules
+                                    )
+                                   (LabelSpec
+                                      label: 'Module:'
+                                      name: 'Label12'
+                                      layout: (LayoutFrame 0 0.0 186 0 40 0.25 203 0)
+                                      translateLabel: true
+                                      adjust: right
+                                    )
+                                   (InputFieldSpec
+                                      name: 'EntryField3'
+                                      layout: (LayoutFrame 44 0.25 182 0 0 1 204 0)
+                                      tabable: true
+                                      model: perSmallTeamModuleRoot
+                                      acceptChannel: acceptChannel
+                                      acceptOnPointerLeave: true
+                                    )
+                                   (LabelSpec
+                                      label: 'Host:'
+                                      name: 'Label13'
+                                      layout: (LayoutFrame 0 0.0 211 0 40 0.25 228 0)
+                                      translateLabel: true
+                                      adjust: right
+                                    )
+                                   (ComboBoxSpec
+                                      name: 'ComboBox2'
+                                      layout: (LayoutFrame 44 0.25 207 0 0 1 229 0)
+                                      tabable: true
+                                      model: perSmallTeamModuleHostnameHolder
+                                      immediateAccept: true
+                                      acceptOnLeave: true
+                                      acceptOnReturn: true
+                                      acceptOnTab: true
+                                      acceptOnLostFocus: true
+                                      acceptChannel: acceptChannel
+                                      acceptOnPointerLeave: true
+                                      comboList: smallTeamHostPrototypeList
+                                    )
+                                   (HorizontalPanelViewSpec
+                                      name: 'HorizontalPanel8'
+                                      layout: (LayoutFrame 44 0.25 -25 1 -10 0.65 6 1)
+                                      horizontalLayout: fit
+                                      verticalLayout: center
+                                      horizontalSpace: 3
+                                      verticalSpace: 3
+                                      component: 
+                                     (SpecCollection
+                                        collection: (
+                                         (ActionButtonSpec
+                                            label: 'Add/Apply'
+                                            name: 'AddButton5'
+                                            translateLabel: true
+                                            tabable: true
+                                            model: addPerSmallTeamModuleHost
+                                            extent: (Point 96 22)
+                                          )
+                                         (ActionButtonSpec
+                                            label: 'Remove'
+                                            name: 'RemoveButton6'
+                                            translateLabel: true
+                                            tabable: true
+                                            model: removePerSmallTeamModuleHost
+                                            enableChannel: removeEnabled
+                                            extent: (Point 97 22)
+                                          )
+                                         )
+                                       
+                                      )
+                                    )
+                                   (HorizontalPanelViewSpec
+                                      name: 'HorizontalPanel9'
+                                      layout: (LayoutFrame 10 0.65 -25 1 0 1 6 1)
+                                      horizontalLayout: fit
+                                      verticalLayout: center
+                                      horizontalSpace: 3
+                                      verticalSpace: 3
+                                      component: 
+                                     (SpecCollection
+                                        collection: (
+                                         (ActionButtonSpec
+                                            label: 'Try to Connect'
+                                            name: 'ConnectButton7'
+                                            translateLabel: true
+                                            tabable: true
+                                            model: connectPerSmallTeamModuleHost
+                                            enableChannel: storeConnectInModuleEnabled
+                                            extent: (Point 103 22)
+                                          )
+                                         (ActionButtonSpec
+                                            label: 'Browse'
+                                            name: 'BrowseButton8'
+                                            translateLabel: true
+                                            tabable: true
+                                            model: browsePerSmallTeamModuleHost
+                                            enableChannel: storeConnectInModuleEnabled
+                                            extent: (Point 103 22)
+                                          )
+                                         )
+                                       
+                                      )
+                                    )
+                                   )
+                                 
+                                )
+                              )
+                             )
+                           
+                          )
+                          extent: (Point 659 327)
+                        )
+                       )
+                     
+                    )
+                    extent: (Point 659 768)
+                  )
+                 )
+               
+              )
+            )
+           )
+         
+        )
+      )
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'accessing'!
+
+manager
+
+    ^ Smalltalk at:#SourceCodeManager
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'actions'!
+
+addModule:module withData:data
+    (self listOfModules includes:module) ifFalse:[
+        self listOfModules add:module; sort.
+    ].
+    rootsPerModule at:module put:data.
+
+    self updateModifiedChannel.
+
+    "Created: / 08-11-2006 / 19:25:21 / cg"
+!
+
+basicReadSettings
+    self initialize.
+
+    self sourceCacheDir value:(SmallTeamSourceCodeManager cacheDirectoryName).
+    "/ SmallTeamSourceCodeManager forgetDisabledModules.
+
+    (Array with:SmallTeamSourceCodeManager) "self availableManagers" do:[:eachManager |
+        |infoPerModule|
+
+        infoPerModule := eachManager repositoryInfoPerModule.
+        infoPerModule keysAndValuesDo:[:module :info | 
+            rootsPerModule at:module put:(Array with:eachManager with:info).
+        ].
+    ].
+
+    "/ self updateSelectedManager.
+
+    rootsPerModule notNil ifTrue:[
+        self listOfModules removeAll.
+        listOfModules addAll:rootsPerModule keys asList.
+    ].
+"/    self selectedPerModuleRootChanged.
+
+    "Modified: / 18-04-2011 / 18:41:03 / cg"
+!
+
+basicSaveSettings
+    |modules nm fn|
+
+    nm := self sourceCacheDir value.
+    nm notEmptyOrNil ifTrue:[
+        (fn := nm asFilename) exists ifFalse:[
+            (self confirm:('Cache directory ''' , nm , ''' does not exist\create ?' withCRs)) ifTrue:[
+                fn recursiveMakeDirectory; 
+                   makeReadableForAll;
+                   makeWritableForAll;
+                   makeExecutableForAll.
+            ]
+        ].
+        (fn isDirectory
+        and:[fn isReadable
+        and:[fn isWritable]]) ifTrue:[
+            SmallTeamSourceCodeManager cacheDirectoryName:nm.
+        ] ifFalse:[
+            self warn:'Invalid sourceCache directory.'
+        ]
+    ].
+
+    (Array with:SmallTeamSourceCodeManager) "self availableManagers" do:[:eachManager |
+        |infoPerModule|
+        modules := rootsPerModule select:[:entry | entry first == eachManager].
+        infoPerModule := Dictionary new.
+        modules keysAndValuesDo:[:module :entry | 
+            entry first == eachManager ifTrue:[
+                infoPerModule at:module put:(entry second).
+            ].
+        ].
+        eachManager repositoryInfoPerModule:infoPerModule.
+    ].
+
+    self basicSaveSmallTeamSettings.
+
+    self sourceCacheDir value:(SmallTeamSourceCodeManager cacheDirectoryName).
+
+    DebugView newDebugger. "/ ???
+
+    self acceptChannel value.
+
+    "Modified: / 18-04-2011 / 18:30:45 / cg"
+!
+
+condenseSourceCache
+    self withWaitCursorDo:[ AbstractSourceCodeManager condenseSourceCache ].
+    Method flushSourceStreamCache.
+
+    "Modified: / 28-11-2006 / 12:21:33 / cg"
+!
+
+flushSourceCache
+    self withWaitCursorDo:[ AbstractSourceCodeManager flushSourceCache ].
+    Method flushSourceStreamCache.
+
+    "Modified: / 28-11-2006 / 12:21:21 / cg"
+!
+
+removePerModuleRoot
+
+    |module|
+
+    acceptChannel value:true.    
+    module := self perModuleRootModule value.
+    self listOfModules remove:module ifAbsent:nil.
+    rootsPerModule removeKey:module ifAbsent:nil.
+    self perModuleRootModule value:nil.
+    self perModuleRoot value:nil.
+    self updateModifiedChannel.
+!
+
+setupSourceCodeManager
+
+   AbstractLauncherApplication::LauncherDialogs cvsConfigurationDialog.
+   manager := (Smalltalk at:#SourceCodeManager).
+   manager notNil ifTrue:[
+        repositoryHolder value: manager repositoryName.
+        sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
+   ].
+
+    "Modified: / 16-08-2006 / 11:07:51 / cg"
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'actions - smallTeam'!
+
+addPerSmallTeamModuleHost
+    |module host|
+
+    acceptChannel value:true.    
+
+    module := self perSmallTeamModuleRoot value.
+    host := self perSmallTeamModuleHostnameHolder value.
+
+    self addModule:module withData:(Array with:SmallTeamSourceCodeManager with:host).
+
+    "Created: / 09-11-2006 / 14:35:50 / cg"
+!
+
+basicSaveSmallTeamSettings
+    |host|
+
+    SmallTeamSourceCodeManager hostName:(host := self smallTeamHostnameHolder value withoutSeparators).
+
+    RecentlyUsedSmallTeamHosts isNil ifTrue:[
+        RecentlyUsedSmallTeamHosts := OrderedCollection new.
+    ].
+    (RecentlyUsedSmallTeamHosts includes:host) ifFalse:[
+        RecentlyUsedSmallTeamHosts addFirst:host.
+        RecentlyUsedSmallTeamHosts size > 20 ifTrue:[
+            RecentlyUsedSmallTeamHosts removeLast.
+        ].
+    ].
+
+    "Created: / 09-11-2006 / 14:58:44 / cg"
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'aspects'!
+
+acceptChannel
+
+    acceptChannel isNil ifTrue:[
+        acceptChannel := TriggerValue new.
+    ].
+    ^ acceptChannel.
+!
+
+checkClassesWhenCheckingIn
+
+    checkClassesWhenCheckingIn isNil ifTrue:[
+        checkClassesWhenCheckingIn := (currentUserPrefs at:#checkClassesWhenCheckingIn ifAbsent:true) asValue.
+        checkClassesWhenCheckingIn onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ checkClassesWhenCheckingIn.
+!
+
+keepMethodSource
+
+    keepMethodSource isNil ifTrue:[
+        keepMethodSource := ValueHolder new.
+        keepMethodSource onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ keepMethodSource.
+!
+
+listOfModules
+
+    listOfModules isNil ifTrue:[
+        rootsPerModule notNil ifTrue:[
+            listOfModules := rootsPerModule keys asList.
+        ].
+        listOfModules sort.
+        listOfModules onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ listOfModules.
+!
+
+localSourceFirst
+
+    localSourceFirst isNil ifTrue:[
+        localSourceFirst := ValueHolder new.
+        localSourceFirst onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ localSourceFirst.
+!
+
+managerIsCVSSourceCodeManager
+    managerIsCVSSourceCodeManager isNil ifTrue:[
+        managerIsCVSSourceCodeManager := (SourceCodeManager notNil and:
+                                         [SourceCodeManager isCVS]) asValue.
+    ].
+    ^ managerIsCVSSourceCodeManager.
+
+    "Created: / 16-08-2006 / 10:56:38 / cg"
+!
+
+managerIsSmallTeamSourceCodeManager
+    managerIsSmallTeamSourceCodeManager isNil ifTrue:[
+        managerIsSmallTeamSourceCodeManager := (SourceCodeManager notNil and:
+                                         [SourceCodeManager isSmallTeam]) asValue.
+    ].
+    ^ managerIsSmallTeamSourceCodeManager.
+
+    "Created: / 09-11-2006 / 14:33:53 / cg"
+!
+
+managerIsStoreSourceCodeManager
+    managerIsStoreSourceCodeManager isNil ifTrue:[
+        managerIsStoreSourceCodeManager := (SourceCodeManager notNil and:
+                                         [SourceCodeManager isStore]) asValue.
+    ].
+    ^ managerIsStoreSourceCodeManager.
+
+    "Created: / 16-08-2006 / 10:57:13 / cg"
+!
+
+perModuleFieldsEnableHolder
+
+    perModuleFieldsEnableHolder isNil ifTrue:[
+        perModuleFieldsEnableHolder := true asValue.
+        perModuleFieldsEnableHolder addDependent:self.
+    ].
+    ^ perModuleFieldsEnableHolder.
+!
+
+perModuleRoot
+    perModuleRoot isNil ifTrue:[
+        perModuleRoot := ValueHolder new.
+        perModuleRoot addDependent:self.
+    ].
+    ^ perModuleRoot.
+!
+
+perModuleRootModule
+    perModuleRootModule isNil ifTrue:[
+        perModuleRootModule := ValueHolder new.
+    ].
+    ^ perModuleRootModule.
+!
+
+perSmallTeamModuleHostnameHolder
+    perSmallTeamModuleHostnameHolder isNil ifTrue:[
+        perSmallTeamModuleHostnameHolder := ValueHolder new.
+    ].
+    ^ perSmallTeamModuleHostnameHolder.
+
+    "Created: / 09-11-2006 / 14:40:29 / cg"
+!
+
+perSmallTeamModuleRoot
+    perSmallTeamModuleRoot isNil ifTrue:[
+        perSmallTeamModuleRoot := ValueHolder new.
+        perSmallTeamModuleRoot addDependent:self.
+    ].
+    ^ perSmallTeamModuleRoot.
+
+    "Created: / 09-11-2006 / 14:40:35 / cg"
+!
+
+perSmallTeamModuleRootModule
+    perSmallTeamModuleRootModule isNil ifTrue:[
+        perSmallTeamModuleRootModule := ValueHolder new.
+    ].
+    ^ perSmallTeamModuleRootModule.
+
+    "Created: / 09-11-2006 / 14:40:41 / cg"
+!
+
+removeEnabled
+
+    removeEnabled isNil ifTrue:[
+        removeEnabled := false asValue.
+    ].
+    ^ removeEnabled.
+!
+
+selectedPerModuleRoot
+    selectedPerModuleRoot isNil ifTrue:[
+        selectedPerModuleRoot := ValueHolder new.
+        selectedPerModuleRoot addDependent:self.
+    ].
+    ^ selectedPerModuleRoot.
+!
+
+selectedPerSmallTeamModuleRoot
+    selectedPerSmallTeamModuleRoot isNil ifTrue:[
+        selectedPerSmallTeamModuleRoot := ValueHolder new.
+        selectedPerSmallTeamModuleRoot addDependent:self.
+    ].
+    ^ selectedPerSmallTeamModuleRoot.
+
+    "Created: / 09-11-2006 / 14:39:15 / cg"
+!
+
+smallTeamHostnameHolder
+
+    smallTeamHostnameHolder isNil ifTrue:[
+        smallTeamHostnameHolder := '' asValue.
+        "/ smallTeamHostnameHolder addDependent:self.
+    ].
+    ^ smallTeamHostnameHolder.
+
+    "Created: / 09-11-2006 / 15:04:10 / cg"
+!
+
+sourceCacheDir
+    sourceCacheDir isNil ifTrue:[
+        sourceCacheDir := ValueHolder new.
+        sourceCacheDir onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ sourceCacheDir.
+!
+
+useManager
+    useManager isNil ifTrue:[
+        useManager := ValueHolder new.
+        useManager onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ useManager.
+!
+
+verboseSourceCodeAccess
+    verboseSourceCodeAccess isNil ifTrue:[
+        verboseSourceCodeAccess := false asValue.
+        verboseSourceCodeAccess onChangeSend:#updateModifiedChannel to:self
+    ].
+    ^ verboseSourceCodeAccess.
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'change & update'!
+
+selectedPerModuleRootChanged
+    |module entry|
+
+    self acceptChannel value:true.    
+    module := self selectedPerModuleRoot value.
+    module isNil ifTrue:[ 
+        self removeEnabled value:false.
+        self perModuleRootModule value:' '.
+        self perModuleRoot value:''.
+        ^ self
+    ].
+
+    entry := rootsPerModule at:module ifAbsent:#().    
+    (entry first = CVSSourceCodeManager) ifTrue:[
+        self removeEnabled value:true.
+        self perModuleRootModule value:module.
+        self perModuleRoot value:(entry at:2).
+    ] ifFalse:[
+        self removeEnabled value:false.
+        self perModuleRootModule value:module , ' ',('<<use ',entry first managerTypeName,'>>') allBold.
+        self perModuleRoot value:''.
+    ].
+!
+
+selectedPerSmallTeamModuleRootChanged
+    |module entry|
+
+    self acceptChannel value:true.    
+
+    module := self selectedPerSmallTeamModuleRoot value.
+    module isNil ifTrue:[ 
+        self removeEnabled value:false.
+        self perSmallTeamModuleRoot value:''.
+        self perSmallTeamModuleHostnameHolder value:''.
+        ^ self
+    ].
+
+    entry := rootsPerModule at:module.    
+    (entry first = SmallTeamSourceCodeManager) ifTrue:[
+        self removeEnabled value:true.
+        self perSmallTeamModuleRoot value:module.
+        self perSmallTeamModuleHostnameHolder value:(entry at:2).
+    ] ifFalse:[
+        self removeEnabled value:false.
+        self perSmallTeamModuleRoot value:module , ' ',('<<use ',entry first managerTypeName,'>>') allBold.
+        self perSmallTeamModuleHostnameHolder value:''.
+    ].
+
+    "Created: / 09-11-2006 / 14:39:04 / cg"
+!
+
+sourceDirChanged
+    |nm fn previousDir|
+
+    manager isNil ifTrue:[^ self].
+
+    previousDir := AbstractSourceCodeManager cacheDirectoryName.
+
+    nm := self sourceCacheDir value.
+    nm isEmptyOrNil ifTrue:[^ self].
+
+    (fn := nm asFilename) exists ifFalse:[
+        (self confirm:(resources 
+                            stringWithCRs:'SourceCache directory "%1" does not exist.\Create ?'
+                            with:nm)
+        ) ifFalse:[
+            self sourceCacheDir value:previousDir.
+            ^ self.
+        ].
+        fn 
+            recursiveMakeDirectory; 
+            makeReadableForAll;
+            makeWritableForAll;
+            makeExecutableForAll.
+        ^ self.
+    ].
+
+    (fn isDirectory) ifFalse:[
+        self warn:(resources 
+                            stringWithCRs:'Not a directory: "%1"'
+                            with:nm).
+        self sourceCacheDir value:previousDir.
+        ^ self.
+    ].
+
+    (fn isReadable and:[fn isWritable]) ifFalse:[
+        (self confirm:(resources 
+                            stringWithCRs:'SourceCache directory "%1" is not both readable and writable.\Change ?'
+                            with:nm)
+        ) ifFalse:[
+            self sourceCacheDir value:previousDir.
+            ^ self.
+        ].
+        fn
+            makeReadableForAll;
+            makeWritableForAll;
+            makeExecutableForAll.
+    ].
+"/    (fn isReadableForAll and:[fn isWritableForAll]) ifFalse:[
+"/        (self confirm:(resources 
+"/                            stringWithCRs:'SourceCache directory "%1" is not both readable and writable for other users.\Change ?'
+"/                            with:nm)
+"/        ) ifTrue:[
+"/            fn
+"/                makeReadableForAll;
+"/                makeWritableForAll;
+"/                makeExecutableForAll.
+"/        ]
+"/    ].
+!
+
+update:something with:aParameter from:changedObject 
+    "/ common    
+    changedObject == sourceCacheDir ifTrue:[
+        self sourceDirChanged.
+        self updateModifiedChannel.
+        ^ self
+    ].
+
+    "/ SmallTeam
+    changedObject == selectedPerSmallTeamModuleRoot ifTrue:[
+        self selectedPerSmallTeamModuleRootChanged.
+        ^ self
+    ].
+
+    super update:something with:aParameter from:changedObject
+
+    "Modified: / 18-04-2011 / 18:14:41 / cg"
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'help'!
+
+helpFilename
+    ^ 'Launcher/cvsSetup.html'
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'initialization & release'!
+
+initialize
+    (AbstractSourceCodeManager notNil) ifTrue:[ AbstractSourceCodeManager autoload ].
+
+    useManager := false asValue.
+    useManager onChangeSend:#updateModifiedChannel to:self.
+
+    sourceCacheDir := nil asValue.
+    sourceCacheDir addDependent:self.
+
+    repositoryHolder := '' asValue.
+    rootsPerModule := Dictionary new.
+
+    (Array with:SmallTeamSourceCodeManager) "self availableManagers" do:[:eachManager |
+        eachManager repositoryInfoPerModule 
+            keysAndValuesDo:[:module :info |
+                module withoutSeparators ~= module ifTrue:[
+                    self halt:'should not happen any longer'
+                ].
+                rootsPerModule at:module put:(Array with:eachManager with:info)
+            ].
+    ].
+
+    super initialize.
+
+    "Modified: / 18-04-2011 / 18:37:20 / cg"
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl methodsFor:'queries'!
+
+cvsRootFromCVSRootFileOrNil
+    |cvsDir cvsRootFile cvsRoot|
+
+    cvsDir := 'CVS' asFilename.
+    cvsDir isDirectory ifTrue:[
+        cvsRootFile := cvsDir construct:'Root'.
+        cvsRootFile isReadable ifTrue:[
+            cvsRoot := cvsRootFile contents firstIfEmpty:nil.
+        ].
+    ].
+    ^ cvsRoot
+!
+
+hasManager
+    "true if ANY source code management class is available"
+
+    ^ AbstractSourceCodeManager notNil and:[AbstractSourceCodeManager isLoaded]
+!
+
+hasUnsavedChanges
+    ((SmallTeamSourceCodeManager cacheDirectoryName ? '') ~= (self sourceCacheDir value ? '')) ifTrue:[^ true].
+
+    (Array with:SmallTeamSourceCodeManager) "self availableManagers" do:[:mgr |
+        |modules|
+
+        modules := rootsPerModule select:[:entry | entry first == mgr].
+
+        mgr repositoryInfoPerModule keysAndValuesDo:[:module :info |
+            ((modules includesKey:module) and:[info = (modules at:module) second])
+            ifFalse:[^ true].
+        ].
+        modules keysAndValuesDo:[:module :info|
+            ((mgr repositoryInfoPerModule includesKey:module) and:[(mgr repositoryInfoPerModule at:module) = info second])
+            ifFalse:[^ true].
+        ].
+    ].
+
+    ^ false
+
+    "Modified: / 18-04-2011 / 18:41:28 / cg"
+! !
+
+!SmallTeamSourceCodeManagementSettingsAppl class methodsFor:'documentation'!
+
+version_CVS
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/SmallTeamSourceCodeManagementSettingsAppl.st,v 1.1 2011-04-18 18:13:44 cg Exp $'
+! !