AbstractFileBrowser.st
changeset 18426 7a6813ed8ec0
parent 18389 028d70eb907a
child 18432 cd3ec19afe61
equal deleted inserted replaced
18425:fa1a5ad4960c 18426:7a6813ed8ec0
       
     1 "{ Encoding: utf8 }"
       
     2 
     1 "
     3 "
     2  COPYRIGHT (c) 2002 by eXept Software AG
     4  COPYRIGHT (c) 2002 by eXept Software AG
     3               All Rights Reserved
     5               All Rights Reserved
     4 
     6 
     5  This software is furnished under a license and may be used
     7  This software is furnished under a license and may be used
  2550                      (MenuItem
  2552                      (MenuItem
  2551                         enabled: hasFileSelection
  2553                         enabled: hasFileSelection
  2552                         label: 'Contents as ByteArray'
  2554                         label: 'Contents as ByteArray'
  2553                         itemValue: fileContentsAsByteArray
  2555                         itemValue: fileContentsAsByteArray
  2554                       )
  2556                       )
       
  2557                      (MenuItem
       
  2558                         label: '-'
       
  2559                       )
       
  2560                      (MenuItem
       
  2561                         enabled: hasFileSelection
       
  2562                         label: 'Changes from GNU Smalltalk Source'
       
  2563                         itemValue: changeSetFromGSTSource
       
  2564                       )
  2555                      )
  2565                      )
  2556                     nil
  2566                     nil
  2557                     nil
  2567                     nil
  2558                   )
  2568                   )
  2559                 )
  2569                 )
  2674           )
  2684           )
  2675          )
  2685          )
  2676         nil
  2686         nil
  2677         nil
  2687         nil
  2678       )
  2688       )
  2679 
       
  2680     "Modified: / 10-09-2017 / 16:50:09 / cg"
       
  2681 !
  2689 !
  2682 
  2690 
  2683 viewDetailsMenuSpec
  2691 viewDetailsMenuSpec
  2684     "This resource specification was automatically generated
  2692     "This resource specification was automatically generated
  2685      by the MenuEditor of ST/X."
  2693      by the MenuEditor of ST/X."
  3002                                 (decodedChar between:0 and:31) ifTrue:[
  3010                                 (decodedChar between:0 and:31) ifTrue:[
  3003                                     "/ the 'nul', 'soh' .. 'gs' chars in unicodePage 2400
  3011                                     "/ the 'nul', 'soh' .. 'gs' chars in unicodePage 2400
  3004                                     "/ are perfect here, but usually not available in the font
  3012                                     "/ are perfect here, but usually not available in the font
  3005                                     "/ and we have currently no way of knowing if they are...
  3013                                     "/ and we have currently no way of knowing if they are...
  3006                                     "/ (could let the font draw into a bitmap and check if there is something...)
  3014                                     "/ (could let the font draw into a bitmap and check if there is something...)
  3007                                     "/ For now, write a dot.·
  3015                                     "/ For now, write a dot.·
  3008                                     "/ charPrinted := (Character value:(byte + 16r2400))
  3016                                     "/ charPrinted := (Character value:(byte + 16r2400))
  3009                                 ].
  3017                                 ].
  3010                             ].
  3018                             ].
  3011                         ].
  3019                         ].
  3012                         asciiLineStream nextPut:charPrinted.
  3020                         asciiLineStream nextPut:charPrinted.
  6624 
  6632 
  6625 !AbstractFileBrowser methodsFor:'menu actions-tools'!
  6633 !AbstractFileBrowser methodsFor:'menu actions-tools'!
  6626 
  6634 
  6627 allFilesInSelectedDirectoriesForWhich:aBlock
  6635 allFilesInSelectedDirectoriesForWhich:aBlock
  6628     ^ self class allFilesInDirectories:(self currentSelectedDirectories) forWhich:aBlock
  6636     ^ self class allFilesInDirectories:(self currentSelectedDirectories) forWhich:aBlock
       
  6637 !
       
  6638 
       
  6639 changeSetFromGSTSource
       
  6640     GSTFileReader isNil ifTrue:[ Smalltalk loadPackage:'stx:libbasic2'].
       
  6641 
       
  6642     self withWaitCursorDo:[
       
  6643         self currentSelectedFiles do:[:fn |
       
  6644             |changeSet|
       
  6645 
       
  6646             fn suffix asLowercase = 'st' ifTrue:[
       
  6647                 changeSet := GSTFileReader new changeSetFromStream:fn readStream.
       
  6648                 (Tools::ChangeSetBrowser2 
       
  6649                         on: changeSet
       
  6650                         label: fn baseName)
       
  6651                     beTwoColumn;
       
  6652                     targetNamespace:nil;
       
  6653                     targetPackage:nil;
       
  6654                     open
       
  6655                 ]
       
  6656         ]
       
  6657     ]
       
  6658 
       
  6659     "Created: / 23-09-2018 / 01:32:46 / Claus Gittinger"
  6629 !
  6660 !
  6630 
  6661 
  6631 conversionChainFrom:inSuffix to:outSuffix
  6662 conversionChainFrom:inSuffix to:outSuffix
  6632     |conv|
  6663     |conv|
  6633 
  6664 
  8734                 redefKind := 'class'.
  8765                 redefKind := 'class'.
  8735                 isRedef := true.
  8766                 isRedef := true.
  8736             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
  8767             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
  8737                 label := msg := 'Breakpoint/Halt in fileIn'.
  8768                 label := msg := 'Breakpoint/Halt in fileIn'.
  8738                 sender := ex suspendedContext.
  8769                 sender := ex suspendedContext.
  8739                 msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
  8770                 msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
  8740             ] ifFalse:[
  8771             ] ifFalse:[
  8741                 label := 'Error in fileIn'.
  8772                 label := 'Error in fileIn'.
  8742                 msg := 'error in fileIn: %1'
  8773                 msg := 'error in fileIn: %1'
  8743             ]]].
  8774             ]]].
  8744 
  8775