File EditorsThe File Editors present your actual source code, providing a variety of features to help you efficiently read, navigate and edit your software.
Program understanding is enhanced by the use of colors in presenting the source code. Comments are distinguished from the actual code itself. Symbols -- their use as well as their definition -- are coded, using colors consistent with the rest of the tool's displays.
Hypertext-like source code navigation is supported. Double-clicking on a colored symbol causes a new File Editor to be opened to the file and line number where that symbol is defined. This navigation is also possible from any of the other Imagix 4D displays. From the Graph windows, the Flow Charts, the Metrics reports and other report windows, you can see the source code being represented by just double-clicking.
Another form of navigation is achieved with the Next Reference and Prev Reference icons. Located on the icon bar, these buttons enable you to cycle through all of the locations where a symbol is defined, declared, called, read, written, or used as a type.
Source code lines identified by some of Imagix 4D's reports can be flagged in the File Editors. Underlining is used to indicate a warning related to the file-based Source Checks. These source checks represent exceptions to generally agreed upon design and coding practices. You can control which types of source checks are displayed. Holding down MOUSE [Shift-Control-Left] to over the underlined text will pop-up the Information overlay, displaying information about what source check is being flagged.
Source code for functions reported by certain of the Flow Checks can also be flagged, via coloring in columns to the left of the source code. In particular, when you're using the File Editor to review your source code in order to examine the issues reported by the various Task Flow Checks, you may find it very useful to identify source code for functions not used in tasks.
You can use the File Editors for modifying as well as viewing your code. Imagix 4D will track changes in line numbers; however, changes you make can cause the Imagix 4D database to become unsynchronized with your source code. You can periodically resynchronize the database to your source code with the Update Project Data and Regenerate Project Data functions.
Synchronizing with Source CodeFor each symbol in its database, Imagix 4D stores information about where the symbol is located in your source code. This consists of the path, file, and line number of where that symbol is defined or used.
This information is captured from the source code when you import data. It therefore reflects the location of the symbol at the time the source code was last analyzed. If you find that the files are opening at the wrong line numbers or that the Imagix 4D editors are not color-coding the symbols, you've modified your files since updating the database. You may want to resynchronize the database to your source code with the Update Project Data or Regenerate Project Data functions.
Using Your Own EditorBy default, Imagix 4D uses the File Editor to display your source code. However, if you are going to do extensive editing, you may want to use your own editor rather than the File Editor. You can change this selection in the Options dialog (File > Options > File Editor > Alternative Editors). Under Unix, if you have specified an editor with your EDITOR environment variable, it will also be selectable via the Environment Editor choice.
Imagix 4D uses the command entered in the Other field, and invokes `command filename', where filename is the file containing the symbol you're trying to browse to. The process of invoking your editor is customizable through the file ../imagix/user/user_ed.tcl, and can include the line number of the symbol.