Jens' File Editor - The Ultimate Editor for ProgrammersJFE

Very much thanks to L. and A. Oppenheim at School of IT, Swinburne University, Australia
for the work of translating from German to English.

JFE was always quite usable.  Without any documentation however, it was commonly found that it was not
possible to make use of the inexhaustible possibilities provided by the editor. Now finally a remedy is at hand.
However, only the important things which differentiate this editor from others will be described.

The current version here V3.84 English               To Jens' Home page  
Here the same version in German German To the description in German German
PDF Configuration guide in Portuguese Portuguese  

Highlighting, deleting and inserting blocks

These functions are carried out with the mouse in combination with the ALT key.

Areas that go over a line will be filled up with empty characters and completed with the
number of characters required for a whole line.  The selected text is therefore always a rectangle.
The colour with which desired text is highlighted can be changed by altering the 15th text
background colour in the colour menu.  Blocks (and also normally selected text) can be inserted
at the current cursor position using CTRL-V (as normal) or also into a column.
There are three ways to insert blocks:

1. The block will be inserted into the text  maybe so (B=inserted block, T=text)

     TTTT       BBBBB


2. The block will be inserted in the column, text will be moved down



3. The bolck will be inserted simply with Paste 


Of course you can define own hotkeys for these operations.


Management of Colours

For every character there exists a byte for colour information. Out of this byte, the lower nibble describes the
text colour and the upper nibble the text background.  The colour number (0..15) contains an index from the
table of actual 24Bit-RGB colour values. Therefore at any one time there are only 16 different colours able
to be selected.

The colour settings are under the menu item "Settings-Colour".  All colour settings are saved in
INI data file or the respective project file.

In order to modify a colour, select the appropriate small box with the mouse and click on "Change".
Another colour can then be selected from the colour dialog box..

The text foreground colour in index 0 (the first small box) is the preset writing colour for non selected text,
and when syntax highlighting is not used (preset to black).

Comparatively, the preset colour for the text back ground is in Index 0 of the underlying table for the text
background. The text background refers only to those areas which actually contain text.
All other areas are set using the "Default background colour".
For simplification, when this colour is altered, so is Index 0 of the colour table,
i.e..  the text background is also altered.
Those who wish to have the text with a different background must first set the Default Background and
then the text background.

The indexes 14 and 15 also have special meanings.

The colour index 15 determines how selected areas in the foreground and background will appear.
Therefore it is possible that the selection appears different to the default settings in Windows.

The colour index 14 has a double function.  Firstly it determines the appearance of the line numbers border.
Secondly it indicates the text background colour during Block Selection of the empty characters.


How to define your own Syntax Highlighting Colours

For C and C++ the fundamental syntax highlighting colours are already pre-defined.
You can, however, still create additional different colour templates for other programming languages.
To do this, open the menu :  "Settings - Syntax colours" and start a new Template.
The requested name is arbitrary and serves only to differentiate adjustments to the template within the INI file.
The new template is initially empty and must first be filled with the key words to be highlighted.
A new entry is created with the button "New entry".  The keyword, text colour and special flags
can then be set in the then opened dialog box.  The keywords are processed with falling priority.
This means that a defined syntax colour at the top of the list can overwrite those below.


1. else   would appear as: #else
2. #else

When listed in the other order, the desired result is achieved:

1. #else   would appear as : #else
2. else  
The flags have the following meaning: The background colours are not able to be altered.

There is still another special feature: one can also include a line break in a key word using "\n".
Therefore the exact same written character string (without "\n") will not be treated the same.

The keyword is included by pressing "OK".  Changing a keyword is similarly achieved.
Colours and keywords are stored in plain text in the INI file and can also be edited directly.


Search Functions

There are four levels of search functions:

  1. Search in the active document
  2. Search in all opened files
  3. Search in the active document and output of the search attempt is presented in the output window
  4. Search in all opened files and in the current path and optionally in all sub lists
To simplify operation, it is possible to bring a selection in the document directly into the search window, by
selecting the check box "take over selected text".  This means that, unlike in competitors' products, the
otherwise necessary copy-insert is avoided.

Aside from this, the 1st search function corresponds to the usual functionality, with an additional extension
for special characters such as TAB "\t", new line "\n" which can also be searched for in combination with text.
Searching for a backslash "\" must therefore be formulated differently.
Example: c:\tmp will search for "c:TABmp"
  c:\\tmp "c:\tmp"

Searching using versions 2, 3 and 4 puts the search results in the output window.
The appropriate document is activated or loaded by double clicking on the respective line.
Additionally, there is an option not to show results obtained from inside C-comments.  This is
a language specific setting but is nevertheless quite useful when JFE is intended as a programming editor.

Search version 4 can be accessed by clicking on "Extended" from search version 2.
Thus it is possible to search for text in a file which is not currently opened.
Naturally it is useful here to limit the number of files which are searched.
This is possibly using the specification of a data filter.  Additional filters are separated by blanks.
Wild cards are possible.
Examples: *.c *.h searches for all files with the extension "h" and "c"
  O?t*.* looks for all files which begin with "O"
then any character followed by "T",
and then other characters until the dot,
and then any other extension
finds: Otto.txt, OttoMax.cpp

The search is executed in the directory entered as the initial directory.
This is the current work path when the dialog is first opened.
Sub paths are searched if the appropriate option is selected.



Bookmarks allow a programmer to quickly again find a specific place in a document.  This is particularly
good if you are scrolling back and forth within a document or switching constantly between several documents.

A bookmark is displayed as a key in a toolbar on the (default) right side of the work area.
The bookmarks of the currently active window are yellow paper clips with all others black.

For each bookmark button the associated Tool Tip shows the filename and line number of the bookmark.
Any Tool Tip text can also be assigned to each bookmark. To do this, click with the right mouse button on the bookmark to be altered, and fill in the input field with the required name.

Book marks are set through :

They can be deleted the same way, by simply going to the bookmark to be deleted and deleting it using the above commands.


Special Settings

OpenWindows Multi Click   Therefore multi clicks are possible
  1. click sets the cursor 
  2. (double) clicks the word 
  3. selects the line 
  4. selects the entire text
Hold selection after paste   Normally, after insertion of text the highlighting is removed and the cursor goes to
 the end of the selected text.
When using this setting "Hold selection after Paste" the text remains selected.
Focus not until 2. click   When changing between documents, the current document is only able to be edited
after the second click.
Run as a single instance (file menu)   Normally, for each file that is opened from Explore (using Drag, double click, Send To)
a new instance of JFE is started.  This can be prevented using this option.
Therefore, the file will be opened and become active using the existing application. 
Tabs can either be know as Hard Tabs (character code 0x09) or as a consequence 
of the insertion of blanks (Soft Tabs).  A transformation from hard to soft tabs is possible 
but cannot happen in reverse.  Hard TABs can be represented as characters (internally
a Hard TAB is represented by the characters 0x09 + variable numbers from 0x01).  Hard tabs can also be displayed.  The tab character is a small box.
Backup   Using backups, files can possibly be configured differently. 
First a copy is created which lasts the entire session, which gets the extension ".org".
Backups (extension ".bak") can be created each time the document is saved.
To minimize the risk of data loss, a document can also be saved automatically at adjustable intervals. 
Auto indent   When a line feed is executed, the cursor is placed beneath the beginning of the previous line.
Line feed after an opening curved bracket '{' places the next line an additional tab with in.  A closing curved bracket '}' will, where possible, be placed under the column of the appropriate opening bracket. 
Macros are applied in a lines if they are in several lines. 
No search results in C comments   When searching, strings found within C-comments will not be displayed.  This setting is appropriate for looking up in files as well as within brackets.  The normal search function is not influenced by it.
Save in UNIX Format   This setting results with saves using LF (0x0A) rather than the DOS CR/LF (0x0D/0x)A).  This function can also be executed by clicking on the appropriate symbol in the status border.  The format of a file is detected upon opening, and, if not modified, it is saved as the original format.  The menu option always shows the format of the currently active file.
Auto copy   Selected text is automatically transferred to the clipboard. 
Line wrapping Using this setting, the column at which line breaks should occur can be set independently.  You can chose the column number or can use the automatic break. 
Sometimes you may want the linebreaks only after whole words. Then you must select "Wrap only between words" The line break will be done always atword borders. If the line doesn't contain more than one word
The line will be still broken at the set limit.
ATTENTION, automatic line wrapping slows donn the editor dramatically. Use it only if necessary.
Auto Search 
Switches Autobrowser on/off
AutoSearch Configuration Opens the dialog for configuration of the  Autobrowser
Default directory When set, all open / save -operations will offer the same default directory
The entry will be saved in the workspace as alos in the INI-file.
Split When activated you can divide the document in up to 4 independet scrollable views.


The Tool Menu

The Tool menu provides practical functionality used to assemble, compile or link edited sources.

In addition, JFE also provides the following :
When the Menu item "Settings - Add Tool", the dialog on the right will open (with new tools it is empty).  The different window versions and applications can react very differently on the start of another application and this setting can allow a number of different adjustments to achieve the desired behaviour.
The output of a DOS application is always affected i.e. 
the output of STDOUT and STDERR can be handled in three different ways : 

  • The output takes place over the console of the started program. 
  • The output is written into a file and after termination of the program this document can be read in the output window

  • ( The problem with this is that you cannot see the program if anything runs too long, or if you must react to an input request )
    The output is redirected into the output window directly by JFE.  Input requests can be served directly from the JFE output window (this is reliably the most elegant method.  Unfortunately there are some programs that this method will not work with.  Then one must use one of the other versions.   The bypass functions only for standard output streams.  Outputs directly to the console cannot be re directed )
For the start of an application there are three possible (but not mandatory) parameters : 
  • The executable program (*.exe ,*.bat ) 
  • The path to the work directory (does not have to correspond to the path of the program)
  • parameters required in the program call 
There are macros which make life easier for the parameters :
  • $FILE ...the name of the active (in foreground) document with file extension 
  • $NAME ...the name of the active (in foreground) document without file extension 
  • $EXT ...the file name extension of the active (in foreground) document
  • $PATH ... the complete path of the active document
  • $CURSEL ... the currently selected text in the active  (in foreground) document
The parameters can be selected directly from the list, and can be entered at the selection in the edit field. 
When the file is compiled,  error messages (which certainly can be expected) are shown in the output window.
It would be very nice if you did not have to read the error, open the appropriate file and scroll though.  Again, this problem has been solved in JFE.  Simply double click on the error message and the document is looked up and scrolled through until the location of the error.  Unfortunately, each compiler produces a different output.  Therefore, one should select a suitable format from the set of formats under "Compiler Filters".( If there is not an appropriate filter I could still create more! )
The following filters are currently available : 
Keil C   ERROR IN LINE 50 OF ..\pearl\MOPORE.P Fehlerbeschreibung
Microtec PPC   "MOPORE.P" line123, pos 15 Fehlerbeschreibung
EMACS   C:/Tmp/pearl/MOPORE.P:123: Fehlerbeschreibung
HPC   "k1762a_c.c", line 1195: Fehlerbeschreibung
MSC/C++   C:\MSDEV-Projects\JFE\buildhtm.cpp(539) : error C2146: syntax error : missing ';' before identifier 'pv1'
GNU166   basic.c:755: warning: left shift count >= width of type
ViewLogic   **Error: LINE 166 *** Symbol >>MAY_TX_FROM_Q<< is not   !!keine Erkennung des Dateinamens möglich
Borland   Error E2268 test.c 51: Call to undefined function 'reroll' in function main(int)
CADUL   CC386-E-ERROR:PLCPAPI.C: 2003: expression syntax
TASKING   W 91: no prototype for function "istm1InvIfEntry_first"
E 160: pointer mismatch at '='
   333: data = istm1InvIfEntry_next_idx(data))
