InspectorView.st
branchjv
changeset 16828 3be43a489ae3
parent 16805 d9fc8a187ec2
parent 16816 ce7ac654bf0f
child 16833 a9b0aec8f265
--- a/InspectorView.st	Wed Aug 31 22:53:21 2016 +0100
+++ b/InspectorView.st	Fri Sep 02 17:43:31 2016 +0100
@@ -1853,7 +1853,7 @@
 
     <resource: #programMenu>
 
-    |items m sel|
+    |items m sel operationItems|
 
     sel := self selection.
 
@@ -1965,6 +1965,11 @@
     items := items , (self sortOrderItems).
     items := items , (self numberBaseItems).
 
+    operationItems := (self optionalOperationMenuItemsFor:sel).
+    operationItems notEmptyOrNil ifTrue:[
+        items := items, #(('-')) , operationItems
+    ].
+    
     m := PopUpMenu
           itemList:items
           resources:resources.
@@ -2096,6 +2101,17 @@
     "Modified: / 03-08-2011 / 15:03:36 / cg"
 !
 
+optionalOperationMenuItemsFor:anObject
+    "chance to add instance-specific operation menu items.
+     See SerialPort as an example"
+     
+    ^ anObject inspectorExtraMenuOperations
+
+    "
+     SerialPort new inspect    
+    "
+!
+
 optionalStreamSelectionItems
     |sel|
 
@@ -3187,9 +3203,10 @@
 !InspectorView methodsFor:'private'!
 
 baseInspectedObjectClass
+    "only instvars below that are shown by me in the non-basic tab.
+     This hides uninterresting details in the regular tab"
+     
     ^ Object
-
-
 !
 
 defaultLabel