------------------------------------------------------------ ECO 1.2 - EPM menu for Java/C/IPF editing and compiling ------------------------------------------------------------ Read this carefully, even when using a previous version already! In case you are using ECO with the "Editor for Java", then, please, check the settings of the related program object; the installation instructions distributed with the previous ECO versions had a minor error as to this subject. Many apologies for this mistake! Contents -------- What is ECO ? Installing ECO Using ECO Using ECO with jikes Syntax Highlighting ECO - the Pro(fessional) version History Credits Support What is ECO ? ------------- Using ECO, you can run a compiler or the "make" utility from an EPM menu, view the transcript of the compilation process within the editor, and link compiler error messages to the corresponding lines of the source file. The latter facility requires the EPM to understand the format of the error messages; currently the Java compilers javac and jikes, GNU C, VisualAge C and ipfc are supported. A menu item is provided for controlling the syntax highlighting of Java, C, HTML, IPF and "make" files. ECO requires EPM version 6.03b which comes with Warp 4 (not with Warp 3) or can be downloaded freely from various sites. ECO has been tested with the following compilers: * javac from JDK 1.1.7 * jikes v0.57 * gcc 2.8.1 * VAC++ V3.0 * ipfc 4.00. Installing ECO -------------- 1) Copy the file eco.ex to the directory where your EPM resides, usually \OS2\APPS on the boot drive. 2a) Add the following line (including the quotes) to your EPM Rexx profile, i.e. the file PROFILE.ERX: 'link eco' What is ECO ? Make sure that "REXX profile" is enabled in the EPM settings! In this case the eco module will _always_ be linked when the EPM starts up. alternatively: 2b) Open the settings notebook of the program object "Editor for Java" and enter the following line (incl. the quotes) into the "parameter" entry field: /m 'link eco' Then the eco module will only be linked when the EPM is run via this program object. (The program object "Editor for Java" is part of the JDK.) 3) (Re)start the editor. There should be an additional submenu named "Compile" then. 4) The source code files eco.e and ecostuff.add are NOT required to use the eco module. You may, however, recompile the EPM editor with the ECO module included permanently, see the section "ECO - the Pro(fessional) version" near the end of this document! Using ECO --------- 1) Edit your Java, C, C++, or ipf program source. 2) Select the menu item "Compile/Compile". 3) The command which is displayed here will be executed in the directory of the current file, when you click on "Run". The default is to run the current file through the Java compiler "javac"; edit this according to your needs. Any occurrence of %**F will expand to the current filename including the extension; %**N will expand to the filename without extension. Instead of invoking a compiler you may also run the "make" utility (or execute any other program). The command is memorized, so you need not enter it again when repeating compilation; it is saved when you leave the editor. 4) Click on "Run"; the EPM will switch to a shell window, where the command is executed. The current file is saved automagically before this step is performed, as well as all other files recognized as Java, C, or IPF. The following file types are honored: JAV JAVA C H SQC CPP HPP CXX HXX SQX IPF. (Please, note that the current file is _always_ saved, regardless of its type.) 5) Select the menu item "Compile/Locate next error". The EPM will search for the first error message, switch to the corresponding line of the source code and show the error message in its message line. ECO understands the format of the error messages generated by javac, jikes, gcc and VisualAge C as well as the format of the IPF compiler ipfc 4.00. In case the exact column of the error is indicated in the transcript, the erroneous token will be marked by a red circle. 6) Select "Locate next error" again (without returning to the transcript): The cursor will jump to the location of the next error in the source code. 7) Select the menu item "Compile/View transcript" while editing the source code or any other file: The EPM will switch to the shell window and move the cursor (if possible) to the latest error found before. 8) Select "Locate next error" while editing the transcript: In this case the search for the next error starts in the current line of this file. 9) Select the menu item "Compile/View transcript" while editing the transcript: The cursor will jump to the first line of the latest compilation protocol, and the error searching facility is reset to that line. Using ECO with jikes -------------------- The jikes compiler must be called with the option +E, so as to generate suitable error messages for use with ECO. ECO is known to work with jikes v0.57; earlier versions are _not_ supported, due to a different format of the error messages. Syntax Highlighting ------------------- Select the menu item "Compile/Highlighting" to toggle syntax highlighting of Java, C, IPF, HTML and "make" files". This affects the current file only. The setting is not saved when you quit the editor! Syntax highlighting is controlled by the keyword files EPMKWDS.*, which are part of the OS/2 EPM package. The colors defined in these files suit the default color scheme of the editor. ECO - the Pro(fessional) version -------------------------------- In case you have got the EPM source code and IBM's ETPM compiler, you can recompile the EPM so as to include the ECO module permanently: Put the source file eco.e in a directory where the ETPM can find it, and append the contents of the file ecostuff.add to an existing mystuff.e file (or rename ecostuff.add to mystuff.e, if the latter does not yet exist.) Then compile the EPM, and -- voila -- there's the Compile menu! Do NOT link the ready-made module eco.ex additionally then! With the Pro version, the ECO menu and the particular items are enabled with suitable file types only. History ------- 1999-06-28: v1.2 * Support for VisualAge C and jikes added. * Highlighting of "make" files added. * Menu shortcuts. * Optional "Pro" version. * Small changes to the documentation. 1999-01-13: v1.1 * sensible error message when "Highlighting" is requested for a file type other than Java, HTML, C or IPF 1998-10-17: v1.0 * Support for ipfc and syntax highlighting added. * The column of an error is marked by a red circle. * Better documentation. 1998-04-14: v0.9 * The first public version. Credits ------- Special thanks to Dr. J.Hoffmann (Rechenzentrum der RWTH Aachen, Abteilung Numerik), who provided the suppport for Visual Age C++ and jikes, helped me with testing, and contributed many good ideas. Support ------- In case you encounter any problems with ECO, or if you have any suggestions for improving it, then write an e-mail message to the author: Walter Schmidt Please, obtain my address from the latest version of this document! The latest version of this software can usually be obtained from the "Hobbes" software archive. Finally ... ----------- ... I would like to apologize for any mistakes in this document. English is not my native language. Suggestions for improving this document and the messages displayed by the program are welcome. -- finis