ProgramEdit

Language Settings Help

PgmEdit - Language Settings

PgmEdit home

The Language Settings tool lists the Programming languages supported by ProgramEdit, and their associated parameters needed by the editor to color keywords, strings and comments.

Selecting a language in the Languages list displays the primary Keywords file, the File Extension(s), the Block and/or End-of-Line Comment characters, and the Case-sensitivity of the language.

The Language Settings dialog also allows adding new languages, and replacing one or more of the Built-in languages with a new language.

Note: Language Settings are Global - that is they are identical for all Sessions.

1.  Built-in Languages - Read Only

"Built-in" languages are installed with ProgramEdit and cannot be deleted.
In addition, all of their Language Settings parameters are Read Only.  That is, none of the Language Settings text boxes can be edited, and the Case sensitive setting cannot be changed.

However Keywords files, which are shared with both Built-in and "added" languages, may be added or edited as explained in Section 2 below.

2.  KeyWord Files

A KeyWords file is a list of the key (reserved) words that will be colored in a PgmEdit session.
For example, KeyWords.c lists the C Language keywords for source-code files having the ".c" file extension.

All KeyWords files must be located in the ProgramEditor\bin\KeyWords directory.  These files can be opened and edited in PgmEdit using the "File/Open KeyWords folder" menu item.

The Built-in C Language is specified with (6) File Extensions (.c .cc .cpp .c++ .h .hpp).  If there is only a KeyWords.c file, all six C Language file-extensions will use the KeyWords.c list of words.
However, for example, a separate KeyWords.h could be created so that .h files would have their own list of keywords.

File Extensions Tip - As with the C Language ".c" extension above (which is first in the File Extensions list), the Language file-extension with the best default (or only) KeyWords file MUST BE THE FIRST in the File Extensions list.

3.  Add a Language - New or Copy

A language can be added to PgmEdit as follows:

1. Click on "New", or select a language and click on "Copy"

2. Edit the language-parameter fields.  At least one File Extension must be specified.

3. Click on "Save"

Note: All File Extensions of added-languages must be unique.  However they can be the same as the File Extensions of the Built-in languages.

For example, if both an added-language and a Built-in language have file extension ".cpp", the added language will be used for *.cpp files (and the Built-in language will not).

4.  Replace a Built-in Language

As illustrated in the Section 3 example above, an added-language can replace all or part of a Built-in language.

To Replace a Built-in Language:

1. Select a Built-in language and click on "Copy" to create a template for the new language.

2. Edit the language parameter fields.  At least one File Extension must be the same as the Built-in language to "replace" part or all of the Built-in language.

3. Click on "Save"

Note: If the new language has all the File Extensions of the copied Built-in language, the Built-in language will be totally replaced.  Otherwise only the File Extensions that are common will be replaced.

5.  Delete a Language

To delete a non-Built-in language:

1. Select the language and click on "Delete"

Note (C:Drive Install only):  Deleted Languages are sent to the Recycle Bin and can be restored.  Recycle-Bin restored Languages will be visible after a Language Save/Delete or after PgmEdit is restarted.