FileStream.st
changeset 20367 e59fe9911b4a
parent 20157 98d5b57a7576
child 20370 84e4a2476c49
--- a/FileStream.st	Fri Sep 09 13:36:45 2016 +0200
+++ b/FileStream.st	Fri Sep 09 16:17:14 2016 +0200
@@ -882,6 +882,26 @@
     ^ executor
 ! !
 
+!FileStream methodsFor:'inspecting'!
+
+inspectorExtraMenuOperations
+    "extra operation-menu entries to be shown in an inspector.
+     Answers a collection of pairs contining aString and action aBlock.
+     aString is the label of the menu item.
+     aBlock is evaluated when the menu item is selected.
+     To be redefined in objects which think that it makes sense to offer
+     often used operations in an inspector.
+     See SerialPort as an example."
+
+    |superItems|
+
+    superItems := super inspectorExtraMenuOperations.
+    ^ superItems , 
+            {
+                { 'Close File' . [self close] }
+            }.
+! !
+
 !FileStream methodsFor:'misc functions'!
 
 copyToEndInto:outStream bufferSize:bufferSize