added:
authorClaus Gittinger <cg@exept.de>
Wed, 07 Sep 2011 15:05:04 +0200
changeset 484 72911faa1f0a
parent 483 58521a30b56f
child 485 a2fd0438b8ac
added: #hasRepositorySelectedHolder #repositoryFlushCache changed: #repositoryIsDirectory #repositoryListMenu #versionLoad
MCRepositoryBrowser.st
--- a/MCRepositoryBrowser.st	Wed Sep 07 15:04:18 2011 +0200
+++ b/MCRepositoryBrowser.st	Wed Sep 07 15:05:04 2011 +0200
@@ -394,6 +394,15 @@
          (MenuItem
             label: '-'
           )
+         (MenuItem   
+            enabled: hasRepositorySelectedHolder
+            label: 'Flush Cache'
+            itemValue: repositoryFlushCache
+            translateLabel: true
+          )
+         (MenuItem
+            label: '-'
+          )
          (MenuItem
             enabled: repositoryIsDirectory
             label: 'Browse Directory'
@@ -404,6 +413,8 @@
         nil
         nil
       )
+
+    "Modified: / 07-09-2011 / 15:00:57 / cg"
 !
 
 versionsMenu
@@ -497,6 +508,16 @@
 
 !MCRepositoryBrowser methodsFor:'aspect-queries'!
 
+hasRepositorySelectedHolder
+    ^ BlockValue
+        with:[:h | h value notNil]
+        argument:(self selectedRepositoryHolder)
+
+    "Created: / 13-10-2010 / 17:08:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 07-09-2011 / 13:14:17 / cg"
+    "Created: / 07-09-2011 / 15:00:44 / cg"
+!
+
 hasVersionSelectedAndOperatingSystemIsWindowsHolder
     ^[self hasVersionSelectedHolder value
       and:[ OperatingSystem isMSWINDOWSlike ]]
@@ -515,7 +536,8 @@
 
 repositoryIsDirectory
     ^ BlockValue
-        with:[:h | h value repository isKindOf: MCDirectoryRepository ]
+        with:[:h | h value notNil
+                   and:[ h value repository isKindOf: MCDirectoryRepository ]]
         argument:[ self selectedRepositoryHolder ]
 
     "Created: / 31-08-2011 / 09:08:54 / cg"
@@ -672,6 +694,14 @@
     "Created: / 31-08-2011 / 09:16:33 / cg"
 !
 
+repositoryFlushCache
+    "flush the repository cache - useful only in case of an aborted file load"
+
+    self selectedRepositoryHolder value repository flushCache
+
+    "Created: / 07-09-2011 / 15:02:21 / cg"
+!
+
 setTargetNamespace
     "specify an st/x namespace to be used as default"
 
@@ -784,11 +814,13 @@
 
     entry := self selectedVersionHolder value.
     entry notNil ifTrue:[
-        self versionLoad: entry asMCVersion into:(targetPackage ? PackageId noProjectID)
+        self withWaitCursorDo:[
+            self versionLoad: entry asMCVersion into:(targetPackage ? PackageId noProjectID)
+        ]
     ].
 
     "Modified: / 09-11-2010 / 13:26:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (comment): / 07-09-2011 / 12:45:31 / cg"
+    "Modified: / 07-09-2011 / 14:51:57 / cg"
 !
 
 versionLoad: version into: package
@@ -855,11 +887,11 @@
 !MCRepositoryBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.9 2011-09-07 12:04:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.10 2011-09-07 13:05:04 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.9 2011-09-07 12:04:54 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCRepositoryBrowser.st,v 1.10 2011-09-07 13:05:04 cg Exp $'
 !
 
 version_SVN