Help reading this manual
Before we proceed with the facilities of the environment, let's take a look at the way EiffelStudio organizes project files.
With EiffelStudio, you build projects. Most projects yield an executable system, although you can also build a project just to define a library for use by such systems.
Every session is relative to a project; you can start a new project from within EiffelStudio by going to the File --> New Project menu, but please don't select that menu entry now as we have many more things to do with our current project first.
Every project has a project directory which will contain the files generated and managed by EiffelStudio. The project directory may also host some of the source files containing your Eiffel classes, the Ace (control file), and external software written in other languages, but that is not required; the source files may reside anywhere. Some users, in fact, like to put nothing else than the EiffelStudio-generated files in the project directory; this separates user-managed and system-managed files, and can facilitate configuration management, backups and porting.
In this simple Tour, things have been set up so that all the files of interest, source texts as well as generated ones, will appear in the project directory YOURDIR (either $ISE_EIFFEL\examples\bench\tour or the copy that you have made). Go to that project directory using the Windows explorer or a cd command, and look at its contents (using ls on Unix/Linux):
The contents of this YOURDIR directory include the following:
First you see a number of files with the extension . e , for "Eiffel": heir.e , invalid.e and others. These are the Eiffel source files, each containing one class. The recommended convention is to store a class of name CLASS_NAME into a file of name class_name .e , where class_name is the lower-case version of CLASS_NAME ; here, file heir.e contains the class HEIR and so on. As you may remember, Eiffel is case-insensitive, but the standard convention for class names is to write them in all upper case. Calling the file class_name .e is only a recommendation, not an obligation; but you are required to store one class per file. This keeps things simple and facilitates project and configuration management.
You also notice two files with an ace extension. These are the compilation control files. The reason there are two is that this example has a Windows version and a Unix/Linux version. As you remember, the Ace files for this example were available as part of the delivery; we used them to compile the project. In most practical cases, however, you won't need to build an Ace; if you use the " Create a new project " option of EiffelStudio (remember the first screen on page 10 ), EiffelStudio will build the Ace for you; if you change the Preferences during a session, EiffelStudio will update the Ace. When you become an experienced Eiffel developer you can also edit the Ace file directly; Aces are written in a simple Eiffel-like notation called Lace (Language for Assembling Classes in Eiffel). If you like you can take a peek at Lace by opening the relevant .ace file with a text viewer or editor now (but don't make any change); it shouldn't be hard to understand what it's all about. But that's not really necessary at this stage.
Next you see a file called simple.epr . This is the Eiffel Project Repository, hence the extension. Any successful compilation of a project will produce a project of this kind, system_name .epr . To open an existing project when you start EiffelStudio (this was the option " Open compiled project " in the initial screen on page 10 ), you will just select the corresponding .epr file.
Finally you will notice a subdirectory called EIFGEN , for " EIF fel GEN eration". EIFGEN is created and maintained by the compiler to store information about your project, including generated code for execution. EiffelStudio manages your project in such a way that EIFGEN can always be re-generated if need be; this means in particular that if things go wrong for any reason and you want to make a fresh start you can always delete this directory and the .epr file and recompile your system, recreating a new EIFGEN in the process. This also means that you should not add any files into this directory, or modify any of its files, since a later compilation is free to change or regenerate whatever it chooses in EIFGEN .
Later on, we will see that EiffelStudio may generate three more subdirectories of the project directory: Diagrams , if you produce graphical system diagrams; Documentation , if you request system documentation, for example HTML; and Metrics , if you perform measurements on your system. Other than these directories, EIFGEN , and system_name .epr , EiffelStudio will not touch anything in the project directory, so you may safely add and change whatever files and subdirectories you like.
You seldom need to look into EIFGEN , although you should know that it's there. Right now if you check the contents of the project directory YOURDIR (using the Windows Explorer on Windows, the ls command on Unix, or some equivalent mechanism), you will see that EIFGEN has been created, itself with some subdirectories, including W_Code which contains the generated code ( W for "Workbench" -- we'll see the reason later). Feel free to browse through it if you like, but don't change anything.
By the way, we are now done with any platform-specific instructions. Everything in the rest of this Tour, other than the graphical look-and-feel, will work the same across all EiffelStudio platforms.
Copyright Interactive Software Engineering, 2001