Tools FileBrowser/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 16: Zeile 16:
Whenever a file is saved, a backup named <code><i>file</I>.bak</code> with the original contents is created.
Whenever a file is saved, a backup named <code><i>file</I>.bak</code> with the original contents is created.
However, only one level of backup is kept by the editor; thus, if you save again, the first backup will be overwritten.
However, only one level of backup is kept by the editor; thus, if you save again, the first backup will be overwritten.

== Multiple Tabs (Pages) ==
Multiple files may be edited in parallel; press <KBD>CTRL+t</KBD> (or select the corresponding menu function from the <I>Browser</I> menu) to get another editor.


== Display Options ==
== Display Options ==

Version vom 11. November 2025, 21:11 Uhr

Overview[Bearbeiten]

The File Browser provides useful functions to search, manipulate and edit files. In expecco, its main use is to provide a simple but powerful editor to look at traces, test data attachments or to edit configuration files. The editor supports Unicode and various common encodings and can also display binary data (hex dumps), bitmap images, XML, HTML and some other common file formats.

The tool is actually part of the underlying Smalltalk IDE and its documentation is part of the official Smalltalk/X Online Documentation.

This is an expert tool, which should be used with care. Be especially careful to not modify any of expecco's own configuration or support files (which is of course also true for any other text editor).

Editing[Bearbeiten]

When a file is selected in the upper file-list pane, its contents is shown in lower editor or preview pane. If the file is not a text file, a preview is shown. Otherwise a regular text editor (as described elsewhere). For non-text files, you may enforce a text editor via the BrowserAdd Text Editor Page main menu item.

The text editor provides a number of useful functions via its own toolbar and many more via its right button menu.

Whenever a file is saved, a backup named file.bak with the original contents is created. However, only one level of backup is kept by the editor; thus, if you save again, the first backup will be overwritten.

Multiple Tabs (Pages)[Bearbeiten]

Multiple files may be edited in parallel; press CTRL+t (or select the corresponding menu function from the Browser menu) to get another editor.

Display Options[Bearbeiten]

When double clicking on a file, the File Browser will display the file's contents in the lower editor pane. Usually, it will be displayed as text, but if the file contains a bitmap image in one of the common formats (JPEG, TIFF, PNG, GIF, ICO, BMP, etc.) it will display the image in the lower pane.

If you don't want to see the preview, but the contents instead, choose "Browser" → "Add Text Editor Page" from the main menu (with a file selected). There you may also switch to the hex display to see the bytes as numbers as described below.

You can also open a preview window (via "View" → "Preview") which displays a bitmap image file as a thumbnail in a floating window. It immediately follows the current selection without a need for double click (use single click or cursor-movement keys in the file-list).

To get a hex dump of the file's contents, toggle the "Hex Display" toolbar button in the lower toolbar. Sorry, but the hex-dump is (currently) read only. We may add this to a later version if customers are interested (please place a feature request into expecco ALM).

File Indexing (Tags)[Bearbeiten]

For text files in many common formats, the builtin indexer will be able to determine syntactic constructs contained in the file and display them in the index list at the right of the lower text editor pane. Program files written in C, C++, Java, Python, Lisp/Scheme, Ruby, Smalltalk, and many others, for Makefiles, HTML files etc. are handled. It will determine where functions/chapters/classes etc. start and list them. Click on an item in that list to quickly navigate to the corresponding syntactic entity.

There are also a number of filters (by name pattern or type). For example, it is possible to only list functions, macros, types, labels etc. of a C program file (try the popup menu in the index list for details).

Notice that the indexer's algorithm is relatively naive - it does not really understand the syntax of languages, but instead looks for typical definition patterns. This might be incorrect.

File Search Operations[Bearbeiten]

Press the "File Search" button in the File Browser's toolbar menu, to get an extra page (tab) containing a search input form. You can search for files by name, contents, non-contents, size or modification time. Both file-name and search-pattern can be regular expressions, and the search be either case sensitive or insensitive.

The search is usually recursive. Use this e.g. to find all files with a particular suffix, which contain a particular string pattern or which have been modified before/after some particular time/date. In many situations, this search is faster than using "find | grep" on Unix, and - unless indexed - also faster than corresponding search functions under MS Windows.

Embedded VT100 Terminal Emulator[Bearbeiten]

The File Browser includes a vt100 emulator, in which shell or cmd consoles are shown. The emulation is not 100% perfect, so please be tolerant when some cursor-movements are not accurate or leave garbage characters on the screen (especially cursor movements at the right/bottom may wrap differently than the "real thing"). For real editor work, use xterm under Unix or a cmd window under MS Windows. Or edit using the filebrowser itself (which contains the same type of editor as in the elementary action's code editor; albeit with additional menu operations).

Advanced File Operations[Bearbeiten]

The File Browser offers a number of special file operations which may be seldom needed, but no less useful to have at your command, when needed.

File Splitting and Joining[Bearbeiten]

File splitting (into a number of smaller files) is useful when you have huge files (typically traces, dumps or debug output) which are too large to be edited in one piece, too large to be stored on a particular storage device (think of the 4Gb size limit of Windows file systems or USB sticks), or which are too large to be sent via mail or other communication channels (think of mail-attachment size limits).

There are two split functions, to split a large file into pieces by size (e.g. pieces of 1Gb) or to split into pieces by line-number count (eg. pieces with 100k lines each). The later should only be used on text files, because a binary file which does not contain any linebreak characters would result in a huge one-liner.

The functions are found on the File Browser's popup menu (select one or multiple files first) under "Tools" → "File Operations" → "Split".

There are actually two such menu items, "Split by Size" and "Split by #Lines". It will split a file named "x" into parts "x.1", "x.2", etc.

The reverse operation is "Join", which is found under the same submenu. This takes a number of pieces and rejoins them into one big file.

Copying Corrupted Files[Bearbeiten]

This operation may be helpful to extract as much as possible data from partially broken files. I.e. to copy files form a disks or tapes with errors. It will copy the file blockwise and skip over bad blocks when an error is encountered (instead of the regular copy operation, which stops when a read error happens). Instead of stopping, it will retry to copy the bad data block a few times, and then write a block of zeros to the output and continue to copy (or try to copy) the rest of the file or tape.

Truncate File[Bearbeiten]

This truncates a file to a given size, effectively cutting off the tail of a file.

File Differences[Bearbeiten]

To generate and display the differences between the two files, select two files in the top file list, then right click and choose "More" → "Compare with each Other".

Alternatively, choose "Tools" → "File Operations" → "File Differences" from the main menu. If only one file is selected, that operation asks for the name of a second file (useful if the other file is found in another directory). If no 2nd file is selected, the file's contents is compared against the text editor's contents.

Directory Differences[Bearbeiten]

The main menu's function "Tools" → "File Operations" → "Directory Differences" will recursively visit two folders and display information about files missing in either directory or being different.

Find Files with Same Contents[Bearbeiten]

Quickly searches a recursive folder hierarchy for files containing the same data. This is very fast and can quickly find duplicates, even among thousands of files.

Encrypt and Decrypt[Bearbeiten]

Useful as a password save. Generates a file.cry with encrypted contents, or decrypts a selected file.cry back. Does not delete the originals - you must do that.

 


Back to Online Documentation.
Back to Tools.



Copyright © 2014-2024 eXept Software AG