AbstractFileBrowser.st
branchjv
changeset 15566 184cea584be5
parent 13751 adfad43d7693
parent 15528 a9986f82fdfb
child 15571 a7d3835c6a86
--- a/AbstractFileBrowser.st	Sun Jan 12 23:30:25 2014 +0000
+++ b/AbstractFileBrowser.st	Wed Apr 01 10:38:01 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -11,6 +13,8 @@
 "
 "{ Package: 'stx:libtool' }"
 
+"{ NameSpace: Smalltalk }"
+
 ApplicationModel subclass:#AbstractFileBrowser
 	instanceVariableNames:'aspects'
 	classVariableNames:'VisitedDirectories RuntimeAspects DirectoryBookmarks
@@ -272,11 +276,11 @@
     "save the bokmarks in aFileNameOrString.
      Use Base64 coding"
 
-    | bookmarkStream fileName coder|
+    |bookmarkStream fileName coder|
 
     fileName := aFileNameOrString asFilename.
     fileName exists ifTrue:[
-        fileName renameTo:(fileName withSuffix:'sav').
+        fileName renameTo:(fileName addSuffix:'sav').
     ].
     bookmarkStream := fileName writeStream.
 
@@ -556,11 +560,14 @@
            toolBarVisibleHolder        true
            sortDirectoriesBeforeFiles  true
            openAlwaysInTextEditor      false
+           alwaysUseSmalltalkTools     true
            sortCaseless                false
            "/ useCodeView2InTools         true   -- vanishes
+           showDirectoriesOnTop        false 
       )
 
     "Modified: / 11-05-2012 / 09:22:04 / cg"
+    "Modified: / 12-08-2014 / 13:13:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !AbstractFileBrowser class methodsFor:'help specs'!
@@ -577,7 +584,7 @@
 'Close this tab'
 
 #addTerminal
-'Add a Shell terminal view'
+'Add a shell terminal view'
 
 #make
 'Call the make command'
@@ -637,10 +644,13 @@
 'Goto bookmarked directory'
 
 #hideToolBar
-'Hide toolbar'
+'Hide the toolbar (show again via "View"-menu)'
 
 #hideFilenameEntryField
-'Hide filename & filter fields'
+'Hide filename & filter fields (show again via "View"-menu)'
+
+#hideBookmarks
+'Hide the bookmarks (show again via "View"-menu)'
 
 #openChangeBrowser
 'Open a Changebrowser on file'
@@ -848,66 +858,100 @@
 !
 
 leftDownIcon
+    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
-
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
-
     "
      self leftDownIcon inspect
