much faster startup in openMyWorkspace_new
authorClaus Gittinger <cg@exept.de>
Wed, 28 Sep 2011 07:52:12 +0200
changeset 10730 23c04d952143
parent 10729 f4109bfaad31
child 10731 5904065850c6
much faster startup in openMyWorkspace_new format beautified: switchToBookmarkEntry:
WorkspaceApplication.st
--- a/WorkspaceApplication.st	Wed Sep 28 01:28:42 2011 +0200
+++ b/WorkspaceApplication.st	Wed Sep 28 07:52:12 2011 +0200
@@ -1689,32 +1689,53 @@
 !
 
 openMyWorkspace_new
-
-    | ws |
-
-    ws := self openWith: nil.
-    ws enqueueDelayedAction:[
-        Error handle:[:ex |
-            "/ no time to debug that stuff now...
-            Dialog information:'Error in bookmark handling: ',ex description
-        ] do:[
-            BookmarkList forWorkspace myWorkspaces do:[:bookmark|
-                ws switchToBookmarkEntry: bookmark
-            ].
+    "open showing tabs for ALL bookmarked workspace files"
+
+    |workspace|
+
+"/    workspace := self openWith: nil.
+"/    workspace enqueueDelayedAction:[
+"/        Error handle:[:ex |
+"/            "/ no time to debug that stuff now...
+"/            Dialog information:'Error in bookmark handling: ',ex description
+"/        ] do:[
+"/            BookmarkList forWorkspace myWorkspaces do:[:bookmark|
+"/                workspace switchToBookmarkEntry: bookmark
+"/            ].
+"/
+"/
+"/
+"/        ].
+"/        workspace selectedWorkspaceIndexHolder value: 1.
+"/    ].
+
+    workspace := self new.
+    workspace allButOpen.
+
+    Error handle:[:ex |
+        ex reject.
+        "/ no time to debug that stuff now...
+        Dialog information:'Error in bookmark handling: ',ex description
+    ] do:[
+        BookmarkList forWorkspace myWorkspaces do:[:bookmark|
+            workspace switchToBookmarkEntry: bookmark
         ].
-        ws selectedWorkspaceIndexHolder value: 1.
     ].
+    workspace selectedWorkspaceIndexHolder value: 1.
+    workspace openWindow.
 
     "
-        WorkspaceApplication openMyWorkspace
+     WorkspaceApplication openMyWorkspace
     "
 
     "Modified: / 21-06-2011 / 08:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Created: / 14-07-2011 / 13:11:32 / Administrator"
-    "Modified: / 10-08-2011 / 21:31:49 / cg"
+    "Modified (format): / 28-09-2011 / 07:51:24 / cg"
 !
 
 openMyWorkspace_old
+    "open showing the single file: MyWorkspace.wsp"
+
     self openOnFile:'MyWorkspace.wsp'
 
     "
@@ -1722,6 +1743,7 @@
     "
 
     "Created: / 21-06-2011 / 08:51:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 28-09-2011 / 07:48:07 / cg"
 !
 
 openOnFile:aFilename
@@ -2814,14 +2836,15 @@
 
     ws := self selectedWorkspace scrolledView.
     (ws isKindOf: ApplicationSubView) ifTrue:[
-        (ws application respondsTo:#switchToBookmarkEntry:)
-            ifTrue:[ws application switchToBookmarkEntry: bookmark].
-        ^self.
+        (ws application respondsTo:#switchToBookmarkEntry:) ifTrue:[
+            ws application switchToBookmarkEntry: bookmark
+        ].
+        ^ self.
     ].
 
     bookmark isFileBookmark ifTrue:[
         file := bookmark path asFilename.
-        (ws isTextView not or:[ws contents isEmpty not]) ifTrue:[
+        (ws isTextView not or:[ws contents notEmpty]) ifTrue:[
             self addWindow: (self createWorkspace) named:  file withoutSuffix baseName.
         ].
         file exists ifFalse:[
@@ -2829,12 +2852,12 @@
         ] ifTrue:[
             self loadFile: file.
         ].
-        ^self.
+        ^ self.
     ].
 
     "Created: / 20-06-2011 / 22:45:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 21-06-2011 / 08:18:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (format): / 05-07-2011 / 15:37:50 / cg"
+    "Modified: / 28-09-2011 / 07:44:53 / cg"
 !
 
 timeIt
@@ -3780,11 +3803,11 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.213 2011-08-19 12:42:46 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.214 2011-09-28 05:52:12 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.213 2011-08-19 12:42:46 vrany Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.214 2011-09-28 05:52:12 cg Exp $'
 !
 
 version_SVN