*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Tue, 25 Sep 2001 14:45:13 +0200
changeset 3198 1c34cd12b80b
parent 3197 f49450e43af5
child 3199 5478ca0ac71f
*** empty log message ***
DictionaryInspectorView.st
InspectorView.st
NewSystemBrowser.st
Tools__NewSystemBrowser.st
WorkspaceApplication.st
--- a/DictionaryInspectorView.st	Tue Sep 25 14:02:08 2001 +0200
+++ b/DictionaryInspectorView.st	Tue Sep 25 14:45:13 2001 +0200
@@ -53,76 +53,87 @@
 
     inspectedObject isNameSpace ifTrue:[
         items := #(
-                       ('copy key'             doCopyKey      )
+                       ('Copy Key'             doCopyKey      )
+                       ('-')
+                       ('Inspect'              doInspect      )
+                       ('Inspect Key'          doInspectKey   )
+                       ('BasicInspect'         doBasicInspect )
+                       ('Inspect Hierarchical' doNewInspect   )
                        ('-')
-                       ('inspect'              doInspect      )
-                       ('inspect key'          doInspectKey   )
-                       ('basicInspect'         doBasicInspect )
-                       ('inspect hierarchical' doNewInspect   )
+                       ('Ref chains'           showReferences )
+                       ('References to Key'    showKeyReferences )
                        ('-')
-                       ('ref chains'           showReferences )
-                       ('references to key'    showKeyReferences )
+                       ('Browse'               browse         )
                        ('-')
-                       ('add key'              doAddKey       )
-                       ('remove key'           doRemoveKey    )
+                       ('Add Key'              doAddKey       )
+                       ('Remove Key'           doRemoveKey    )
                        ('-')
                    ).
 
         hideClassVars == true ifTrue:[
             items := items , #(
-                           ('show classVars'   doShowClassVars )
+                           ('Show classVars'   doShowClassVars )
                        ).
         ] ifFalse:[
             items := items , #(
-                           ('hide classVars'   doHideClassVars )
+                           ('Hide classVars'   doHideClassVars )
                        ).
         ].
         hideClasses == true ifTrue:[
             items := items , #(
-                           ('show classes'     doShowClasses )
+                           ('Show classes'     doShowClasses )
                        ).
         ] ifFalse:[
             items := items , #(
-                           ('hide classes'     doHideClasses )
+                           ('Hide classes'     doHideClasses )
                        ).
         ].
         hideAliases == true ifTrue:[
             items := items , #(
-                           ('show aliases'     doShowAliases )
+                           ('Show aliases'     doShowAliases )
                        ).
         ] ifFalse:[
             items := items , #(
-                           ('hide aliases'     doHideAliases )
+                           ('Hide aliases'     doHideAliases )
                        ).
         ]
     ] ifFalse:[
         items := #(
-                       ('copy key'             doCopyKey      )
+                       ('Copy Key'             doCopyKey      )
+                       ('-')
+                       ('Inspect'              doInspect      )
+                       ('Inspect Key'          doInspectKey   )
+                       ('BasicInspect'         doBasicInspect )
+                       ('Inspect Hierarchical' doNewInspect   )
                        ('-')
-                       ('inspect'              doInspect      )
-                       ('inspect key'          doInspectKey   )
-                       ('basicInspect'         doBasicInspect )
-                       ('inspect hierarchical' doNewInspect   )
+                       ('Ref chains'           showReferences )
                        ('-')
-                       ('ref chains'           showReferences )
+                       ('Browse'                       browse                 )
+                       ('Browse class hierarchy'       browseClassHierarchy   )
+                       ('Browse full class protocol'   browseFullClassProtocol)
                        ('-')
-                       ('add key'              doAddKey       )
-                       ('remove key'           doRemoveKey    )
+                       ('Add Key'              doAddKey       )
+                       ('Remove Key'           doRemoveKey    )
                    ).
     ].
 
     monitorProcess isNil ifTrue:[
         items := items , #(
                        ('-')
-                       ('start monitor'    doStartMonitor )
+                       ('Start Monitor'    doStartMonitor )
                           ).
     ] ifFalse:[
         items := items , #(
                        ('-')
-                       ('stop monitor'     doStopMonitor  )
+                       ('Stop Monitor'     doStopMonitor  )
                           ).
     ].
 
