Progress
Application Development
Environment — Getting Started
Advanced Editing Features For Progress Editors
If your Progress installation runs under a development license, you have access to the following advanced editing features:
- Color coding — Also called color syntax-highlighting, color coding is a powerful feature in which a Progress editor displays various types of 4GL syntax elements in a Progress source file such as keywords, comments, and character strings in distinct colors.
For example, all keywords might appear in blue. Color coding makes it easy to understand the syntax and structure of a 4GL program. You can customize the color coding used for language elements and/or change their style, for example, to apply a bold or italic typeface.
Progress automatically supports color coding for the Progress 4GL and for many other programming and scripting languages, including HTML, C/C++, Perl, and Java.
- Embedded color coding — Embedded color coding recognizes multiple languages in the same file and can display them with their own color-coding schemes. Using embedded color coding simplifies editing source files that contain code in multiple languages: the editor displays each language’s code using a distinct color-coding scheme and all other language-specific features.
By default, the editors recognize only embedded SpeedScript, JavaScript, VBScript, and/or Java in HTML files.
- Syntax expansion — Syntax expansion in Progress editors occurs when you type a 4GL keyword, statement, or block structure and then press the SPACEBAR. The editor expands the syntax of the keyword or other language element by inserting a template specific to it.
- Alias expansion — Alias expansion allows you to define shortcuts that extend or modify syntax expansion in Progress editors. You can use the aliases to insert more complete code and syntax templates when you type the shortcut and press the SPACEBAR.
For example, when you type in DISP, then press the SPACEBAR, the editor by default does not expand this syntax. However, you can use alias expansion to define a code template to insert more of the statement’s syntax. Then when you type DISPLAY and press the SPACEBAR, the editor expands to the template you defined.
Progress provides a number of default aliases. These aliases are in the file
p4gl.als
located in your working editor configuration directory. By default, this is the PROEDIT directory in your Progress working directory. Whenever you use the Alias Editor dialog box to modify or add aliases for Progress source files, the editor saves the changes to thep4gl.als
file.- Syntax indenting — Syntax indenting in Progress editors occurs when you press the ENTER key at the end of a block statement. The editor inserts a new line and indents the cursor relative to the block statement.
For example, if you create a Progress source file with the cursor positioned at the end of a line that contains the DO keyword, and you press the ENTER key, the editor inserts a new line and indents the cursor relative to the DO keyword.
- SmartPaste — The SmartPaste feature allows you to paste lines of text into a Progress source file and indent them relative to the surrounding code. This feature saves coding time by making it unnecessary to indent pasted code manually. It is especially useful when you copy and paste code among several Progress source files.
For example, if you select several lines of code in a Progress source file, copy them to the clipboard using CTRL-C, then paste them inside a FOR block using CTRL-V, the Progress editors use SmartPaste to indent the pasted lines correctly relative to the indentation level of the FOR loop.
For more information about the advanced editing features, see the Progress AppBuilder Developer’s Guide and the Procedure Window and Common Dialog help system.
Now that you are familiar with the ADE Desktop and the AppBuilder main window, you are ready to learn more about developing applications using the Progress tools and SmartObject technology. To help you learn, this guide introduces the SportsPro sample application, which was designed to highlight these features.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |