BrowserView.st
changeset 1230 ebc7e14ceff1
parent 1211 588a4d148234
child 1232 0fa4ace4c46e
--- a/BrowserView.st	Wed Jul 02 17:38:29 1997 +0200
+++ b/BrowserView.st	Thu Jul 03 12:57:48 1997 +0200
@@ -6154,32 +6154,18 @@
 methodCategoryMenu
     <resource: #keyboard (#Cmdn)>
 
-    |labels selectors shorties i m|
+    |labels selectors shorties i m varSel s|
 
     currentClass isNil ifTrue:[
         methodCategoryListView flash.
         ^ nil
     ].
 
-    currentMethodCategory isNil ifTrue:[
-        labels := #(
-                    'find method here ...'
-                    'find method ...'
-                    '-'
-                    'new category ...' 
-                    'copy category ...' 
-                    'create access methods' 
-                   ).
-        selectors := #(
-                    methodCategoryFindMethod
-                    methodCategoryFindAnyMethod
-                    nil
-                    methodCategoryNewCategory
-                    methodCategoryCopyCategory
-                    methodCategoryCreateAccessMethods
-                   ).
-    ] ifFalse:[
-        labels := #(
+    labels := #().
+    selectors := #().
+
+    currentMethodCategory notNil ifTrue:[
+        labels := labels , #(
                     'fileOut' 
                     'fileOut all' 
                     'printOut'
@@ -6187,17 +6173,9 @@
                     'SPAWN_METHODCATEGORY'
                     'spawn category'
                     '-'
-                    'find method here ...'
-                    'find method ...'
-                    '-'
-                    'new category ...' 
-                    'copy category ...' 
-                    'create access methods' 
-                    '-'
-                    'rename ...' 
-                    'remove'
-                   ).
-        selectors := #(
+                  ).
+
+        selectors := selectors , #(
                     methodCategoryFileOut
                     methodCategoryFileOutAll
                     methodCategoryPrintOut
@@ -6205,12 +6183,44 @@
                     methodCategorySpawn
                     methodCategorySpawnCategory
                     nil
-                    methodCategoryFindMethod
-                    methodCategoryFindAnyMethod
-                    nil
-                    methodCategoryNewCategory
-                    methodCategoryCopyCategory
-                    methodCategoryCreateAccessMethods
+                   ).
+    ].            
+
+    labels := labels , #(
+                'find method here ...'
+                'find method ...'
+                '-'
+                'new category ...' 
+                'copy category ...' 
+               ).
+    selectors := selectors , #(
+                methodCategoryFindMethod
+                methodCategoryFindAnyMethod
+                nil
+                methodCategoryNewCategory
+                methodCategoryCopyCategory
+               ).
+
+    (variableListView notNil
+    and:[(varSel := variableListView selectionValue) notNil]) ifTrue:[
+        s := 'create access methods (for ''%1'')' 
+    ] ifFalse:[
+        s := 'create access methods (for all)' 
+    ].
+    s := resources string:s with:varSel.
+    labels := labels , (Array with:s).
+    selectors := selectors , #(
+                methodCategoryCreateAccessMethods
+               ).
+
+    currentMethodCategory notNil ifTrue:[
+        labels := labels , #(
+                    '-'
+                    'rename ...' 
+                    'remove'
+                   ).
+
+        selectors := selectors , #(
                     nil
                     methodCategoryRename
                     methodCategoryRemove
@@ -6245,7 +6255,7 @@
 
     ^ m
 
-    "Modified: 24.1.1997 / 11:13:27 / cg"
+    "Modified: 3.7.1997 / 12:56:11 / cg"
 !
 
 methodCategoryNewCategory
@@ -10228,6 +10238,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.310 1997-06-28 13:01:22 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.311 1997-07-03 10:57:48 cg Exp $'
 ! !
 BrowserView initialize!