-     ImageEditor openOnClass:self andSelector:#leftDownIcon
-    "
-
-    <resource: #image>
-
-    ^Icon
-        constantNamed:#'AbstractFileBrowser class leftDownIcon'
-        ifAbsentPut:[(Depth2Image new) width: 28; height: 28; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+     ImageEditor openOnClass:self andSelector:#leftDownIcon"
+    
+    ^ Icon constantNamed:#'AbstractFileBrowser class leftDownIcon'
+        ifAbsentPut:[
+            (Depth2Image new)
+                width:28;
+                height:28;
+                photometric:(#palette);
+                bitsPerSample:(#( 2 ));
+                samplesPerPixel:(1);
+                bits:(ByteArray 
+                            fromPackedString:'
 UUUUUUUUUUUPAUUUUUUUP@UUUUUUUPB!!UUUUUU@B*AUUUUU@B*(UUUUUPB** UUUUPB***AUUUTB***(EUUUB****%UUUR*****UUUUU@*%UUUUUUPJ)UUUU
 UUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*%UUUUUUPJ)UUUUUUTB*UUUUUUU@*$@@@@AUPJ*****)UTB******UU@******%UPJ*****)UTAUUUU
-UUUU@@@@@@@AUUUUUUUUUP@a') ; colorMapFromArray:#[255 255 255 0 0 0 40 40 100 255 0 0]; mask:((Depth1Image new) width: 28; height: 28; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
+UUUU@@@@@@@AUUUUUUUUUP@a');
+                colorMapFromArray:#[ 255 255 255 0 0 0 40 40 100 255 0 0 ];
+                mask:((ImageMask new)
+                            width:28;
+                            height:28;
+                            bits:(ByteArray 
+                                        fromPackedString:'
 @@@@@@@@@@@@ @@@@\@@@@O @@@G<@@@C? @@A?<@@@?? @@_?<@@G?? @@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C<@@@@?@@@@O0@@@C??? @???8@O?
-?>@C??? @???8@O??>@@@@@@@@@@@@@a') ; yourself); yourself]
+?>@C??? @???8@O??>@@@@@@@@@@@@@a');
+                            yourself);
+                yourself
+        ]
 !
 
 menuHistoryList9x20Icon
+    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
-
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
-
     "
      self menuHistoryList9x20Icon inspect
      ImageEditor openOnClass:self andSelector:#menuHistoryList9x20Icon
-     Icon flushCachedIcons
-    "
-
-    <resource: #image>
-
-    ^Icon
-        constantNamed:#'AbstractFileBrowser class menuHistoryList9x20Icon'
-        ifAbsentPut:[(Depth1Image new) width: 9; height: 20; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 9; height: 20; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a') ; yourself); yourself]
+     Icon flushCachedIcons"
+    
+    ^ Icon constantNamed:#'AbstractFileBrowser class menuHistoryList9x20Icon'
+        ifAbsentPut:[
+            (Depth1Image new)
+                width:9;
+                height:20;
+                photometric:(#palette);
+                bitsPerSample:(#( 1 ));
+                samplesPerPixel:(1);
+                bits:(ByteArray 
+                            fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a');
+                colorMapFromArray:#[ 255 255 255 0 0 0 ];
+                mask:((ImageMask new)
+                            width:9;
+                            height:20;
+                            bits:(ByteArray 
+                                        fromPackedString:'@@@@@A0@G@@\@A0@G@@\@A0@G@@\@A0@G@A?@C8@G@@H@G<@@@@@@@@a');
+                            yourself);
+                yourself
+        ]
 !
 
 menuHistoryListIcon
+    <resource: #image>
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
-
     "Do not manually edit this!! If it is corrupted,
      the ImageEditor may not be able to read the specification."
-
     "
      self menuHistoryListIcon inspect
-     ImageEditor openOnClass:self andSelector:#menuHistoryListIcon
-    "
-
-    <resource: #image>
-
-    ^Icon
-        constantNamed:#'AbstractFileBrowser class menuHistoryListIcon'
-        ifAbsentPut:[(Depth1Image new) width: 12; height: 12; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??S?<O?0??C?<O?0??/?=_?0??C?<O?0') ; colorMapFromArray:#[255 255 255 0 0 0]; mask:((Depth1Image new) width: 12; height: 12; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@O@@<@C0A?8C?@G8@O@@X@@@A?8@@@') ; yourself); yourself]
+     ImageEditor openOnClass:self andSelector:#menuHistoryListIcon"
+    
+    ^ Icon constantNamed:#'AbstractFileBrowser class menuHistoryListIcon'
+        ifAbsentPut:[
+            (Depth1Image new)
+                width:12;
+                height:12;
+                photometric:(#palette);
+                bitsPerSample:(#( 1 ));
+                samplesPerPixel:(1);
+                bits:(ByteArray fromPackedString:'??S?<O?0??C?<O?0??/?=_?0??C?<O?0');
+                colorMapFromArray:#[ 255 255 255 0 0 0 ];
+                mask:((ImageMask new)
+                            width:12;
+                            height:12;
+                            bits:(ByteArray fromPackedString:'@@@O@@<@C0A?8C?@G8@O@@X@@@A?8@@@');
+                            yourself);
+                yourself
+        ]
 !
 
 newDirectoryIcon
@@ -945,101 +989,101 @@
     <resource: #canvas>
 
     ^ 
-     #(FullSpec
-        name: encodingDialogSpec
-        window: 
-       (WindowSpec
-          label: 'File Encoding'
-          name: 'File Encoding'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 379 590)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (LabelSpec
-              label: 'Select the External (File-) Encoding:'
-              name: 'Label1'
-              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
-              translateLabel: true
-              adjust: left
-            )
-           (DataSetSpec
-              name: 'Table1'
-              layout: (LayoutFrame 0 0 30 0 0 1 -60 1)
-              model: selectedEncoding
-              hasHorizontalScrollBar: true
-              hasVerticalScrollBar: true
-              dataList: encodingList
-              has3Dseparators: true
-              columns: 
-             (Array
-                
-               (DataSetColumnSpec
-                  label: 'Encoding'
-                  labelButtonType: Button
-                  model: at:
-                  canSelect: false
-                  isResizeable: false
-                  showRowSeparator: false
-                  showColSeparator: false
-                ) 
-               (DataSetColumnSpec
-                  label: 'Description'
-                  labelButtonType: Button
-                  model: at:
-                  canSelect: false
-                  isResizeable: false
-                  showRowSeparator: false
-                  showColSeparator: false
+    #(FullSpec
+       name: encodingDialogSpec
+       window: 
+      (WindowSpec
+         label: 'File Encoding'
+         name: 'File Encoding'
+         min: (Point 10 10)
+         bounds: (Rectangle 0 0 379 590)
+       )
+       component: 
+      (SpecCollection
+         collection: (
+          (LabelSpec
+             label: 'Select the External (File-) Encoding:'
+             name: 'Label1'
+             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+             translateLabel: true
+             adjust: left
+           )
+          (DataSetSpec
+             name: 'Table1'
+             layout: (LayoutFrame 0 0 30 0 0 1 -60 1)
+             model: selectedEncoding
+             hasHorizontalScrollBar: true
+             hasVerticalScrollBar: true
+             dataList: encodingList
+             has3Dseparators: true
+             columns: 
+            (Array
+               
+              (DataSetColumnSpec
+                 label: 'Encoding'
+                 labelButtonType: Button
+                 height: heightOfFirstRow
+                 model: at:
+                 canSelect: false
+                 isResizeable: false
+                 showRowSeparator: false
+                 showColSeparator: false
+               ) 
+              (DataSetColumnSpec
+                 label: 'Description'
+                 labelButtonType: Button
+                 height: heightOfFirstRow
+                 model: at:
+                 canSelect: false
+                 isResizeable: false
+                 showRowSeparator: false
+                 showColSeparator: false
+               )
+             )
+             doubleClickChannel: accept
+           )
+          (CheckBoxSpec
+             label: 'Lock Encoding'
+             name: 'LockEncodingCheckBox'
+             layout: (LayoutFrame 3 0 -60 1 217 0 -30 1)
+             activeHelpKey: lockFileEncoding
+             model: lockFileEncoding
+             translateLabel: true
+           )
+          (HorizontalPanelViewSpec
+             name: 'ButtonPanel'
+             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+             horizontalLayout: fitSpace
+             verticalLayout: center
+             horizontalSpace: 3
+             verticalSpace: 3
+             reverseOrderIfOKAtLeft: true
+             component: 
+            (SpecCollection
+               collection: (
+                (ActionButtonSpec
+                   label: 'Cancel'
+                   name: 'Button2'
+                   translateLabel: true
+                   model: cancel
+                   extent: (Point 183 22)
+                 )
+                (ActionButtonSpec
+                   label: 'OK'
+                   name: 'Button1'
+                   translateLabel: true
+                   model: accept
+                   isDefault: true
+                   extent: (Point 184 22)
+                 )
                 )
-              )
-              doubleClickChannel: accept
-            )
-           (HorizontalPanelViewSpec
-              name: 'ButtonPanel'
-              layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
-              horizontalLayout: fitSpace
-              verticalLayout: center
-              horizontalSpace: 3
-              verticalSpace: 3
-              reverseOrderIfOKAtLeft: true
-              component: 
-             (SpecCollection
-                collection: (
-                 (ActionButtonSpec
-                    label: 'Cancel'
-                    name: 'Button2'
-                    translateLabel: true
-                    model: cancel
-                    extent: (Point 185 22)
-                  )
-                 (ActionButtonSpec
-                    label: 'OK'
-                    name: 'Button1'
-                    translateLabel: true
-                    model: accept
-                    isDefault: true
-                    extent: (Point 185 22)
-                  )
-                 )
-               
-              )
-            )
-           (CheckBoxSpec
-              label: 'Lock Encoding'
-              name: 'LockEncodingCheckBox'
-              layout: (LayoutFrame 3 0 -60 1 217 0 -30 1)
-              activeHelpKey: lockFileEncoding
-              model: lockFileEncoding
-              translateLabel: true
-            )
+              
+             )
            )
-         
-        )
-      )
-
-    "Modified: / 06-01-2012 / 15:40:54 / cg"
+          )
+        
+       )
+     )
 !
 
 lineEndConventionDialogSpec
@@ -1057,120 +1101,118 @@
     <resource: #canvas>
 
     ^ 
-     #(FullSpec
-        name: lineEndConventionDialogSpec
-        window: 
-       (WindowSpec
-          label: 'Line-End Convention'
-          name: 'Line-End Convention'
-          min: (Point 10 10)
-          bounds: (Rectangle 0 0 379 239)
-        )
-        component: 
-       (SpecCollection
-          collection: (
-           (LabelSpec
-              label: 'Select the Line-End Convention (used when saving files):'
-              name: 'Label1'
-              layout: (LayoutFrame 0 0 0 0 0 1 30 0)
-              translateLabel: true
-              adjust: left
-            )
-           (VerticalPanelViewSpec
-              name: 'VerticalPanel1'
-              layout: (LayoutFrame 0 0 30 0 0 1 -30 1)
-              horizontalLayout: center
-              verticalLayout: center
-              horizontalSpace: 3
-              verticalSpace: 3
-              component: 
-             (SpecCollection
-                collection: (
-                 (RadioButtonSpec
-                    label: 'NL (Unix)'
-                    name: 'RadioButton1'
-                    translateLabel: true
-                    model: lineEndConvention
-                    isTriggerOnDown: true
-                    select: nl
-                    extent: (Point 136 22)
-                  )
-                 (RadioButtonSpec
-                    label: 'CR-NL (MSDOS)'
-                    name: 'RadioButton4'
-                    translateLabel: true
-                    model: lineEndConvention
-                    isTriggerOnDown: true
-                    select: crnl
-                    extent: (Point 136 22)
-                  )
-                 (RadioButtonSpec
-                    label: 'CR (Mac)'
-                    name: 'RadioButton5'
-                    translateLabel: true
-                    model: lineEndConvention
-                    isTriggerOnDown: true
-                    select: cr
-                    extent: (Point 136 22)
-                  )
-                 (RadioButtonSpec
-                    label: 'EOL'
-                    name: 'RadioButton6'
-                    translateLabel: true
-                    model: lineEndConvention
-                    isTriggerOnDown: true
-                    select: eol
-                    extent: (Point 136 22)
-                  )
-                 (RadioButtonSpec
-                    label: 'EOT'
-                    name: 'RadioButton7'
-                    translateLabel: true
-                    model: lineEndConvention
-                    isTriggerOnDown: true
-                    select: eot
-                    extent: (Point 136 22)
-                  )
+    #(FullSpec
+       name: lineEndConventionDialogSpec
+       window: 
+      (WindowSpec
+         label: 'Line-End Convention'
+         name: 'Line-End Convention'
+         min: (Point 10 10)
+         bounds: (Rectangle 0 0 379 239)
+       )
+       component: 
+      (SpecCollection
+         collection: (
+          (LabelSpec
+             label: 'Select the Line-End Convention (used when saving files):'
+             name: 'Label1'
+             layout: (LayoutFrame 0 0 0 0 0 1 30 0)
+             translateLabel: true
+             adjust: left
+           )
+          (VerticalPanelViewSpec
+             name: 'VerticalPanel1'
+             layout: (LayoutFrame 20 0 40 0 0 1 -30 1)
+             horizontalLayout: fit
+             verticalLayout: topSpace
+             horizontalSpace: 3
+             verticalSpace: 3
+             component: 
+            (SpecCollection
+               collection: (
+                (RadioButtonSpec
+                   label: 'NL (Unix)'
+                   name: 'RadioButton1'
+                   translateLabel: true
+                   model: lineEndConvention
+                   isTriggerOnDown: true
+                   select: nl
+                   extent: (Point 359 22)
+                 )
+                (RadioButtonSpec
+                   label: 'CR-NL (MSDOS)'
+                   name: 'RadioButton4'
+                   translateLabel: true
+                   model: lineEndConvention
+                   isTriggerOnDown: true
+                   select: crlf
+                   extent: (Point 359 22)
+                 )
+                (RadioButtonSpec
+                   label: 'CR (VMS and pre OSX mac)'
+                   name: 'RadioButton5'
+                   translateLabel: true
+                   model: lineEndConvention
+                   isTriggerOnDown: true
+                   select: cr
+                   extent: (Point 359 22)
                  )
-               
-              )
-            )
-           (HorizontalPanelViewSpec
-              name: 'ButtonPanel'
-              layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
-              horizontalLayout: fitSpace
-              verticalLayout: center
-              horizontalSpace: 3
-              verticalSpace: 3
-              reverseOrderIfOKAtLeft: true
-              component: 
-             (SpecCollection
-                collection: (
-                 (ActionButtonSpec
-                    label: 'Cancel'
-                    name: 'Button2'
-                    translateLabel: true
-                    model: cancel
-                    extent: (Point 185 22)
-                  )
-                 (ActionButtonSpec
-                    label: 'OK'
-                    name: 'Button1'
-                    translateLabel: true
-                    model: accept
-                    isDefault: true
-                    extent: (Point 185 22)
-                  )
+                (RadioButtonSpec
+                   label: 'ETX (some modem protocols and mainframe files)'
+                   name: 'RadioButton6'
+                   translateLabel: true
+                   model: lineEndConvention
+                   isTriggerOnDown: true
+                   select: etx
+                   extent: (Point 359 22)
+                 )
+                (RadioButtonSpec
+                   label: 'EOT (some modem protocols and mainframe files)'
+                   name: 'RadioButton7'
+                   translateLabel: true
+                   model: lineEndConvention
+                   isTriggerOnDown: true
+                   select: eot
+                   extent: (Point 359 22)
                  )
-               
-              )
-            )
+                )
+              
+             )
            )
-         
-        )
-      )
-
-    "Modified: / 28-02-2012 / 11:12:03 / cg"
+          (HorizontalPanelViewSpec
+             name: 'ButtonPanel'
+             layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
+             horizontalLayout: fitSpace
+             verticalLayout: center
+             horizontalSpace: 3
+             verticalSpace: 3
+             reverseOrderIfOKAtLeft: true
+             component: 
+            (SpecCollection
+               collection: (
+                (ActionButtonSpec
+                   label: 'Cancel'
+                   name: 'Button2'
+                   translateLabel: true
+                   model: cancel
+                   extent: (Point 185 22)
+                 )
+                (ActionButtonSpec
+                   label: 'OK'
+                   name: 'Button1'
+                   translateLabel: true
+                   model: accept
+                   isDefault: true
+                   extent: (Point 185 22)
+                 )
+                )
+              
+             )
+           )
+          )
+        
+       )
+     )
 !
 
 tabStopConversionDialogSpec
@@ -1485,13 +1527,21 @@
      #(Menu
         (
          (MenuItem
-            label: 'Up'
-            itemValue: doGoDirectoryUp
+            label: 'Bookmarks'
+            submenuChannel: bookmarksMenu
+          )
+         (MenuItem
+            label: 'Visited Directories'
+            submenuChannel: visitedDirectoriesMenu
           )
          (MenuItem
             label: '-'
           )
          (MenuItem
+            label: 'Up'
+            itemValue: doGoDirectoryUp
+          )
+         (MenuItem
             activeHelpKey: directoryBack
             enabled: enableBack
             label: 'Back'
@@ -1539,17 +1589,6 @@
             label: 'Make this the Default (Current) Directory'
             itemValue: doMakeCurrentDirectory
           )
-         (MenuItem
-            label: '-'
-          )
-         (MenuItem
-            label: 'Bookmarks'
-            submenuChannel: bookmarksMenu
-          )
-         (MenuItem
-            label: 'Visited Directories'
-            submenuChannel: visitedDirectoriesMenu
-          )
          )
         nil
         nil
@@ -1581,7 +1620,7 @@
           )
          (MenuItem
             enabled: fileListIsNotEmpty
-            label: 'Copy All Filenames to Clipboard'
+            label: 'Copy all Filenames to Clipboard'
             itemValue: copyFileList
             translateLabel: true
           )
@@ -1681,6 +1720,14 @@
      #(Menu
         (
          (MenuItem
+            enabled: enableFileHistory
+            label: 'File History'
+            submenuChannel: menuFileHistory
+          )
+         (MenuItem
+            label: '-'
+          )
+         (MenuItem
             label: 'Open'
             itemValue: doShowFileContents
           )
@@ -1786,14 +1833,6 @@
             label: 'Remove from Java Source Path'
             isVisible: javaSupportLoaded
           )
-         (MenuItem
-            label: '-'
-          )
-         (MenuItem
-            enabled: enableFileHistory
-            label: 'File History'
-            submenuChannel: menuFileHistory
-          )
          )
         nil
         nil
@@ -1869,6 +1908,11 @@
             itemValue: generateDetachedSignaturesForSelectedFiles
           )
          (MenuItem
+            enabled: canGenerateSignatureFiles
+            label: 'Generate Patch Installer for File(s)'
+            itemValue: generatePatchInstallerForSelectedFiles
+          )
+         (MenuItem
             label: '-'
           )
          (MenuItem
@@ -2259,18 +2303,31 @@
           )
          (MenuItem
             enabled: anySTFilesPresent
-            label: 'Install All ST-Files as Autoloaded'
+            label: 'Install all ST-Files as Autoloaded'
             itemValue: installAllAsAutoloaded
           )
          (MenuItem
             enabled: recursiveAnySTFilesPresent
-            label: 'Recursive Install All ST-Files as Autoloaded'
+            label: 'Recursive Install all ST-Files as Autoloaded'
             itemValue: installAllAsAutoloadedRecursive
           )
          (MenuItem
             label: '-'
           )
          (MenuItem
+            enabled: hasJava
+            label: 'Add Directory to Java Source Path (stx:libjava)'
+            itemValue: addDirToJavaSourcePath
+          )
+         (MenuItem
+            enabled: hasJava
+            label: 'Add Selected Files to Java Source Path (stx:libjava)'
+            itemValue: fileAddToJavaSourcePath
+          )
+         (MenuItem
+            label: '-'
+          )
+         (MenuItem
             label: 'File Operations'
             submenuChannel: fileOpMenu
           )
@@ -2317,7 +2374,7 @@
                   itemValue: openCBrowser
                   isVisible: hasCBrowser
                 )
-               (MenuItem   
+               (MenuItem
                   enabled: canOpenMonticelloBrowser
                   label: 'Monticello Browser'
                   itemValue: doOpenMonticelloBrowser
@@ -2458,6 +2515,20 @@
                   )
                 )
                (MenuItem
+                  label: 'Web'
+                  submenu: 
+                 (Menu
+                    (
+                     (MenuItem
+                        label: 'Fetch File by URL...'
+                        itemValue: fetchFileByURL
+                      )
+                     )
+                    nil
+                    nil
+                  )
+                )
+               (MenuItem
                   enabled: hasZipFileSelectedHolder
                   label: 'ZipFile Tool'
                   itemValue: openZipTool
@@ -2482,9 +2553,9 @@
                   itemValue: fileFindFile
                 )
                (MenuItem
+                  enabled: hasFileSelection
                   label: 'Same Contents as Selected...'
                   itemValue: fileFindDuplicateFile
-                  enabled: hasFileSelection
                 )
                (MenuItem
                   label: 'Duplicate Files'
@@ -2580,6 +2651,11 @@
             translateLabel: true
           )
          (MenuItem
+            label: 'Commit Folder (CVS)...'
+            itemValue: cvsCommitFolder
+            translateLabel: true
+          )
+         (MenuItem
             label: '-'
           )
          (MenuItem
@@ -3038,8 +3114,14 @@
     self fileGetInfo:true
 !
 
+enterAction
+    self 
+        applicationNamed:#DirectoryContentsBrowser 
+        ifPresentDo:[:appl | appl ~~ self ifTrue:[ appl enterAction ]].
+!
+
 fileEncodingDialog
-    "open a dialog to allow change of the files character encoding.
+    "open a dialog to allow change of the file's character encoding.
      Files are converted to internal encoding when read, and converted back
      to this encoding when saved.
      Notice: currently, not too many encodings are supported by the system."
@@ -3095,7 +3177,7 @@
 
     (self openDialogInterface:#lineEndConventionDialogSpec withBindings:bindings)
     ifTrue:[
-        self lineEndConventionHolder value:(bindings at:#lineEndConvention) value
+        self lineEndConventionHolder value:(bindings at:#lineEndConvention) value asSymbol
     ].
 
     "Created: / 06-01-2012 / 15:34:51 / cg"
@@ -3375,7 +3457,7 @@
 !
 
 canMake
-    ^ self aspectFor:#canMake ifAbsent:[ false asValue ].
+    ^ self aspectFor:#canMake ifAbsent:[ ValueHolder with:false ].
 !
 
 currentDirectories
@@ -3457,19 +3539,20 @@
 
 enableDirectoryUp
 
-    ^ self aspectFor:#enableDirectoryUp ifAbsent:[false asValue]
+    ^ self aspectFor:#enableDirectoryUp ifAbsent:[ValueHolder with:false]
 !
 
 enableGotoDefaultDirectory
-    ^ self aspectFor:#enableGotoDefaultDirectory ifAbsent:[ true asValue ].
+    ^ self aspectFor:#enableGotoDefaultDirectory ifAbsent:[ ValueHolder with:true ].
 !
 
 enableGotoDesktop
-    ^ self aspectFor:#enableGotoDesktop ifAbsent:[ true asValue ].
+    "/ backward compatibility
+    ^ self enableGotoDesktopDirectory.
 !
 
 enableGotoDesktopDirectory
-    ^ self aspectFor:#enableGotoDesktopDirectory ifAbsent:[ true asValue ].
+    ^ self aspectFor:#enableGotoDesktopDirectory ifAbsent:[ ValueHolder with:true ].
 
     "Created: / 01-10-2010 / 16:19:17 / cg"
 !
@@ -3632,13 +3715,13 @@
 !
 
 lineEndConvention
-    ^ self lineEndConventionHolder value
+    ^ self lineEndConventionHolder value asSymbol
 
     "Created: / 06-01-2012 / 13:05:14 / cg"
 !
 
 lineEndConvention: aSymbol
-    self lineEndConventionHolder value: aSymbol
+    self lineEndConventionHolder value: aSymbol asSymbol
 
     "Created: / 11-07-2012 / 19:51:58 / cg"
 !
@@ -3866,7 +3949,7 @@
 !
 
 makeFilterBlock
-    "return a two-arg filterblock on the files path- and base-name. This block should return true for files
+    "return a two-arg filterblock on the file's path- and base-name. This block should return true for files
      to be shown"
 
     | filterString filterStrings filters notFilters showHidden filterBlock ignoreCase|
@@ -3956,17 +4039,17 @@
 
 enableBack
 
-    ^ self aspectFor:#enableBack ifAbsent:[false asValue]
+    ^ self aspectFor:#enableBack ifAbsent:[ValueHolder with:false]
 !
 
 enableFileHistory
 
-    ^ self aspectFor:#enableFileHistory ifAbsent:[false asValue]
+    ^ self aspectFor:#enableFileHistory ifAbsent:[ValueHolder with:false]
 !
 
 enableForward
 
-    ^ self aspectFor:#enableForward ifAbsent:[false asValue]
+    ^ self aspectFor:#enableForward ifAbsent:[ValueHolder with:false]
 !
 
 fileHistory
@@ -3978,7 +4061,13 @@
 activityVisibilityChannel
     " activityVisibilityChannel switches the activity indicator on/off"
 
-    ^ self aspectFor:#activityVisibilityChannel ifAbsent:[ false asValue ].
+    ^ self aspectFor:#activityVisibilityChannel ifAbsent:[ ValueHolder with:false ].
+!
+
+alwaysUseSmalltalkTools
+    " aspect to prevent os tools to be opened on double click"
+
+    ^ self aspectFor:#alwaysUseSmalltalkTools ifAbsent:[ ValueHolder with:true ].
 !
 
 changeSetBrowserItemVisible
@@ -4027,6 +4116,13 @@
     "Modified: / 02-11-2012 / 11:19:59 / cg"
 !
 
+showDirectoriesOnTop
+
+    ^ self aspectFor:#showDirectoriesOnTop ifAbsent:[ false asValue ]
+
+    "Created: / 12-08-2014 / 13:02:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 showDirectoryTree
 
     ^ self aspectFor:#showDirectoryTree ifAbsent:[ true asValue ]
@@ -4315,7 +4411,7 @@
             self directoryHistory addToHistory:(newDirectories first asString).
         ].
         self enableHome value:((newDirectories includes:(Filename homeDirectory asAbsoluteFilename))not).
-        self enableGotoDesktop value:((newDirectories includes:(Filename desktopDirectory asAbsoluteFilename))not).
+        "/ self enableGotoDesktop value:((newDirectories includes:(Filename desktopDirectory asAbsoluteFilename))not).
         self enableGotoDefaultDirectory value:((newDirectories includes:(Filename defaultDirectory asAbsoluteFilename))not).
         self enableGotoSmalltalkDirectory value:((newDirectories includes:(self smalltalkDirectory asAbsoluteFilename))not).
         self enableGotoDesktopDirectory value:((newDirectories includes:(Filename desktopDirectory asAbsoluteFilename))not).
@@ -4419,7 +4515,7 @@
 
 canPaste
 
-    ^ self aspectFor:#canPaste ifAbsent:[ false asValue ].
+    ^ self aspectFor:#canPaste ifAbsent:[ ValueHolder with:false ].
 !
 
 clipboard
@@ -4461,7 +4557,6 @@
     stream nextPutAll:'> to clipboard'.
 
     self notify:stream contents.
-    stream close.
     clp files:colOfFiles.
     self canPaste value:true.
 ! !
@@ -4731,7 +4826,8 @@
 copySelectionTo
     "copy the selected file(s) to another directory"
 
-    self copySelectionToRepairingCorruptedFiles:false
+    self copySelectionToRepairingCorruptedFiles:false.
+    self updateCurrentDirectoryWithReread.
 
     "Modified: / 07-02-2007 / 18:42:48 / cg"
 !
@@ -4739,7 +4835,8 @@
 copySelectionToRepairingCorruptedFiles
     "copy the selected file(s) to another directory"
 
-    self copySelectionToRepairingCorruptedFiles:true
+    self copySelectionToRepairingCorruptedFiles:true.
+    self updateCurrentDirectoryWithReread.
 
     "Created: / 07-02-2007 / 18:42:59 / cg"
 !
@@ -4753,11 +4850,11 @@
     selectedFiles isEmptyOrNil ifTrue:[^ self].
 
     msg := (selectedFiles size > 1) 
-                ifTrue:[ 'Copy Selected Items To Directory:' ]
-                ifFalse:[ 'Copy "%1" To Directory:' ].
+                ifTrue:[ 'Copy Selected Items to Directory:' ]
+                ifFalse:[ 'Copy "%1" to Directory:' ].
 
     destination := Dialog 
-                    requestDirectoryName:(resources stringWithCRs:msg with:selectedFiles first pathName) 
+                    requestDirectoryName:(resources stringWithCRs:msg with:selectedFiles first baseName) 
                     default:(LastMoveDestination ? self currentDirectory)
                     ok:(resources string:'Copy')
                     abort:nil.
@@ -4874,7 +4971,7 @@
 
     move := FileOperation moveFile:aSourceFile to:aDestFile.
     move result ifTrue:[
-        self notify:('move ', aSourceFile asString, ' to ', aDestFile asString).
+        self notify:(resources string: 'move "%1" to "%2"' with:aSourceFile asString with:aDestFile asString).
     ] ifFalse:[
         self notify:move errorString.
     ].
@@ -4905,14 +5002,16 @@
     |destinationDirectory|
 
     destinationDirectory := Dialog 
-                                requestDirectoryName:(resources stringWithCRs:'Move Selected Items To:') 
+                                requestDirectoryName:(resources stringWithCRs:'Move Selected Items to Directory:') 
                                 default:(LastMoveDestination ? self currentDirectory)
                                 ok:(resources string:'Move')
                                 abort:nil.
     destinationDirectory isEmptyOrNil ifTrue:[^ self].
 
     LastMoveDestination := destinationDirectory.
-    self moveFiles:(self currentSelectedObjects copy) to:destinationDirectory asFilename
+    self moveFiles:(self currentSelectedObjects copy) to:destinationDirectory asFilename.
+    self updateCurrentDirectoryWithReread.
+
 
     "Modified: / 04-12-2006 / 13:15:12 / cg"
 !
@@ -4934,11 +5033,11 @@
         singleSelectedFile := selectedFiles first.
 
         mime := MIMETypes mimeTypeForFilename:singleSelectedFile.
-        (mime notNil and:[mime isArchive]) ifTrue:[
+        (mime notNil and:[mime isArchiveType]) ifTrue:[
             defaultAnswer := singleSelectedFile asFilename withoutSuffix baseName.
 
             mime := MIMETypes mimeTypeForFilename:defaultAnswer.
-            (mime notNil and:[mime isArchive]) ifTrue:[
+            (mime notNil and:[mime isArchiveType]) ifTrue:[
                 defaultAnswer := defaultAnswer asFilename withoutSuffix baseName
             ].
         ].
@@ -5115,14 +5214,20 @@
 bookmarksMenu
     <resource: #programMenu>
 
+    ^ self bookmarksMenuForBaseSpec:self class baseBookmarksMenuSpec.
+!
+
+bookmarksMenuForBaseSpec:aBaseMenuSpec
+    <resource: #programMenu>
+
     |menu bookmarks|
 
-    menu := self class baseBookmarksMenuSpec decodeAsLiteralArray.
+    menu := aBaseMenuSpec decodeAsLiteralArray.
 
     "/ add the bookmark items ...
     bookmarks := self class directoryBookmarks.
     bookmarks notEmptyOrNil ifTrue:[
-        menu addItem:(MenuItem labeled:'-').
+        menu addSeparator.
         bookmarks do:[:dirName |
             menu addItem:(MenuItem 
                             label:dirName asString 
@@ -5154,28 +5259,7 @@
 gotoBookmarksMenu
     <resource: #programMenu>
 
-    |menu bookmarks|
-
-    menu := self class baseBookmarksMenuSpec2 decodeAsLiteralArray.
-
-    "/ add the bookmark items ...
-    bookmarks := self class directoryBookmarks.
-    bookmarks notEmptyOrNil ifTrue:[
-        menu addItem:(MenuItem labeled:'-').
-        bookmarks do:[:dirName |
-            menu addItem:(MenuItem 
-                            label:dirName asString 
-                            itemValue:[
-                                (self currentSelectedDirectories includes:dirName) ifFalse:[
-                                    self setCurrentFileName:dirName.
-                                ].
-                            ]).
-        ].
-    ].
-    menu findGuiResourcesIn:self.
-    ^ menu
-
-    "Modified: / 14-01-2012 / 21:13:58 / cg"
+    ^ self bookmarksMenuForBaseSpec:self class baseBookmarksMenuSpec2.
 !
 
 menuDirHistory:backOrForward
@@ -5208,11 +5292,10 @@
     menu := Menu new.
 
     pathList do:[:aPath| 
-        | menuItem |
-        menuItem := MenuItem new.
-        menuItem label:aPath.
-        menuItem itemValue:[ self setCurrentFileName:(aPath asFilename) ].
-        menu addItem:menuItem.
+        menu addItem:(MenuItem
+                        label:aPath
+                        itemValue:[ self setCurrentFileName:(aPath asFilename) ]
+                        translateLabel:false).
     ].
     menu findGuiResourcesIn:self.
     ^ menu
@@ -5252,10 +5335,12 @@
         aFileItem fileName exists ifTrue:[
             menu addItem:(MenuItem 
                             label: aFileItem fileName asString 
-                            itemValue:[
-                                self setCurrentFileName:(aFileItem fileName).
-                                self openApplByFileItem:aFileItem
-                            ]).
+                            itemValue:
+                                [
+                                    self setCurrentFileName:(aFileItem fileName).
+                                    self openApplByFileItem:aFileItem
+                                ]
+                            translateLabel:false).
         ] ifFalse:[
             "/ remove all not existing history entries
             hist remove:aFileItem.
@@ -5444,6 +5529,16 @@
 
 !AbstractFileBrowser methodsFor:'menu actions-file'!
 
+addDirToJavaSourcePath
+    "add the current path to java's sourcePath
+     (only available with ST/J System"
+
+    Java addToSourcePath:self currentDirectory pathName
+
+    "Modified: 14.12.1996 / 15:37:47 / cg"
+    "Created: 2.8.1997 / 14:11:19 / cg"
+!
+
 copyFiles
     self 
         withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self copyFilesToClipBoard:filesOrDirs]
@@ -5464,6 +5559,18 @@
         withSelectedFilesOrDirectoriesDo:[:filesOrDirs | self eraseFiles:filesOrDirs]
 !
 
+fileAddToJavaSourcePath
+    "add the current path to java's sourcePath
+     (only available with ST/J System"
+
+    self currentSelectedObjects do:[:each |
+        Java addToSourcePath:(each pathName)
+    ].
+
+    "Created: / 9.11.1998 / 05:41:34 / cg"
+    "Modified: / 9.11.1998 / 05:56:00 / cg"
+!
+
 openSettingsDialog
     |dialog|
 
@@ -5639,6 +5746,48 @@
     self makeExecutionResultProcessFor:executionBlock withName:nameString.
 !
 
+cvsCommitFolder
+    |dir log logTmp s logArg msg executionBlock nameString |
+
+    (dir := self currentDirectory) isNil ifTrue:[ ^ self ].
+
+    msg := resources string:'Enter log message for checkIn of "%1"' with:(dir baseName).
+    log := Dialog
+        requestText:msg
+        lines:10
+        columns:70
+        initialAnswer:nil.
+
+    log isNil ifTrue:[^ self].
+    log := log replChar:$"  withString:'\"'.
+
+    OperatingSystem isMSWINDOWSlike ifTrue:[
+        "/ save the log message into another tempFile ...
+        s := FileStream newTemporary.
+        logTmp := s fileName.
+        s nextPutAll:log.
+        s close.
+
+        logArg := '-F "', logTmp pathName, '"'.
+    ] ifFalse:[
+        logArg := '-m ''' , log , ''''.
+    ].
+
+    executionBlock := [:stream |
+            [
+                |cmd|
+
+                cmd := 'cvs commit ',logArg.
+                (self getExecutionBlockForCommand:cmd inDirectory:dir) value:stream.
+            ] ensure:[
+                logTmp notNil ifTrue:[ logTmp remove ].
+            ].
+        ]. 
+    
+    nameString := 'Command> cvs commit'.
+    self makeExecutionResultProcessFor:executionBlock withName:nameString.
+!
+
 cvsCompareWithNewest
     |selectedFiles|
 
@@ -5999,7 +6148,6 @@
     "Created: / 15-01-2012 / 19:43:08 / cg"
 ! !
 
-
 !AbstractFileBrowser methodsFor:'menu actions-tools'!
 
 allFilesInSelectedDirectoriesForWhich:aBlock
@@ -6493,6 +6641,34 @@
     "Modified: / 11-09-2006 / 12:42:26 / cg"
 !
 
+fetchFileByURL
+    |url destinationFilename|
+
+    url := Dialog request:'URL to Fetch:' initialAnswer:'http://host/path'.
+    url isEmptyOrNil ifTrue:[^ self].
+    url := url asURL.
+
+    destinationFilename := Dialog request:'Download As:' initialAnswer:(UnixFilename named:url path) baseName.
+    destinationFilename isEmptyOrNil ifTrue:[^ self].
+
+    destinationFilename := self currentDirectory asFilename / destinationFilename.
+    destinationFilename exists ifTrue:[
+        |answer|
+
+        answer := Dialog 
+            confirm:(resources string:'Overwrite existing %1 ?' with:destinationFilename baseName allBold)
+            default:false.
+        answer ~~ true ifTrue:[^ self].
+    ].
+    self withActivityIndicationDo:[
+        self notify:(resources string:'Fetching %1' with:url).
+        HTTPInterface get:url destinationFile:destinationFilename.
+        self notify:nil.
+    ]
+
+    "Modified: / 20-05-2010 / 11:15:35 / cg"
+!
+
 fileContentsAsByteArray
     |file|
 
@@ -6627,7 +6803,7 @@
             infoDir at:fn put:(fn fileSize)
         ].
 
-        "/ for each, get the files size.
+        "/ for each, get the file's size.
         "/ in a first pass, look for files of the same size and
         "/ compare them ...
 
@@ -6834,7 +7010,7 @@
             infoDir at:fn put:(fn info)
         ].
 
-        "/ for each, get the files size.
+        "/ for each, get the file's size.
         "/ in a first pass, look for files of the same size and
         "/ compare them ...
 
@@ -6936,7 +7112,8 @@
     textBox title:(titleStream contents).
     textBox readOnly:true.
     textBox noCancel.
-    stream := WriteStream on:'Duplicates in '.
+    stream := WriteStream on:''.
+    stream nextPutAll:'Duplicates in '.
     directories do:[ :aDirectory |
         stream nextPutAll:aDirectory baseName.
         stream space.
@@ -6976,7 +7153,7 @@
         directories := self currentSelectedDirectories.
         directories isEmpty ifTrue:[^ self].
 
-        imageFiles := self allFilesInSelectedDirectoriesForWhich:[:f | f mimeTypeFromName isImage].
+        imageFiles := self allFilesInSelectedDirectoriesForWhich:[:f | f mimeTypeFromName isImageType].
         "/ imageFiles := imageFiles select:[:f | f baseName startsWith:'foo'].
         imageFiles sort:[:a :b | a pathName < b pathName].
         
@@ -7159,6 +7336,7 @@
                         charOut := filterBlock value:charIn.
                         out nextPut:charOut.
                     ].
+                    out close. out:= nil.
                     outFile renameTo:inFile.
                 ] ensure:[
                     out notNil ifTrue:[ out close ].
@@ -7184,25 +7362,29 @@
         selectedFiles:= self currentSelectedFiles.
         selectedFiles do:[:fileName |
             XML::XMLSignal handle:[:ex |
-                Dialog information:('Error while reading XML:\    %1' bindWith:ex description) withCRs.
+                Dialog 
+                    information:('Error while reading XML:\    %1' bindWith:ex description) withCRs
+                    title:'XML Error'.
                 ^ self.
             ] do:[
                 |s d magic encoder document|
 
                 s := fileName asFilename readStream.
-                s binary.
-                magic := (s next:2).
-                magic = #[254 255] ifTrue:[
-                    "/ UTF16BE
-                    document := CharacterEncoder decodeString:(s upToEnd) from:#utf16be.
-                ] ifFalse:[ 
-                    magic = #[255 254] ifTrue:[
-                        "/ UTF16LE
-                        document := CharacterEncoder decodeString:(s upToEnd) from:#utf16le.
-                    ].
-                ]. 
-                s close.
-
+                [
+                    s binary.
+                    magic := (s next:2).
+                    magic = #[254 255] ifTrue:[
+                        "/ UTF16BE
+                        document := CharacterEncoder decodeString:(s upToEnd) from:#utf16be.
+                    ] ifFalse:[ 
+                        magic = #[255 254] ifTrue:[
+                            "/ UTF16LE
+                            document := CharacterEncoder decodeString:(s upToEnd) from:#utf16le.
+                        ].
+                    ]. 
+                ] ensure:[
+                    s close.
+                ].
                 document notNil ifTrue:[
                     xmlDocument := XML::XMLParser 
                                     processDocumentString:document 
@@ -7263,12 +7445,80 @@
             signatureFile := fn addSuffix:'sig'.
             signatureFile contents:signature.
         ].
+        self updateCurrentDirectoryWithReread.
+        self notify:nil.
+    ]
+!
+
+generatePatchInstallerForSelectedFiles
+    "generate an expecco patch, which installs the selected file(s).
+     Opens a dialog asking for the target directory and if the patch should be signed"
+
+    |dialog targetDirHolder targetDir 
+     generateSignedPatchHolder patchFileNameHolder patchFileName|
+
+    targetDirHolder := '.' asValue.
+    generateSignedPatchHolder := true asValue.
+    patchFileNameHolder := '/tmp/00nn_patchFile.st' asValue.
+
+    dialog := Dialog new.
+    dialog label:(resources string:'Patch Installer for File(s)').
+    dialog addTextLabel:'Patchfile Name' adjust:#left.
+    dialog addInputFieldOn:patchFileNameHolder tabable:true.
+    dialog addTextLabel:'Target directory (relative to executable''s directory at execution time)' adjust:#left.
+    dialog addInputFieldOn:targetDirHolder tabable:true.
+    dialog addCheckBox:'Generate Signed Patch' on:generateSignedPatchHolder.
+    dialog addAbortAndOkButtons.
+    dialog open.
+
+    dialog accepted ifFalse:[^ self].
+
+    targetDir := targetDirHolder value asFilename.
+    patchFileName := patchFileNameHolder value asFilename.
+
+    self withActivityIndicationDo:[
+        |outStream zipArchive pkcs7SignedData signatureFilename|
+
+        self notify:'Generating self extracting st script: ', patchFileName name, '...'.
+        outStream := patchFileName writeStream.
+        outStream nextPutAll:'
+|patchStream zipArchive|
+patchStream := Expecco::Browser::CurrentPatchStreamQuery query.
+patchStream isNil ifTrue:[ self error:''sorry, this patch can only be installed in expecco 2.6.2 and newer (missing CurrentPatchStreamQuery)''].
+zipArchive := ZipArchive readingFrom:patchStream.
+zipArchive members do:[:each | zipArchive extract:each fileName].
+patchStream setToEnd. "/ to force fileIn to finish
+!!
+
+!! !!
+
+'.
+        zipArchive := ZipArchive writingTo:outStream. "/ newFileNamed:(patchFileName).
+
+        self currentSelectedFiles do:[:fn |
+            |inStream signatureFilename|
+
+            inStream := fn asFilename readStream.
+            zipArchive addFile: (targetDir construct:fn asFilename baseName) name fromStream:inStream.
+            inStream close.
+        ].
+
+        zipArchive closeFile.
+
+        generateSignedPatchHolder value ifTrue:[
+            self notify:'Generating signed file from: ', patchFileName name, '...'.
+
+            pkcs7SignedData := Expecco::KeyFileGenerator new signExpeccoCode:patchFileName contentsOfEntireFile.
+            signatureFilename := patchFileName withSuffix:'expeccoPatch'.
+            signatureFilename contents:pkcs7SignedData.
+        ].
         self notify:nil.
     ]
 !
 
 generateSignaturesForSelectedFiles
-    "generate signed pkcs7 files from the contents of the selected files"
+    "generate signed pkcs7 files from the contents of the selected files.
+     These can be delivered as expeccoPatch files"
 
     self withActivityIndicationDo:[
         self currentSelectedFiles do:[:fn |
@@ -7280,6 +7530,7 @@
             signatureFilename := fn withSuffix:'expeccoPatch'.
             signatureFilename contents:pkcs7SignedData.
         ].
+        self updateCurrentDirectoryWithReread.
         self notify:nil.
     ]
 !
@@ -7316,25 +7567,27 @@
     "install all classes found here (and in subdirs if aBoolean is true) as autoloaded classes"
 
     [
-        |installAction|
-
-        installAction := 
-            [:fn |
-                (fn suffix = 'st') ifTrue:[
-                    self notify:('Install as autoloaded: ', fn baseName).
-                    self installAsAutoloaded:fn.
-                ]
+        LoadInProgressQuery answerNotifyLoadingDo:[
+            |installAction|
+
+            installAction := 
+                [:fn |
+                    (fn suffix = 'st') ifTrue:[
+                        self notify:('Install as autoloaded: ', fn baseName).
+                        self installAsAutoloaded:fn.
+                    ]
+                ].
+
+            self withActivityIndicationDo:[
+                self currentSelectedDirectories do:[:dir|
+                    aBoolean ifTrue:[
+                        dir recursiveDirectoryContentsAsFilenamesDo:installAction
+                    ] ifFalse:[
+                        dir directoryContentsAsFilenamesDo:installAction
+                    ].
+                ].
+                self notify:nil.
             ].
-
-        self withActivityIndicationDo:[
-            self currentSelectedDirectories do:[:dir|
-                aBoolean ifTrue:[
-                    dir recursiveDirectoryContentsAsFilenamesDo:installAction
-                ] ifFalse:[
-                    dir directoryContentsAsFilenamesDo:installAction
-                ].
-            ].
-            self notify:nil.
         ]
     ] fork.
 !
@@ -7386,7 +7639,7 @@
             img notNil ifTrue:[
                 aBlock value:img
             ] ifFalse:[
-                Dialog warn:'Unknown format: ' , fileName asString
+                Dialog warn:(resources string:'Unknown image format: "%1"' with:fileName asString)
             ]
         ]
     ].
@@ -7394,7 +7647,7 @@
 
 loadSignatureSupport
     Expecco::KeyFileGenerator isNil ifTrue:[
-        Smalltalk loadPackage:'exept:expecco:license'
+        Smalltalk loadPackage:'exept:expecco/license'
     ].
 !
 
@@ -7466,10 +7719,10 @@
 !
 
 openDiffView
-    "open a diff-view"
-
-    |name1 name2 text1 text2 d err nm l1 files title 
-     defaultName defaultDir sameContents msg|
+    "open a diff-view on the two selected files"
+
+    |name1 name2 files title 
+     defaultName defaultDir|
 
     files := self currentSelectedObjects.
     files isEmpty ifTrue:[
@@ -7506,31 +7759,43 @@
                     pattern:'*' 
                     fromDirectory:defaultDir.
     ].
+    self openDiffViewOn:name1 and:name2
+
+    "Modified: / 03-05-2012 / 08:03:16 / cg"
+!
+
+openDiffViewOn:fileArg1 and:fileArg2
+    "open a diff-view on two files"
+
+    |file1 file2 text1 text2 d err nm l1 sameContents msg|
+
+    file1 := fileArg1.
+    file2 := fileArg2.
 
     self withWaitCursorDo:[
-        (name1 isNil or:[name1 asString isEmpty]) ifTrue:[
+        (file1 isNil or:[file1 asString isEmpty]) ifTrue:[
             text1 := self getAllFilesAsStrings asStringCollection withTabs.
-            text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l]].
-            name1 := nil.
+            text1 := text1 collect:[:l | l isNil ifTrue:[' '] ifFalse:[l string]].
+            file1 := nil.
             l1 := 'browser contents'
         ] ifFalse:[
-            name1 := name1 asFilename.
-            LastFileDiffFile := name1.
-            name1 isReadable ifFalse:[
-                nm := name1.
-                name1 exists ifFalse:[
+            file1 := file1 asFilename.
+            LastFileDiffFile := file1.
+            file1 isReadable ifFalse:[
+                nm := file1.
+                file1 exists ifFalse:[
                     err := '"%1" does not exist.'.
                 ] ifTrue:[
                     err := '"%1" is not readable.'
                 ].
             ].
-            l1 := name1 pathName
+            l1 := file1 pathName
         ].
 
         err isNil ifTrue:[
-            name2 isReadable ifFalse:[
-                nm := name2.
-                name2 exists ifFalse:[
+            file2 isReadable ifFalse:[
+                nm := file2.
+                file2 exists ifFalse:[
                     err := '"%1" does not exist.'.
                 ] ifTrue:[
                     err := '"%1" is not readable.'
@@ -7543,14 +7808,14 @@
         ].
 
         self withActivityIndicationDo:[
-            ((name1 notNil and:[name1 fileSize > (1024*1024*32)])
-            or:[ name2 fileSize > (1024*1024*32) ]) ifTrue:[
-                name1 fileSize = name2 fileSize ifTrue:[
+            ((file1 notNil and:[file1 fileSize > (1024*1024*32)])
+            or:[ file2 fileSize > (1024*1024*32) ]) ifTrue:[
+                file1 fileSize = file2 fileSize ifTrue:[
                     ProgressIndicator
                         displayBusyIndicator:'Comparing...'
                         at:(Screen default center)
                         during:[
-                            sameContents := (name1 sameContentsAs:name2).
+                            sameContents := (file1 sameContentsAs:file2).
                         ].
                     sameContents ifTrue:[
                         self information:'Same contents.'
@@ -7563,20 +7828,20 @@
                 ^ self.
             ].
 
-            name1 notNil ifTrue:[
-                name1 isDirectory ifTrue:[
-                    text1 := name1 directoryContents asString.
+            file1 notNil ifTrue:[
+                file1 isDirectory ifTrue:[
+                    text1 := file1 directoryContents asString.
                 ] ifFalse:[
-                    text1 := name1 contents.
+                    text1 := file1 contents.
                 ]
             ].
-            name2 isDirectory ifTrue:[
-                text2 := name2 directoryContents asString.
+            file2 isDirectory ifTrue:[
+                text2 := file2 directoryContents asString.
             ] ifFalse:[
-                text2 := name2 contents.
+                text2 := file2 contents.
             ].
             text1 = text2 ifTrue:[
-                (name1 isDirectory or:[name2 isDirectory]) ifTrue:[
+                (file1 isDirectory or:[file2 isDirectory]) ifTrue:[
                     msg := 'Same filename lists.'
                 ] ifFalse:[
                     msg := 'Same contents.'
@@ -7585,7 +7850,7 @@
             ] ifFalse:[
                 d := DiffTextView 
                         openOn:text1 label:l1
-                        and:text2 label:name2 pathName.
+                        and:text2 label:file2 pathName.
                 d topView label:(resources string:'File Differences').
             ]
         ]
@@ -7948,9 +8213,24 @@
                 ] ifFalse:[
                     Parcel loadParcelFrom: fileName pathName
                 ]
+            ] ifFalse:[ (fileName hasSuffix:'jar') ifTrue:[
+                JavaVM isNil ifTrue:[ 
+                    Dialog warn: (resources string: 'Java support is not loaded.').
+                    ^ self.
+                ] ifFalse:[
+                    JavaVM booted ifFalse:[ 
+                        (Dialog confirm: (resources string: 'Java is not initialized. Initialize now?')) ifFalse:[ ^ self. ].
+                        JavaVM boot.
+                    ].
+                    JavaVM loadClassesIn: fileName.  
+                ]
             ] ifFalse:[
                 "/ ask programming languages...
                 lang := ProgrammingLanguage allDetect:[:l | l canReadSourceFile:fileName] ifNone:nil.
+                (lang isNil and:[(fileName hasSuffix:'js')]) ifTrue:[
+                    Smalltalk loadPackage:'stx:libjavascript'.
+                    lang := ProgrammingLanguage allDetect:[:l | l canReadSourceFile:fileName] ifNone:nil.
+                ].
                 (lang notNil and:[lang ~= SmalltalkLanguage]) ifTrue:[
                     lang fileIn:fileName.
                 ] ifFalse:[
@@ -7971,7 +8251,7 @@
                         ]
                     ]
                 ]
-            ]]]
+            ]]]]
         ]]
     ] on:Error, HaltInterrupt, Class packageRedefinitionNotification do:[:ex| 
         |sig msg label labels values action proceedValue isRedef redefKind|
@@ -8075,6 +8355,7 @@
     ]
 
     "Modified: / 22-11-2011 / 13:52:17 / cg"
+    "Modified: / 19-02-2014 / 12:49:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 splitFile:infile intoPiecesOfSize:kiloBytes
@@ -8177,7 +8458,7 @@
 
     |selectedFiles|
 
-    selectedFiles := self currentSelectedFiles.
+    selectedFiles := self currentSelectedObjects.
     ^ (selectedFiles notEmpty and:[self currentFilesAreInSameDirectory]).
 !
 
@@ -8281,8 +8562,9 @@
 
 hasJava
 
-    ^ [ JavaClassReader notNil 
-        and:[JavaClassReader isLoaded]]
+    ^ [ JavaVM notNil 
+        and:[JavaClassReader notNil 
+        and:[JavaClassReader isLoaded]]]
 !
 
 hasJavaAndSelection
@@ -8382,7 +8664,6 @@
 
 
 
-
 !AbstractFileBrowser methodsFor:'presentation'!
 
 getModeString:modeBits
@@ -8438,6 +8719,14 @@
     dirs := self currentSelectedDirectories.
     dirs size ~= 1 ifTrue:[ ^ nil].
     ^ dirs anElement.
+!
+
+theSingleSelectedFileOrNil
+    |dirs|
+
+    dirs := self currentSelectedFiles.
+    dirs size ~= 1 ifTrue:[ ^ nil].
+    ^ dirs anElement.
 ! !
 
 !AbstractFileBrowser methodsFor:'queries'!
@@ -8590,6 +8879,11 @@
 
 systemIsUnix
     ^ OperatingSystem isUNIXlike
+!
+
+systemSupportsVolumes
+
+    ^ OperatingSystem supportsVolumes
 ! !
 
 !AbstractFileBrowser methodsFor:'queries-file'!
@@ -8843,6 +9137,18 @@
         and:[self hasOnlyFilesSelected]
 
     "Modified: / 04-12-2006 / 13:15:04 / cg"
+!
+
+selectNextFile
+    self 
+        applicationNamed:#DirectoryContentsBrowser 
+        ifPresentDo:[:appl | appl ~~ self ifTrue:[ appl selectNextFile ]].
+!
+
+selectPreviousFile
+    self 
+        applicationNamed:#DirectoryContentsBrowser 
+        ifPresentDo:[:appl | appl ~~ self ifTrue:[ appl selectPreviousFile ]].
 ! !
 
 !AbstractFileBrowser methodsFor:'sorting'!
@@ -8963,7 +9269,8 @@
 postOpenWith:aBuilder
 
     super postOpenWith:aBuilder.
-    self windowGroup showWaitCursorWhenBusyForMillis:100.
+    "/ now done for all windowGroups by the group itself
+    "/ self windowGroup showWaitCursorWhenBusyForMillis:100.
 
     "Modified: / 25-07-2006 / 09:12:45 / cg"
 ! !
@@ -9317,19 +9624,10 @@
 !AbstractFileBrowser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.538 2013-09-06 16:03:14 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.588 2015-03-20 16:08:59 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.538 2013-09-06 16:03:14 cg Exp $'
-!
-
-version_HG
-
-    ^ '$Changeset: <not expanded> $'
-!
-
-version_SVN
-    ^ '$Id: AbstractFileBrowser.st 8084 2013-01-14 12:06:02Z vranyj1 $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractFileBrowser.st,v 1.588 2015-03-20 16:08:59 cg Exp $'
 ! !