PC-LINT   "*** LINT: c:\work\dnu02\c16_tmp\b03a6.h(99) Error 46: field type should be int"
"*** LINT: Info 768: global struct member 'QIPMB1' (line 1105, file t03bc.h) not referenced"
Motorola DSP   **** 3556 [test.asm 556]: ERROR --- Unrecognized mnemonic: je
Mitsubishi NC30   [Error(ccom):monitor.c,line 27] syntax error at near 'ng_out'
LCCWin32   Error srcinden.c: 96 redeclaration of `phase6' previously declared at c:\bcx\projects\srcinden\srcinden.c


In the right column an example of the output produced is shown.  Hence you can choose a suitable filter.  The search criteria is marked in red in the output on the basis of the line number where the error is detected. 

A tool appears in its own tool bar list as a button.  The name displayed there is the description given in the input field "name" (maximum 15 characters). The tools in the tool list can be subsequently sorted using Drag-Drop.  The settings dialog can be opened to adjust the settings by clicking on the respective tool button with the right mouse button. 

If a virus search program is running in the background, the output bypass does not always function correctly.  This is evident when suddenly, without motivation, the floppy disk drive is accessed or when make.exe hangs.  The only way to avoid this is to switch off the virus search program or to do without the output bypass. 

Some old tools cannot be redirected, but they always produce a file of specified name.  Sometimes it helps to search a batch file after the termination of a tool, for the expression "output file".  Thus the output can still take place in the output window.

The check boxes have the following meanings :

  • "Redirect output to JFE

  •  The output of the program is re-routed directly into the output window of JFE
  • "Redirect into file and open"

  •  If the file can not be directly redirected  (some programs can obviously not be accessed using pipes), it is possible to first write the output into a file and after the termination of the program, read this file.  This works in most cases.  When this also does not help, neither of the options can be used.  Then the program is started as per from Explore.
  • "save before run"

  • Saves all altered files before the tool (e.g. make) is started.
  • "before run, change to working directory"

  • Despite the specification of a working directory, some programs have this problem.  In order to avoid this problem, which is one of the totally unclear mysteries of Windows, it is necessary to change to the working directory before the start of the application.
  • "shorten path names"

  • Long path names will be replaced by the windows short form. 
    Therefore "C:\MyToolExperiments\tool.bat" becomes "C:\MyTool~1\tool.bat"



The Autobrowser

It's very uncompfortable if you have always to scroll or switch between different files if you work on large projects to search for variables, defines and functions. If such informations are available inside the project, this work can be done by the program self. Exactly this does the autobrowser. If it's started it searches all configured files and pathes for these informations. It builds up an internal list with links to the locations in the associated files. If the cursor moves over a keyword contained in this list a tooltip 
will be shown. Depend of the entry the tooltip contais the following informations:

Tagtyp Key word Tooltip content
Definition #define Value of the defines
Enum enum Enum name
Type definition struct
Name of the  structure or  structure member
Function (depend of  context) Function prototype
Variable (depend of  context) Type of  the variable
extern Functionen extern  Function prototype


The search can be done eihter in the configured pathes including
the subdirectories or only inside the opened files. It's also possible to 
select single files. For each path you can set a file filter to include only 
interesting files. Multiple types will be separated by spaces.

In the field "Search for:" you can select for which C-constructs you want 
to search with the browser.

The internal browser data bank can be written as ASCII-text file 
with the option "Export Tagfile".

The browser can be started with the button "B" in the status bar 
or using the menu entry "Auto search". The browser stops normally by 
itself if it has finished searching all files. But it can be stopped also by click
on the rotating arrow in the status bar. Not later than 5s the browser thread
should be finished.
The browser thread runs in the background with low priority. So it doesn't
affect the normal working.
If you save or close a file while the browser is running it will be terminated
to avoid inconsistencies in the data bank.



The Operations Menu
Remove all blanks at the end of line.
Remove all blacks at the start of a line.
The entire text is therefore left justified..
All blank lines are removed within the selected area.
When nothing is selected, all blank lines are removed.
C or C++ source is arranged in a uniform way, developing a readable structure.
Examines all opened source and header files and produces a HTML file that will systematically represent the mutual call, plus declaration and implementation of functions through hyper links.

The operations carried out through this dialog cannot be reversed.  Therefore SAVE beforehand!


Rules for the C syntax alignment

The structure of C is naturally a matter of personal taste.  Therefore each form of automatic alignment is also open to criticism.  Hence : The C syntax alignment implements my personal conception of how C/C++ should be structured for readability. Those who do not like the given alignment do not have to use it, but there also remains sufficient degrees of freedom.
Here are the rules for the C syntax alignment :


How to use the Operation to create HTML projects

What programmer does not know the problem : you gets heaps of source and header files (or you have written heaps) and now everything must be documented simply to understand the overall purpose of the files.  And when you begin to search for a particular link, it can develop into a muddled heap.  Usually is the first accessed thread unfortunately the wrong thread, and you need infinite time to find the sense inside the chaos.

Therefore it would be good, if you had a tool which would decrease the work to clear up who, whom, from where and how often a function is called.  All comments, which begin with the character '*', are also transferred to the HTML reference file as function descriptions.  And this operation does exactly that.  And thus it would be particularly good, if the function calls could be supplied with links.  Therefore one can comprehend the calls by link.  In addition, you can use the created HTML file very well as a basis for software documentation (HTML can be also imported into Word).

So far so good.  However there are limitations past which machine logic cannot create documentation.  Indirect calls using pointers cannot be resolved.  Similarly, it is not possible to document information flows around messages.  In these cases, one must still search through the code.
This gives a default template which is used to create the project.

Alphabetical function list:
lists all functions found from the beginning.

Repeated calls list:
Normally, a function which is called more that once is only 
documented once.  When this option is selected, all further
calls are also documented, in grey text.

Display Line numbers in the HTML file
After the file name in which the function is defined is listed 
the line number at which the function is located. 

Indenting comments in functions after parentheses levels
If comments in functions are to be directly transferred, 
they often are at specific parentheses levels. 
With some exercise and discipline, one can write these 
comments in such a way that the explanation almost
reads like text its self.  This text can now be structured 
as if the text itself belongs to the bracket to be indented.


How a template for a HTML Project must appear

This Example almost corresponds to the default template.
It is important that after each heading a horizontal line is inserted.
Tables cannot be used.
The following variables can be replaced :
$f the function name
$s the name of the source files
$h the name of the header file in which the function is declared
$r functions which call this function.  When the calling function is found, a link is inserted here.
$c functions which are called through this function.  When the called function is found, a link is inserted here.
$p the function prototype of the function
$dx Comments that should be transferred to the HTML file :
"x" stands for an character after which the comment should begin (no blank spaces).  There it is possible to separate different information from the comments in the HTML description.
Example: $d# transfers all comments that begin with #

/*# these comments would be transferred 
and also this row until */

//#also is transferred into the HTML file

Once the file is created, it naturally can be further edited (for example by inserting program structure charts and verbal descriptions). However, these modifications are overwritten again upon a new creation.

In the header file of the created HTML file (and also before the first function description), the information extracted from the comments in each file is collected.  For example, this could be the version number etc.  Since there is no necessary or usual way of writing this information, I have attempted to arrange it as universally as possible.

What to do :

It is assumed that one has a file heading such as that below in each file :

// FILE NAME: isdnPort.h
// VERSION: 3.2.00
// FUNCTION: main function for anything
// Copyright © 1999 */
// AUTHOR/S: Jens Altmann (TCD) */
// CREATION DATE: 02.11.99

Here you can transfer the Author, Version, and Creation Date information from the heading of each file to be included to the created HTML file.

One would also search in the source files for the type of information to be transfered.
Thus :
Author   AUTHOR/S:
Creation Date   DATE:
Version   VERSION:

This flag may contain no separators (blank spaces, tabs, line feeds)!
For the file name and work area there are pre-defined flags :
File    $f
Work area   $prj

In addition, it is of utmost importance that the area which contains this information is marked at the beginning and end by the comments <!--prjinfo-->.  This piece of HTML code is then copied for each file and filled with the appropriate information.  The flags which are filled in through the source files begin with an $.
Thus  :

One saves and creates the HTML file.  JFE first looks for the comment area.  When this exists, all words marked with $ are searched for.  When such a word is found, all files are searched through for this word (without $).
When the word is found in a file inside a comment, the text immediately following (up to the end of the line) is entered into the template in place of the flag.

This sounds very confusing.  For clarification, it is best to look at the Example template and its source code.


Work Areas (Projects)

Work areas are a convenient mechanism when you work with multiple files and do not want to individually open each file upon start-up.
In a work area, the following important settings are saved :

JFE also stores a list of the last opened files in the work area.  A work area is automatically saved on exit.  At this point in time, all opened files are transferred into the work area and they are restored when the work area is next opened.
The name of a work area (Project) is a Macro which can be altered using the variable $PRJ.
One can also create a Link in Explore, so that projects can be directly opened by double clicking in Explore.


The Context Menu  (right click on mouse)



Macros can make life easier!  JFE allows a programmer to load up to 20 macros from an external file.
This file must be called "macro.text" and exist in the same directory as "jfe.exe"
Macros are accessible through the context menu.
A macro can be any piece of text and also contain replaceable variables.
The format required to define a macro is as follows (for example) :

$macro Switch
switch( )
A macro always begins with the statement $macro and ends with $endmacro. Therefore macros can be separated within a file.  In between these two statements is the macro text.  The word following $macro (in the same line) is the name of the macro which will be displayed in the context menu.
Here are the predefined variables which can be filled in when a macro is run :
$dd The current date in german format
$de The current date in american format mm/dd/yy
$FILE The file name (without path) of the current document
$USER The user name logged into Windows
$PATH The complete pathname of the current document
$we The abbreviated day of the week in German
$wd The abbreviated day of the week in English
$PRJ The name of the work area (project).  When no work area is available, this variable is not replaced
$t The current time in format hh:mm. 
These variable names can be used in text macros, and at the time of insertion will be replaced by their values.

A speciality of JFE is updatable macros.  What are these then?
Normally, variables are replaced when the macro is run and thereafter the text is set.
However, it is sometimes desirable that a macro is updated when saving a file.
For example, it may be desirable to document the last alteration to a file.
A macro, once run, cannot detect such an effect.
Therefore, one must create this feature artificially.  For example :

            $macro $LAST MODIFICATION
            : $dd /$t $USER

The macro name begins with a '$'  When saving, all macro names which begin with $ are searched through and the text is extended with the replacement macro text.
In this example, the string "LAST MODIFICATION" would be replaced with (for example)
LAST MODIFICATION: 05.05.99 /20:23 altj.  This would occur on each save.

The behaviour of variables when expanding differs.  The variables which have unforeseeable lengths when expanding will overwrite the following blanks (only the blanks!).  The variables which have a fixed length (time, date ...) are replaced and the text which follows is moved to the rear.


Function Keys

I hardly ever use Hotkeys myself, but occasionally one is required.  Since everyone prefers differing key assignments, it is now possible to set the key assignment yourself (Menu - Settings - Keyboard Mapping).  The following Hotkeys are predefined :

CTRL-C   Copy
CTRL-X   Cut
CTRL-V   Paste
CTRL-Z   Undo
CTRL-I   Indent the selected area one column to the right
CTRL-U   Indent the selected area one column to the left
CTRL-B   Indent the selected block one column to the right
CTRL-M   Indent the selected block one column to the left
CTRL-F   open the search dialog
CTRL-R    open the search/replace dialog
F3   Continue searching 
CTRL-G   go to the line
CTRL-Y   delete line
CTRL-F9   begin tool
F12   set/delete bookmark
CTRL-P   Print
CTRL-N   new document
CTRL-S   save
CTRL-O   open
F11   save and terminate without question 
CTRL+F11   terminate without asking if saved
F6   next document

Printer Settings

JFE has naturally also developed printing functionalities.  In comparison to other editors, coloured printout can also be produced, with the pre requisite that syntax highlighting is switched on.  The layout of the page can also be controlled.
A selected font can also used for the printout.
A special settings dialog box is used to set individual desires relating to printing.

Every page can contain a banner. 
This banner can be at the top of or at the bottom of the page. 
The banner can contain :

  • the file name
  • the current date
  • the page number
It is also possible to print the line numbers of the document.  To save room on the page, the option "Print lines close together" can be selected to allow the minimum possible space between lines.  It is also possible to print on a range of lines.  If this is the case however, "All" must be selected in the standard print options box.

A font independent of the screen font can be used for printing.