WorkspaceApplication.st
changeset 7800 91c7285805a1
parent 7789 c9f1c54da8be
child 7802 3260669fc77d
--- a/WorkspaceApplication.st	Tue May 29 12:09:56 2007 +0200
+++ b/WorkspaceApplication.st	Tue May 29 19:09:59 2007 +0200
@@ -156,6 +156,11 @@
                   translateLabel: true
                 )
                (MenuItem
+                  label: 'Add Buffer on Namespace...'
+                  itemValue: addNamespaceInspector
+                  translateLabel: true
+                )
+               (MenuItem
                   label: 'Add Buffer on Class Variables'
                   itemValue: addClassVariableInspector
                   translateLabel: true
@@ -581,8 +586,6 @@
         nil
         nil
       )
-
-    "Modified: / 15-03-2007 / 11:48:40 / cg"
 !
 
 toolBarMenu
@@ -929,20 +932,9 @@
 !
 
 addGlobalVariableInspector
-    |v|
-
-    SmalltalkInspectorView isNil ifTrue:[
-        self error:'Missing class: "SmalltalkInspectorView"'.
-        ^ self.
-    ].
+    ^ self addNamespaceInspectorFor:Smalltalk
 
-    v := self addInspectorOn:Smalltalk inspectorClass:SmalltalkInspectorView suppressPseudoSlots:true.
-
-    v fieldListLabel:'Name'.
-    self renameWorkspace:(self selectedWorkspaceIndexHolder value) to:'Globals (Smalltalk)'.
-    ^ v
-
-    "Modified: / 22-10-2006 / 11:28:08 / cg"
+    "Modified: / 29-05-2007 / 19:08:58 / cg"
 !
 
 addInspectorOn:aValue basic:isBasicInspector suppressPseudoSlots:suppressPseudoSlots
@@ -990,6 +982,36 @@
     "Modified: / 15-03-2007 / 11:54:17 / cg"
 !
 
+addNamespaceInspector
+    |ns|
+
+    ns := Dialog requestNameSpace:'Namespace' initialAnswer:nil.
+    ^ self addNamespaceInspectorFor:(Smalltalk at:ns asSymbol)
+
+    "Created: / 29-05-2007 / 19:10:50 / cg"
+!
+
+addNamespaceInspectorFor:aNameSpace
+    |v|
+
+    SmalltalkInspectorView isNil ifTrue:[
+        self error:'Missing class: "SmalltalkInspectorView"'.
+        ^ nil.
+    ].
+
+    v := self addInspectorOn:aNameSpace inspectorClass:SmalltalkInspectorView suppressPseudoSlots:true.
+
+    v fieldListLabel:'Name'.
+    self 
+        renameWorkspace:(self selectedWorkspaceIndexHolder value) 
+        to:(aNameSpace == Smalltalk 
+                ifTrue:'Globals (Smalltalk)'
+                ifFalse:(aNameSpace name)).
+    ^ v
+
+    "Created: / 29-05-2007 / 19:08:45 / cg"
+!
+
 addTeaTimer
     |l dt tEnd answer|
 
@@ -1669,5 +1691,5 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.131 2007-04-10 15:20:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.132 2007-05-29 17:09:59 cg Exp $'
 ! !