AbstractFileBrowser.st
changeset 18426 7a6813ed8ec0
parent 18389 028d70eb907a
child 18432 cd3ec19afe61
--- a/AbstractFileBrowser.st	Sun Sep 23 01:09:21 2018 +0200
+++ b/AbstractFileBrowser.st	Sun Sep 23 01:41:49 2018 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -2552,6 +2554,14 @@
                         label: 'Contents as ByteArray'
                         itemValue: fileContentsAsByteArray
                       )
+                     (MenuItem
+                        label: '-'
+                      )
+                     (MenuItem
+                        enabled: hasFileSelection
+                        label: 'Changes from GNU Smalltalk Source'
+                        itemValue: changeSetFromGSTSource
+                      )
                      )
                     nil
                     nil
@@ -2676,8 +2686,6 @@
         nil
         nil
       )
-
-    "Modified: / 10-09-2017 / 16:50:09 / cg"
 !
 
 viewDetailsMenuSpec
@@ -3004,7 +3012,7 @@
                                     "/ are perfect here, but usually not available in the font
                                     "/ and we have currently no way of knowing if they are...
                                     "/ (could let the font draw into a bitmap and check if there is something...)
-                                    "/ For now, write a dot.·
+                                    "/ For now, write a dot.·
                                     "/ charPrinted := (Character value:(byte + 16r2400))
                                 ].
                             ].
@@ -6628,6 +6636,29 @@
     ^ self class allFilesInDirectories:(self currentSelectedDirectories) forWhich:aBlock
 !
 
+changeSetFromGSTSource
+    GSTFileReader isNil ifTrue:[ Smalltalk loadPackage:'stx:libbasic2'].
+
+    self withWaitCursorDo:[
+        self currentSelectedFiles do:[:fn |
+            |changeSet|
+
+            fn suffix asLowercase = 'st' ifTrue:[
+                changeSet := GSTFileReader new changeSetFromStream:fn readStream.
+                (Tools::ChangeSetBrowser2 
+                        on: changeSet
+                        label: fn baseName)
+                    beTwoColumn;
+                    targetNamespace:nil;
+                    targetPackage:nil;
+                    open
+                ]
+        ]
+    ]
+
+    "Created: / 23-09-2018 / 01:32:46 / Claus Gittinger"
+!
+
 conversionChainFrom:inSuffix to:outSuffix
     |conv|
 
@@ -8736,7 +8767,7 @@
             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
                 label := msg := 'Breakpoint/Halt in fileIn'.
                 sender := ex suspendedContext.
-                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
+                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
             ] ifFalse:[
                 label := 'Error in fileIn'.
                 msg := 'error in fileIn: %1'