Replaceable User Files

Revision as of 09:27, 31 July 2008 by Paulb (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Construction.png Not Ready for Review: This Page is Under Development!

With the release of EiffelStudio 6.2 came the notion of user files, or user replaceable files. These are configuration files and the like the end-user (that's you) can author to override a matching file found in the stock EiffelStudio installation.

Working with User Files

User Directories

In some cases, user files can be found in a user folder and will not be used to replace stock installation files but to augment a stock collection of files with a user set. This functionality can be found when working with code templates. Templates work a little differently because the folder under the installation does not have to be mirrored in the user files folder. Instead under the user folder there is a separate templates folder used to contain any and all code templates for tools like the contract tool and the editor.

Limitations

Not all files are currently supported with user files, just a select number of configuration files and template files. For all new developments, user files should be supported if applicable.

For now there is no support for those version of EiffelStudio built using the Unix Layout. Unix layouts distribute files across the system and prevent a clean and reliable means to replicate an EiffelStudio installation, required to detect and utilize user files/

Working with User Files

Most of the well know directories and files for the Eiffel compiler are located in a common class call EIFFEL_ENV, which is part of the environment library found in the EiffelStudio framework folder at $EIFFEL_SRC/framework/environment. There are effective implementations of EIFFEL_ENV; EC_EIFFEL_LAYOUT and ES_EIFFEL_LAYOUT used respectively in the Eiffel compiler and EiffelStudio.

Information.png Note: These classes need a little refactoring because most of the accessor functions live in EIFFEL_ENV instead of the more appropriate effective implementation class. It's just something to be aware of for future changes.

Most classes can access a single per-process instance of EIFFEL_ENV through inheriting EIFFEL_LAYOUT and accessing eiffel_layout or using it as a client. A single instance is used because (a) there are parts of the Eiffel system that have no idea if they are running inside EiffelStudio or as a TTY compiler (b) there are performance overheads of initializing EIFFEL_ENV so it's desirable to create and initialize the object once and once only.