+    items := items , #(
+                   ('-')
+                   ('Update'     doUpdate  )
+                      ).
+
     m := PopUpMenu itemList:items resources:resources.
 
     selectionIndex isNil ifTrue:[
@@ -142,19 +153,30 @@
 
 !DictionaryInspectorView methodsFor:'menu actions'!
 
+browse
+    |cls|
+
+    cls := self selection class theNonMetaclass.
+"/    cls isNameSpace ifTrue:[
+"/        self halt.
+"/    ].
+    cls browserClass openInClass:cls selector:nil
+!
+
 doAddKey
     "add a key"
 
     |keyName key val l|
 
-    keyName := Dialog request:'key to add:' initialAnswer:''.
+    keyName := Dialog request:'Key to add (storeString):' initialAnswer:''.
     keyName notEmpty ifTrue:[
-        key := keyName asSymbol.
+        key := Object readFrom:keyName onError:[ self information:'Bad input.'. ^ self].
         (inspectedObject includesKey:key) ifFalse:[
-            val := Dialog request:'value to add:' initialAnswer:''.
+            val := Dialog request:'Value to add (storeString):' initialAnswer:''.
             val notNil ifTrue:[
-                val := Object readFromString:val onError:nil.
+                val := Object readFrom:val onError:[ self information:'Bad input.'. ^ self].
             ].
+
             inspectedObject at:key put:val.
             selectionIndex := selectedLine := nil.
             inspectedObject changed.
@@ -411,5 +433,5 @@
 !DictionaryInspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.48 2001-09-10 14:16:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DictionaryInspectorView.st,v 1.49 2001-09-25 12:45:03 cg Exp $'
 ! !
--- a/InspectorView.st	Tue Sep 25 14:02:08 2001 +0200
+++ b/InspectorView.st	Tue Sep 25 14:45:13 2001 +0200
@@ -502,46 +502,46 @@
     |items labels selectors m sel|
 
     items := #(
-                       ('copy varName or key'          #doCopyKey              )
+                       ('Copy Name or Key'             #doCopyKey              )
                        ('-')
-                       ('inspect'                      #doInspect              )
-                       ('basicInspect'                 #doBasicInspect         )
-                       ('inspect hierarchical'         #doNewInspect           )
+                       ('Inspect'                      #doInspect              )
+                       ('BasicInspect'                 #doBasicInspect         )
+                       ('Inspect hierarchical'         #doNewInspect           )
                        ('-')
-                       ('ref chains'                   #showReferences         )
+                       ('Ref chains'                   #showReferences         )
                        ('-')
-                       ('browse'                       #browse                 )
-                       ('browse class hierarchy'       #browseClassHierarchy   )
-                       ('browse full class protocol'   #browseFullClassProtocol)
+                       ('Browse'                       #browse                 )
+                       ('Browse class hierarchy'       #browseClassHierarchy   )
+                       ('Browse full class protocol'   #browseFullClassProtocol)
               ).
 
     sel := self selection.
     (sel isBlock or:[sel isContext]) ifTrue:[
         items := items , #(
-                       ('browse blocks home'           #browseHome)
+                       ('Browse blocks home'           #browseHome)
               ).
     ].
     (sel isStream and:[self isExternalStream not]) ifTrue:[
         items := items , #(
                        ('-')
-                       ('show stream contents'         #showStreamContents)
+                       ('Show stream contents'         #showStreamContents)
               ).
     ].
     items := items , #(
                        ('-')
-                       ('trap message...'              #doTrap                 )
-                       ('trap all messages'            #doTrapAll              )
-                       ('trace all messages'           #doTraceAll             )
-                       ('untrace/untrap'               #doUntrace              )
+                       ('Trap message...'              #doTrap                 )
+                       ('Trap all messages'            #doTrapAll              )
+                       ('Trace all messages'           #doTraceAll             )
+                       ('Untrace/untrap'               #doUntrace              )
 "/                       ('-')
-"/                       ('trap change to instVar'       #doTrapInstVarChange    )
-"/                       ('trap change to any instVar'   #doTrapAnyInstVarChange )
+"/                       ('Trap change to instVar'       #doTrapInstVarChange    )
+"/                       ('Trap change to any instVar'   #doTrapAnyInstVarChange )
               ).
 
     allowFollow ifTrue:[
         items := #(
-                            ('follow'                       #doFollow              )
-                            ('back'                         #doBack              )
+                            ('Follow'                       #doFollow              )
+                            ('Back'                         #doBack              )
                             ('-')
                   )
                  ,
@@ -551,31 +551,31 @@
     hasMore ifTrue:[
         items := items , #(
                         ('-')
-                        ('show more'                    #showMore               )
+                        ('Show more'                    #showMore               )
                           )
     ].
 
     monitorProcess isNil ifTrue:[
         items := items , #(
                         ('-')
-                        ('start monitor'                #doStartMonitor         )
+                        ('Start monitor'                #doStartMonitor         )
                           ).
     ] ifFalse:[
         items := items , #(
                         ('-')
-                        ('stop monitor'                #doStopMonitor           )
+                        ('Stop monitor'                #doStopMonitor           )
                           ).
     ].
 
     showHex ifTrue:[
         items := items , #(
                         ('-')
-                        ('decimal integers'  #toggleHex               )
+                        ('Decimal integers'  #toggleHex               )
                           )
     ] ifFalse:[
         items := items , #(
                         ('-')
-                        ('hex integers'      #toggleHex               )
+                        ('Hex integers'      #toggleHex               )
                           )
     ].
 
@@ -1139,6 +1139,10 @@
     "Modified: / 31.10.1997 / 12:46:53 / cg"
 !
 
+doUpdate
+    self reinspect
+!
+
 indexedValueAtIndex:idx
     ^ inspectedObject basicAt:idx
 !
@@ -1335,5 +1339,5 @@
 !InspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.112 2001-09-13 09:26:10 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.113 2001-09-25 12:45:13 cg Exp $'
 ! !
--- a/NewSystemBrowser.st	Tue Sep 25 14:02:08 2001 +0200
+++ b/NewSystemBrowser.st	Tue Sep 25 14:45:13 2001 +0200
@@ -24710,7 +24710,7 @@
 
     (aClass isNameSpace and:[aClass ~~ Smalltalk]) ifTrue:[
         orgMode ~~ #namespace ifTrue:[      
-            (self confirm:'selected class is a namespace - switch view mode ?') ifTrue:[
+            (self confirm:'Browser: class is a namespace - switch organizers display mode ?') ifTrue:[
                 self organizerMode value:#namespace.
                 orgMode := self organizerMode value.
             ]
@@ -24734,7 +24734,11 @@
             self selectedCategories value:(OrderedCollection with:cat).
         ]
     ] ifFalse:[ orgMode == #namespace ifTrue:[
-        nsName := aClass nameSpace name.
+        aClass isNameSpace ifTrue:[
+            nsName := aClass name.
+        ] ifFalse:[
+            nsName := aClass nameSpace name.
+        ].
         (self selectedNamespacesValue includes:nsName) ifFalse:[
             self selectedNamespaces value:(OrderedCollection with:nsName).
         ]
@@ -49464,6 +49468,6 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.173 2001-09-25 12:02:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Attic/NewSystemBrowser.st,v 1.174 2001-09-25 12:44:51 cg Exp $'
 ! !
 NewSystemBrowser initialize!
--- a/Tools__NewSystemBrowser.st	Tue Sep 25 14:02:08 2001 +0200
+++ b/Tools__NewSystemBrowser.st	Tue Sep 25 14:45:13 2001 +0200
@@ -24710,7 +24710,7 @@
 
     (aClass isNameSpace and:[aClass ~~ Smalltalk]) ifTrue:[
         orgMode ~~ #namespace ifTrue:[      
-            (self confirm:'selected class is a namespace - switch view mode ?') ifTrue:[
+            (self confirm:'Browser: class is a namespace - switch organizers display mode ?') ifTrue:[
                 self organizerMode value:#namespace.
                 orgMode := self organizerMode value.
             ]
@@ -24734,7 +24734,11 @@
             self selectedCategories value:(OrderedCollection with:cat).
         ]
     ] ifFalse:[ orgMode == #namespace ifTrue:[
-        nsName := aClass nameSpace name.
+        aClass isNameSpace ifTrue:[
+            nsName := aClass name.
+        ] ifFalse:[
+            nsName := aClass nameSpace name.
+        ].
         (self selectedNamespacesValue includes:nsName) ifFalse:[
             self selectedNamespaces value:(OrderedCollection with:nsName).
         ]
@@ -49464,6 +49468,6 @@
 !NewSystemBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.173 2001-09-25 12:02:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__NewSystemBrowser.st,v 1.174 2001-09-25 12:44:51 cg Exp $'
 ! !
 NewSystemBrowser initialize!
--- a/WorkspaceApplication.st	Tue Sep 25 14:02:08 2001 +0200
+++ b/WorkspaceApplication.st	Tue Sep 25 14:45:13 2001 +0200
@@ -424,37 +424,48 @@
     self addWindow:(HVScrollableView for:Workspace) named:'Workspace%1'
 !
 
+basicInspectIt
+    self inspectIt:true
+!
+
 browseIt
-    self selectedWorkspace browseIt
+    self selectedWorkspacesTextView browseIt
 !
 
 copySelection
-    self selectedWorkspace copySelection
+    self selectedWorkspacesTextView copySelection
 !
 
 cutSelection
-    self selectedWorkspace cutSelection
+    self selectedWorkspacesTextView cutSelection
 !
 
 doIt
-    self selectedWorkspace doIt
+    self selectedWorkspacesTextView doIt
 !
 
 inspectIt
+    self inspectIt:false
+!
+
+inspectIt:basic
     |ws obj v|
 
-    ws := self selectedWorkspace.
+    ws := self selectedWorkspacesTextView.
     ws
         do:(ws selection) 
         withValueDo:[:result | 
                         | cls |
 
-                        cls := result inspectorClass.
+                        basic ifFalse:[
+                            cls := result inspectorClass.
+                        ].
                         cls isNil ifTrue:[
                             cls := InspectorView
                         ].
                         v := cls new.
                         v inspect:result.
+                        v allowFollow:true.
                         self addWindow:v named:'Inspecting: ' , result classNameWithArticle.
                     ]
 
@@ -468,7 +479,7 @@
 
     file := Dialog requestFileName:'Load file:'.
     file size > 0 ifTrue:[
-        (ws := self selectedWorkspace) contents:file asFilename contentsOfEntireFile.
+        (ws := self selectedWorkspacesTextView) contents:file asFilename contentsOfEntireFile.
         ws modified:false.        
     ]
 !
@@ -478,7 +489,7 @@
 
     file := Dialog requestFileName:'Save file:' default:'file.wsp'. 
     file size > 0 ifTrue:[
-        (ws := self selectedWorkspace) saveAs:file.
+        (ws := self selectedWorkspacesTextView) saveAs:file.
         ws modified:false.
     ]
 !
@@ -490,11 +501,11 @@
 !
 
 paste
-    self selectedWorkspace paste
+    self selectedWorkspacesTextView paste
 !
 
 printIt
-    self selectedWorkspace printIt
+    self selectedWorkspacesTextView printIt
 !
 
 removeWorkspace
@@ -589,6 +600,19 @@
     "Modified: 2.10.1997 / 14:23:47 / stefan"
 !
 
+selectedWorkspacesTextView
+    |textView|
+
+    textView := self selectedWorkspace.
+    (textView isKindOf:ScrollableView) ifTrue:[
+        textView := textView scrolledView
+    ].
+    (textView isKindOf:TextView) ifTrue:[
+        ^ textView
+    ].
+    ^ textView workspace
+!
+
 workspaceSelectionChanged
     |wsIndex windowLabel|
 
@@ -605,5 +629,5 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.6 2001-09-25 12:01:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.7 2001-09-25 12:44:36 cg Exp $'
 ! !