WorkspaceApplication.st
changeset 7866 122d1ea32cb4
parent 7865 ae5b649724dd
child 7876 3e9f6e7b9ff2
--- a/WorkspaceApplication.st	Fri Oct 19 15:27:50 2007 +0200
+++ b/WorkspaceApplication.st	Fri Oct 19 15:50:59 2007 +0200
@@ -86,35 +86,42 @@
             label: 'Add Buffer on MyWorkspace'
             itemValue: addMyWorkspace
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             enabled: anyWorkspaceVariableIsDefined
             label: 'Add Buffer on Workspace Variables'
             itemValue: addWorkspaceVariableInspector
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'Add Buffer on Global Variables'
             itemValue: addGlobalVariableInspector
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'Add Buffer on Namespace...'
             itemValue: addNamespaceInspector
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'Add Buffer on Class Variables'
             itemValue: addClassVariableInspector
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: '-'
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'Add Evaluation Buffer'
             itemValue: addEvaluationWorkspace
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: '-'
@@ -339,11 +346,13 @@
             label: 'New SystemWorkspace'
             itemValue: newSystemWorkspace
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'New EvaluationWorkspace'
             itemValue: newEvaluationWorkspace
             translateLabel: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: '-'
@@ -471,12 +480,14 @@
             translateLabel: true
             submenuChannel: workspaceMenu
             keepLinkedMenu: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'Smalltalk'
             translateLabel: true
             submenuChannel: smalltalkMenu
             keepLinkedMenu: true
+            isVisible: thisIsASmalltalkWorkspace
           )
          (MenuItem
             label: 'MENU_Help'
@@ -1012,6 +1023,12 @@
    ^ '*.wsp'
 
     "Created: / 25-10-2006 / 14:57:25 / cg"
+!
+
+thisIsASmalltalkWorkspace
+    "can be redefined in a subclass to disable smalltalk-specific menu items"
+
+    ^ true
 ! !
 
 !WorkspaceApplication methodsFor:'initialization & release'!
@@ -1858,5 +1875,5 @@
 !WorkspaceApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.141 2007-10-19 13:27:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/WorkspaceApplication.st,v 1.142 2007-10-19 13:50:59 cg Exp $'
 ! !