<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fokou</id>
		<title>EiffelStudio: an EiffelSoftware project - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://dev.eiffel.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fokou"/>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/Special:Contributions/Fokou"/>
		<updated>2026-05-07T07:10:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=Snippet_Generator&amp;diff=6374</id>
		<title>Snippet Generator</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=Snippet_Generator&amp;diff=6374"/>
				<updated>2006-11-24T13:52:34Z</updated>
		
		<summary type="html">&lt;p&gt;Fokou: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tools]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
The Snippet Generator tool, or snipgen, is used to generate Visual Studio 2005 snippet declarations. Primarily developed for EiffelEnvision's editor it can also be used in conjunction with any other language, unlike the Mirosoft tools.&lt;br /&gt;
&lt;br /&gt;
== What are Snippets? ==&lt;br /&gt;
Snippet are tokenized pieces of code that can be inserted into the editor using either the menu, bound shortcut keys or a snippet shortcut name. In EiffelEnvision a snippet for a class can be insert by typing 'class' followed by pressing TAB. In addition, the EiffelEnvision editor support construct completion (similar to EiffelStudio when pressing ENTER or SPACE after typing do/if/check etc.) but is based on snippets, so they can be changed to suit a user preference using the snipgen tool.&lt;br /&gt;
&lt;br /&gt;
To be continued...&lt;/div&gt;</summary>
		<author><name>Fokou</name></author>	</entry>

	<entry>
		<id>https://dev.eiffel.com/index.php?title=EiffelBuild_Integration&amp;diff=2194</id>
		<title>EiffelBuild Integration</title>
		<link rel="alternate" type="text/html" href="https://dev.eiffel.com/index.php?title=EiffelBuild_Integration&amp;diff=2194"/>
				<updated>2006-04-25T15:35:44Z</updated>
		
		<summary type="html">&lt;p&gt;Fokou: /* GB_SHARED_INTERNAL_COMPONENTS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:EiffelBuild]]&lt;br /&gt;
[[Category:Projects]]&lt;br /&gt;
&lt;br /&gt;
This page describes informations on EiffelBuild internals and future plans regarding it's decomposition into disparate components so it may be placed into other tools such as EiffelStudio and EiffelEnvision.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
This Wiki document describes the internals of EiffelBuild and the recent work undergone to permit EiffelBuild to support multiple instances within the same application. This entailed removal of project-specific onces as well as providing a new interface permitting EiffelBuild to be used as a component client, supporting multiple instances where each instance runs as though it were a running in separate process. This work was required to be undertaken for the integration of EiffelBuild into EiffelStudio and another tools, such as EiffelEnvision.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:eiffel_build.main_window.png]]&lt;br /&gt;
&lt;br /&gt;
== Author Notes ==&lt;br /&gt;
Although, from initial inspection through writing this document, the current state of EiffelBuild's component interface is not as polished as it could be - it does work. It is my recommendation that some refactoring be done prior to it's integration with EiffelStudio. Where appropriate I have suggested refactored solutions that require implementation. Given time restrains in being instructed on the internal workings for the compilation of this document, I have not had time to evaluate if the refactoring suggested are entirely possible. They are merely surface level suggestions of a brief overview of the internal workings of EiffelBuild.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
Through out this document there are a number of repeated references to make to being a &amp;quot;client of EiffelBuild&amp;quot; and &amp;quot;an EiffelBuild instance&amp;quot;. A client of EiffelBuild refers to the application integrating the use of EiffelBuild using the EiffelBuild components and component classes, such as example would be EiffelStudio or EiffelEnvision. An EiffelBuild instance refers to a single instance of EiffelBuild within the client application. EiffelBuild has been adapted to support multiple disparate instances.&lt;br /&gt;
&lt;br /&gt;
== Conventions ==&lt;br /&gt;
This document uses a number of conventions for clarity:&lt;br /&gt;
&lt;br /&gt;
* '''Element Name''' refers to visual user interface elements of EiffelBuild&lt;br /&gt;
* &amp;lt;font color=blue&amp;gt;CLASS&amp;lt;/font&amp;gt; refers to an Eiffel class.&lt;br /&gt;
* `''&amp;lt;font color=darkgreen&amp;gt;feature&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; refers to an Eiffel feature of a class.&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''file_name''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; refers to a file name or file path.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Initializing EiffelBuild ==&lt;br /&gt;
&lt;br /&gt;
Initialization refers to the steps required to be taken to make use of EiffelBuild's core components, acting as a client of EiffelBuild. A good example of using the EiffelBuild components, as a client, is the EiffelBuild stand-alone application.&lt;br /&gt;
&lt;br /&gt;
EiffelBuild is located in &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''Src/build2''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; in the code repository. It's root class, containing the code to initialize and use the EiffelBuild components is in `&amp;lt;font color=blue&amp;gt;GB&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; from &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''Src/build2/main/gb.e''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
There are two classes you will make use of during initialization. &amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;, unlike their name may suggest &amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; is not directly related to &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;. &amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; contains shared implementation that has no instance specific implementation. &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; on the other hand has one instance per each instance of EiffelBuild instantiated in a client application.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
Here is a example code snippet on how to initialize a single instance of EiffelBuild.&lt;br /&gt;
&lt;br /&gt;
  class MY_BUILD_APPLICATION&lt;br /&gt;
  &lt;br /&gt;
  inherit&lt;br /&gt;
    EV_APPLICATION&lt;br /&gt;
    	export&lt;br /&gt;
    		{NONE} all&lt;br /&gt;
    	end&lt;br /&gt;
    &lt;br /&gt;
    GB_SHARED_INTERNAL_COMPONENTS&lt;br /&gt;
    	export&lt;br /&gt;
    		{NONE} all&lt;br /&gt;
        undefine&lt;br /&gt;
            default_create, copy&lt;br /&gt;
        end&lt;br /&gt;
  &lt;br /&gt;
  feature {NONE} -- Initialization&lt;br /&gt;
         &lt;br /&gt;
    execute is&lt;br /&gt;
        -- Create new EiffelBuild instance for use within the application.&lt;br /&gt;
      local&lt;br /&gt;
        l_components: GB_INTERNAL_COMPONENTS&lt;br /&gt;
      do&lt;br /&gt;
        default_create&lt;br /&gt;
        &lt;br /&gt;
          -- Initialize EiffelBuild at the application level&lt;br /&gt;
        initialize_eiffel_build&lt;br /&gt;
        &lt;br /&gt;
          -- Create a new component instance.&lt;br /&gt;
          -- Note: For every instance of EiffelBuild you want to run in your application you&lt;br /&gt;
          -- must create a new component for each.&lt;br /&gt;
        l_components := new_build_components&lt;br /&gt;
        &lt;br /&gt;
          -- Finally you need to set to the top-level window for the component instance.&lt;br /&gt;
        l_components.tools.set_main_window (create {MY_SHELL_WINDOW})&lt;br /&gt;
      end&lt;br /&gt;
      &lt;br /&gt;
  end -- class MY_BUILD_APPLICATION&lt;br /&gt;
&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;initialize_eiffel_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is used to initialize EiffelBuild on an application level. Calling `''&amp;lt;font color=darkgreen&amp;gt;initialize_eiffel_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; only needs to happen once per application. `''&amp;lt;font color=darkgreen&amp;gt;initialize_eiffel_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; contains/calls all of the application specific initialization, such as preference initialization. &lt;br /&gt;
&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;new_build_components&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; should be called to retrieve a new &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; instance. An instance is per-instance of EiffelBuild. This means multiple instances can hold different EiffelBuild projects without interfering with each other. The &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; instance will provides clients with access to EiffelBuild instance-scoped tools and services, as the '''Layout Constructor''', clipboard, status bar etc.&lt;br /&gt;
&lt;br /&gt;
After each new &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; has been created the respective top-level application window must be set to it to ensure that any spawned dialogs shown are shown relative to the top-level window.&lt;br /&gt;
&lt;br /&gt;
=== Refactoring ===&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;new_build_components&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; should be passed a top-level window instance so when a new &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; is created it will have the top level window already set.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; should be renamed to &amp;lt;font color=blue&amp;gt;GB_SHARED_APPLICATION&amp;lt;/font&amp;gt; or something more meaningful.&lt;br /&gt;
&lt;br /&gt;
== Core EiffelBuild Classes ==&lt;br /&gt;
&lt;br /&gt;
There are a number of fundamental classes in EiffelBuild that require fuller explanation. &amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; have already been discussed in brevity. These classes are essential to instantiation and initialization of EiffelBuild instance(s).&lt;br /&gt;
&lt;br /&gt;
=== GB_SHARED_INTERNAL_COMPONENTS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; is only important to clients of EiffelBuild. It is used to initialize EiffelBuild on an application-level and provides a factory method - `''&amp;lt;font color=darkgreen&amp;gt;new_build_component&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; - for creating a EiffelBuild instanced-scoped instance of &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;initialize_eiffel_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, as already stated, is to initialize EiffelBuild per-application. `''&amp;lt;font color=darkgreen&amp;gt;initialize_eiffel_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; currently has no protection so it is possible to initialize it more that once, however it should be called once and only once per application.&lt;br /&gt;
&lt;br /&gt;
=== GB_INTERNAL_COMPONENTS ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; is use as a per-instance-of-EiffelBuild object. The instance should be created through `&amp;lt;font color=blue&amp;gt;GB_SHARED_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;new_build_components&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; function is only to provide a single access point for EiffelBuild instance-scoped related objects needed to integrate EiffelBuild into an application. It provides direct access to EiffelBuild instance-scoped objects via attributes. Every main visual component of the original EiffelBuild (or the stand-alone) is available via a qualified call to `''&amp;lt;font color=darkgreen&amp;gt;tools&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. For non-visual elements of EiffelBuild; such as the undo/redo history, commands, clipboard, system status, persistence objects, etc. are available from a respective attribute in &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Most of the exported attributes of &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; are discussed in this document so no details will be provided at this stage of the document.&lt;br /&gt;
&lt;br /&gt;
Almost all classes in EiffelBuild, that require access to an instance of &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; have, a `''&amp;lt;font color=darkgeen&amp;gt;components&amp;lt;/font&amp;gt;''&amp;lt;/nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; attribute. Use this attribute to access the EiffelBuild instance version of &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Refactoring ====&lt;br /&gt;
&lt;br /&gt;
There is a lot of repeated code in EiffelBuild where multiple classes define `''&amp;lt;font color=darkgeen&amp;gt;components&amp;lt;/font&amp;gt;''&amp;lt;/nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; themselves. This should be refactored into it's own class where contracts can also be laid down.&lt;br /&gt;
&lt;br /&gt;
=== GB_OBJECT* ===&lt;br /&gt;
&lt;br /&gt;
The items seen in both the '''Widget Selector''' and the '''Layout Constructor''' are all associated with a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance. More confusingly the '''Layout Constructor''' can display instances of &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;, which are instances of other &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instances. This will be explained later. &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; is common base representation of the EiffelVision2 widgets/components that can be manipulated within EiffelBuild to create a EiffelVision 2 user interface, via the exposed id-represented interface.&lt;br /&gt;
&lt;br /&gt;
Id's within EiffelBuild are important. Every user interface element has a unique, non-recycled, identifier that can be used with &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; (see next section.)&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; derived instance will have a unique identifier - `''&amp;lt;font color=darkgreen&amp;gt;id&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. This id will be unique throughout the project and will never change. Id's are not recycled whilst a project is loaded into an instance of EiffelBuild. There are good reasons for not recycling ids and these reason will be detailed later, in the next section. However during a load of a project the ids are compacted because it is safe to do so.&lt;br /&gt;
&lt;br /&gt;
Here is a code snippet from &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
 feature -- Access&lt;br /&gt;
 &lt;br /&gt;
 	id: INTEGER&lt;br /&gt;
 		-- A unique id representing `Current'.&lt;br /&gt;
 		-- This is stored in the XML.&lt;br /&gt;
 &lt;br /&gt;
 	is_top_level_object: BOOLEAN is&lt;br /&gt;
 			-- Is `Current' a top level object in the structure?&lt;br /&gt;
 			-- i.e. is it represented by an individual class?&lt;br /&gt;
 		do&lt;br /&gt;
 			Result := widget_selector_item /= Void&lt;br /&gt;
 		end&lt;br /&gt;
 &lt;br /&gt;
 	is_instance_of_top_level_object: BOOLEAN is&lt;br /&gt;
 			-- Does `Current' represent a top level object within the system.&lt;br /&gt;
 		do&lt;br /&gt;
 			Result := associated_top_level_object &amp;gt; 0&lt;br /&gt;
 		end&lt;br /&gt;
 &lt;br /&gt;
 	associated_top_level_object: INTEGER&lt;br /&gt;
 		-- The id of the top level object `Current' represents,&lt;br /&gt;
 		-- or `0' if NONE.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; requires some carefully explaining when talking about the next subject; Objects, top-level objects and instances of top-level objects. As &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; is used by both '''Layout Constructor''' items an Widget Selector items, &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; has a notion of an instance of itself. `''&amp;lt;font color=darkgreen&amp;gt;is_top_level_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is a query to determine if the &amp;quot;object&amp;quot; is a top-level &amp;quot;window&amp;quot;. Window is the legacy term used through out the EiffelBuild code to represent a top-level window or top-level widget in the '''Widget Selector'''. For top-level windows/widgets a single class is generated during code generation that represents the top=level window/widget. `''&amp;lt;font color=darkgreen&amp;gt;is_instance_of_top_level_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is the query to determine if an &amp;quot;object&amp;quot; in the '''Layout Constructor''' is actually an instance of a top-level &amp;quot;object&amp;quot; in the '''Widget Selector'''. When using EiffelBuild these are shown as locked widgets in the '''Layout Constructor''', when added. Finally, if `''&amp;lt;font color=darkgreen&amp;gt;is_instance_of_top_level_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is True, `''&amp;lt;font color=darkgreen&amp;gt;associated_top_level_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will be a non-zero referrer id to the top-level object. The `''id''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; of instances of top-level objects are different from the top-level object's instance `''&amp;lt;font color=darkgreen&amp;gt;id&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For items in the '''Layout Constructor''', that are not instances of top-level objects (buttons, menus, containers, ...), `''&amp;lt;font color=darkgreen&amp;gt;is_top_level_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; and `''&amp;lt;font color=darkgreen&amp;gt;is_instance_of_top_level_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will always be False, even though for a user interface perspective they appear to be instances of top-level objects (buttons, menus, lists, etc.) However a button, menu, list, etc. that are present in the '''Type Selector''' are not represented by a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; but by a &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; type name. Therefore the '''Layout Constructor''' objects that are primitive widgets and containers represent the respective items on the '''Layout Constructor''' and not a top-level object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; can be used to retrieve &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instances by id, and is discussed next.&lt;br /&gt;
&lt;br /&gt;
=== GB_OBJECT_HANDLER ===&lt;br /&gt;
&lt;br /&gt;
The object handler, &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt;, can be thought as a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; heap. An instance-scoped &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; knows about all &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instances currently in an instance of EiffelBuild, both current (or active in a project) and those that have been &amp;quot;deleted&amp;quot; through a delete action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; is actually scoped to an instance of EiffelBuild, it is not enough to simply inherit &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt;. To access the instance-scoped instance of &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt;, use `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;object_handler&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is important, within EiffelBuild, to retain all of the deleted &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s for the sake of history. There are times when changes are made that affect the internal state of any number of &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instances, and sometimes those changes need to be reflected in the deleted objects too, just incase the user wants to undo an action. Such a case is modifying a property on a top-level window/widget, which the deleted &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; is an instance of. Property changes are not undoable so it is foreseeable that a user could delete an instance of a top-level widget from the '''Layout Constructor''', switch to editing the top-level widget, make a modification to one of it's child widget's properties. After the modification, switching back to the previous layout structure and then undoing the delete action. If the changes were not made to the deleted &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; the visual representation in the '''Display Window''' would be out of sync with the changes made prior in the '''Layout Constructor'''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; has two hash tables, for active and deleted objects, indexed by a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;'s id; `&amp;lt;font color=darkgreen&amp;gt;objects&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; and `&amp;lt;font color=darkgreen&amp;gt;deleted_objects&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; respectively. However there exists a better means to retrieve an object by id using  `''&amp;lt;font color=darkgreen&amp;gt;object_from_id&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which will retrieve an active object (not deleted) by id. To retrieve an object irrespective if it is an active or deleted object use `''&amp;lt;font color=darkgreen&amp;gt;deep_object_from_id&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. `''&amp;lt;font color=darkgreen&amp;gt;deep_object_from_id&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will probably most commonly used with undo actions.&lt;br /&gt;
&lt;br /&gt;
Because &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; knows about *all* &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s instances in an instance of EiffelBuild, it should be used to performance any operations on groups objects, or on single objects that &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s does not provide an accessible interface for.&lt;br /&gt;
&lt;br /&gt;
==== Features ====&lt;br /&gt;
&lt;br /&gt;
There are three features of &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt; that require some notation:&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;root_window_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;: This feature determines which class should be used as the root class when generating a project's code and system configuration files.&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;reset_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;: This feature is a powerful feature used to reset &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance states where an undo operation, reverting a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance to it's previous state prior to some action, is simply not possible. Such a case is setting minimum widths and heights of a widget. Once set it is impossible to unset via a simple undo, which would reset the respective widget properties. In this case the entire widget structure, represented by &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instances needs to be rebuilt. `&amp;lt;font color=darkgreen&amp;gt;reset_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will serialize an &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; structure in memory, delete the structure and then resurrect the structure from deserializing the in-memory data. Later when explaining the command object model, `&amp;lt;font color=darkgreen&amp;gt;reset_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is a reason why commands should not hold onto &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instances but by the instance's `&amp;lt;font color=darkgreen&amp;gt;id&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;build_object_from_string&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;: This is a general purpose factory function used to generate &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance(s) from a textual representation of the EiffelVision 2 type name, such as &amp;lt;font color=blue&amp;gt;EV_BUTTON&amp;lt;/font&amp;gt;. This function is primarily used by the '''Type Selector''' whose items pertain little information, which consists of a &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; type name the item is representing. The '''Type Selector''' is explained later in this document.&lt;br /&gt;
&lt;br /&gt;
=== GB_EV_ANY* ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; is the base of all EiffelVision 2 associative classes that expose properties common to a number of EiffelVision 2 widgets. Such properties are `''&amp;lt;font color=darkgreen&amp;gt;is_sensitive&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; from &amp;lt;font color=blue&amp;gt;EV_SENSITIVE&amp;lt;/font&amp;gt;. All widgets classes in EiffelVision 2 support the notion of being sensitive so that part of a widget's properties can be covered in a EiffelBuild &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; descended class - &amp;lt;font color=blue&amp;gt;GB_EV_SENSITIVE&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This classification or abstraction of EiffelVision 2 properties is fundamental to the dynamics that play a part in the construction of the '''Object Editor''', project persistence and retrieval as well as playing a role in code generation. All of these topics are covered later in this document&lt;br /&gt;
&lt;br /&gt;
There isn't much more to say on &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; that wont be explained in more detail and with more context further in this document. However there are two important features that are worth notation. These features handle synchronization of the multiple views supported by a single &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; descendent instance. The views correspond to the '''Display Window''' and '''Builder Window''' windows. `''&amp;lt;font color=darkgreen&amp;gt;for_all_objects&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is used to synchronize all views of any changes made to any properties that the &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; descendent instance exposes. `''&amp;lt;font color=darkgreen&amp;gt;for_all_objects&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; takes a agent argument used to do the synchronization. `''&amp;lt;font color=darkgreen&amp;gt;for_all_instance_referers&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is similar to `''&amp;lt;font color=darkgreen&amp;gt;for_all_objects&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; but instead examines the passed &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance's referrers and applies an agent to them.&lt;br /&gt;
&lt;br /&gt;
=== Refactoring ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;GB_EV_OBJECT&amp;lt;/font&amp;gt; have heavy interfaces. If any significant amount of work is to be done on EiffelBuild, refactoring these classes interfaces and deferring the declaration of the interfaces to more specialized descends would be recommended. From surface inspection I do not see why such an interface has to be available at such at high level of abstraction.&lt;br /&gt;
&lt;br /&gt;
== Object Editor ==&lt;br /&gt;
&lt;br /&gt;
The '''Object Editor''' is the properties editor, usually to the right hand side of EiffelBuild and other are also found floating when a new one is opened. The fixed (docked) object editor has an additional characteristic over the floating object editors, is automatically synchronized with the currently selected item in the '''Layout Constructor'''. Apart from that, the object editors, floating or not, are one and the same. Each object editor is an instance of &amp;lt;font color=blue&amp;gt;GB_OBJECT_EDITOR&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Access to all of the opened object editors is available through the instance-scoped &amp;lt;font color=blue&amp;gt;GB_OBJECT_EDITORS&amp;lt;/font&amp;gt; instance, available from `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;object_editors&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To create a new object editor you can use the `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;new_object_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; factory function, passing a relevant &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance, which will be used to determine how to build the object editor and what state to display.&lt;br /&gt;
&lt;br /&gt;
=== Supporting Dynamic Building ===&lt;br /&gt;
&lt;br /&gt;
Before continuing to explain how the '''Object Editor''' work and how it builds its user interfaces dynamically, there are a few things to mention with regards to extending EiffelBuild to include new widgets.&lt;br /&gt;
&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_SUPPORTED_WIDGETS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;included_all_components&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; needs to reference any EiffelVision 2 widgets and EiffelBuild object property classes, such as &amp;lt;font color=blue&amp;gt;GB_EV_FONTABLE&amp;lt;/font&amp;gt; that EiffelBuild supports. This has to be done because the '''Object Editor''' will use &amp;lt;font color=blue&amp;gt;INTERNAL&amp;lt;/font&amp;gt; to create instances of &amp;lt;font color=blue&amp;gt;GB_EV_&amp;lt;/font&amp;gt;XXX dynamically based on the corresponding widget, so the &amp;lt;font color=blue&amp;gt;GB_EV_&amp;lt;/font&amp;gt;XXX classes need to be compiled into EiffelBuild or EiffelBuild will fail at runtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_EV_HANDLER&amp;lt;/font&amp;gt; also needs to be updated if any new property classes need to be added based on a new abstract class used by an EiffelVision 2 widget, such as an addition of a property class like &amp;lt;font color=blue&amp;gt;EV_TEXTABLE&amp;lt;/font&amp;gt;. `&amp;lt;font color=blue&amp;gt;GB_EV_HANDLER&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;supported_types&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; returns the list of supported classes, which is used in various places throughout EiffelBuild to support it's dynamic nature. If a newly added class is not present in the list then the properties for it will not appear in the '''Object Editor''' when it build its user interface. `&amp;lt;font color=darkgreen&amp;gt;supported_types&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is used from `&amp;lt;font color=blue&amp;gt;GB_OBJECT_EDITOR&amp;lt;/font&amp;gt;.&amp;lt;font color=darkgreen&amp;gt;construct_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; to build the user interface according to the EiffelVision 2 conformance to the supported types. `&amp;lt;font color=darkgreen&amp;gt;construct_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; iterates through the supported types and checks the &amp;lt;font color=blue&amp;gt;EV_ANY&amp;lt;/font&amp;gt; from access via `&amp;lt;font color=darkgreen&amp;gt;object&amp;lt;/font&amp;gt;.&amp;lt;font color=darkgreen&amp;gt;object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; for conformance. If the retrieved &amp;lt;font color=blue&amp;gt;EV_ANY&amp;lt;/font&amp;gt; instance conforms to one of the supported types then a new &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; derived objects is created and initialized using &amp;lt;font color=blue&amp;gt;INTERNAL&amp;lt;/font&amp;gt;. `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;attribute_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; (a fragment of the complete object editor user interface for the conformed type - i.e. &amp;lt;font color=blue&amp;gt;EV_FONTABLE&amp;lt;/font&amp;gt;) is then appended to the object editor's user interface to provide object edition support.&lt;br /&gt;
&lt;br /&gt;
=== How it Works ===&lt;br /&gt;
&lt;br /&gt;
The Object Editor is dynamic in that it examines the inherited hierarchy of a given EiffelVision 2 widget classes. This is done through the creation of a &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; descendent.&lt;br /&gt;
&lt;br /&gt;
If a user is in the '''Display Window''' and they change the state of a toggle button, this change in state needs to be reflected in the active '''Object Editor'''. This can be achieved by redefining `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;set_up_user_events&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, as does &amp;lt;font color=blue&amp;gt;GB_EV_GAUGE_EDITOR_CONSTRUCTOR&amp;lt;/font&amp;gt;, which is descended by &amp;lt;font color=blue&amp;gt;GB_EV_GAUGE&amp;lt;/font&amp;gt;. Any widget property states from the '''Builder Window''' are ignored, by design. This is because only those widget property state changes from the '''Display Window''' should be reflected in the active '''Object Editor'''. This means if you move the gauge bar on an &amp;lt;font color=blue&amp;gt;EV_GAUGE&amp;lt;/font&amp;gt; in the '''Display Window''' it's property state changes and will be reflected in the '''Object Editor''', if the associated layout item is selected in the '''Layout Constructor'''.&lt;br /&gt;
&lt;br /&gt;
The '''Object Editor''' is, internally, a series of &amp;quot;panels&amp;quot;. The term panel is just transient term used to identify how the '''Object Editor''' consists of user interface fragments and is stitched together to form the complete '''Object Editor''' user interface.&lt;br /&gt;
&lt;br /&gt;
'''Object Editor''' editor panels, which are retrieve from calling `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;attribute_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; on a derived &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; instance, are built using a &amp;lt;font color=blue&amp;gt;GB_EV_EDITOR_CONSTRUCTOR*&amp;lt;/font&amp;gt; as a base. There are a number of concrete versions such as &amp;lt;font color=blue&amp;gt;GB_EV_SENSITIVE_EDITOR_CONSTRUCTOR&amp;lt;/font&amp;gt;, which is used to create the '''is_sensitive''' check box. &lt;br /&gt;
&lt;br /&gt;
Generally the deferred `&amp;lt;font color=blue&amp;gt;GB_EV_EDITOR_CONSTRUCTOR*&amp;lt;/font&amp;gt;''&amp;lt;font color=darkgreen&amp;gt;update_attribute_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; routine is called from `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;attribute_editor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; to synchronize the '''Object Editor''' panel with a displayed '''Display Window''' EiffelVision 2 widget. Any '''Object Editor''' panel user interface, that refers to a property of some EiffelVision 2 widget, is responsible for updating the associated widget in the '''Display Window''' and possibly the '''Builder Window'''. If any other views are added, then it is possible that those views have to be updated also. This can be achieved using one of the synchronization features of &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;. If synchronization needs to be applied to all views use `''&amp;lt;font color=darkgreen&amp;gt;for_all_objects&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. Look at the EiffelBuild code to see how these functions are used. It is reasonable to assume that all views should be updated, however there are some cases where updating all of the views should not take place. Such as case is with `''&amp;lt;font color=darkgreen&amp;gt;disable_sensitive&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; of &amp;lt;font color=blue&amp;gt;EV_SENSITIVE&amp;lt;/font&amp;gt;. If this action was applied to all views the Builder Window would be useless because the pick and drop functionality would be disabled as a result, hence why only the '''Display Window''' (the first view) is updated.&lt;br /&gt;
&lt;br /&gt;
When changing a property in the '''Object Editor''' the EiffelVision 2 widgets in one or more views need to be updated, even if they are not visible. `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;update_editors&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; needs to be called to refresh all opened objects editors, to synchronize any changes in property state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_EV_SENSTIVE&amp;lt;/font&amp;gt; is one of the most basic examples and should be looked at to get a quick view of how things work with constructing an '''Object Editor''' panel, and how to synchronize changes made to the '''Object Editor''' properties with the available views.&lt;br /&gt;
&lt;br /&gt;
The use of constants with '''Object Editors''' are a little more tricky. To save reinventing the wheel each time, constant fields use &amp;lt;font color=blue&amp;gt;GB_INPUT_FIELD*&amp;lt;/font&amp;gt;. This deferred class handles all of the necessary user interface manipulation to switch between manual entry and selecting a constant, in which case a combo box will be displayed in place of a text field. The buttons are also added to select to use a constant and reset constant. The input field handles updates of the constant manifest and modifies held lists according to what's been added, removed or changed. There are a few descendents of &amp;lt;font color=blue&amp;gt;GB_INPUT_FIELD*&amp;lt;/font&amp;gt;, one for each type of constant such as &amp;lt;font color=blue&amp;gt;GB_INTEGER_INPUT_FIELD&amp;lt;/font&amp;gt; for &amp;lt;font color=blue&amp;gt;INTEGER&amp;lt;/font&amp;gt; constants. &amp;lt;font color=blue&amp;gt;GB_EV_EDITOR_CONSTRUCTOR*&amp;lt;/font&amp;gt; derived classes (used to build the '''Object Editor''' panels) are now much simpler to implement because of the brunt of the work is done using &amp;lt;font color=blue&amp;gt;GB_INPUT_FIELD*&amp;lt;/font&amp;gt;. It is as simple as becoming a client of a &amp;lt;font color=blue&amp;gt;GB_INPUT_FIELD*&amp;lt;/font&amp;gt; descendent. &amp;lt;font color=blue&amp;gt;GB_EV_GAUGE_EDITOR_CONSTRUCTOR&amp;lt;/font&amp;gt; shows a good use of being a client to &amp;lt;font color=blue&amp;gt;GB_INPUT_FIELD*&amp;lt;/font&amp;gt; descendents.&lt;br /&gt;
&lt;br /&gt;
=== Dirty Notification ===&lt;br /&gt;
&lt;br /&gt;
When setting any properties through any opened '''Object Editor''' `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;enable_project_modified&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; should be called. Failure to do this will result in project modifications not being accounted for, resulting in prevention of the notification that the project has been modified on exit. It will also prevent the '''Save''' button from becoming active.&lt;br /&gt;
&lt;br /&gt;
=== Optimizations ===&lt;br /&gt;
&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;update_editors&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is not optimized. This could be optimize to only update the corresponding display widget attributes for the properties that have changed in the Object Editor, instead it just sets all of the properties for a associated widget.&lt;br /&gt;
&lt;br /&gt;
== Tool Windows ==&lt;br /&gt;
&lt;br /&gt;
EiffelBuild is comprised of a number of tool windows. Every dialog and pane seen in the EiffelBuild stand-alone application is available from the `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''tools''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. `''&amp;lt;font color=darkgreen&amp;gt;tools&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; returns an EiffelBuild instance-scoped instance of &amp;lt;font color=blue&amp;gt;GB_TOOLS&amp;lt;/font&amp;gt;, which provides access to all of the tool windows and dialogs available in EiffelBuild.&lt;br /&gt;
&lt;br /&gt;
The following sections describe the main tool windows and indicates what classes are used to build their visual representation. This is important to note for anyone extending EiffelBuild to add new widgets to the '''Type Selector''' or needs to make modifications to the '''Widget Selector''' or '''Layout Constructor'''.&lt;br /&gt;
&lt;br /&gt;
=== Type Selector ===&lt;br /&gt;
&lt;br /&gt;
[[Image:eiffel_build.type_selector.png]]&lt;br /&gt;
&lt;br /&gt;
The '''Type Selector''' tool window is a window build from one of two items depending on the display mode. There is the classic [tree] mode and the icon [figures] mode. When in the classic mode, the '''Type Selector''' will appear as a tree with type icons and descriptions. Icon mode will show only the type icons, for a compact view. These classes are &amp;lt;font color=blue&amp;gt;GB_TREE_TYPE_SELECTOR_ITEM&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;GB_FIGURE_TYPE_SELECTOR_ITEM&amp;lt;/font&amp;gt; respectively. Both derive the deferred class &amp;lt;font color=blue&amp;gt;GB_TYPE_SELECTOR_ITEM*&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When a pick and drop action is applied from the '''Type Selector''' to the '''Layout Constructor''' the picked item, represented by a &amp;lt;font color=blue&amp;gt;GB_TYPE_SELECTOR_ITEM*&amp;lt;/font&amp;gt; derived class instance, has its `&amp;lt;font color=blue&amp;gt;GB_TYPE_SELECTOR_ITEM&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;generate_transportable&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; implementation called. The implementation is to create a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance that conforms to the &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; representation of `&amp;lt;font color=blue&amp;gt;GB_TYPE_SELECTOR_ITEM&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;type&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. The created &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance is then used to create a new &amp;lt;font color=blue&amp;gt;GB_STANDARD_OBJECT_STONE&amp;lt;/font&amp;gt; instance before it is returned from `''&amp;lt;font color=darkgreen&amp;gt;generate_transportable&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When a pick and drop action is performed from the '''Layout Constructor''' to the '''Type Selector''', for swapping items or a conforming type,&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_TYPE_SELECTOR_ITEM&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;can_drop_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is called to give the item a chance to veto the incoming stone. '''Type Selector''' items should implement this to prevent swapping objects that do not conform, because of the number and/or type of children.&lt;br /&gt;
&lt;br /&gt;
=== Layout Constructor ===&lt;br /&gt;
&lt;br /&gt;
[[Image:eiffel_build.layout_constructor.png]]&lt;br /&gt;
&lt;br /&gt;
The '''Layout Constructor''', an instance of &amp;lt;font color=blue&amp;gt;GB_LAYOUT_CONSTRUCTOR&amp;lt;/font&amp;gt;, is the primary window in EiffelBuild. As all other tools windows, the instance respective window can be retrieved from `&amp;lt;font color=blue&amp;gt;GB_LAYOUT_CONSTRUCTOR&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;tools&amp;lt;/font&amp;gt;.&amp;lt;font color=darkgreen&amp;gt;layout_constructor&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Each item in the '''Layout Constructor''' is an instance of the &amp;lt;font color=blue&amp;gt;GB_LAYOUT_CONSTRUCTOR_ITEM&amp;lt;/font&amp;gt; class. &amp;lt;font color=blue&amp;gt;GB_LAYOUT_CONSTRUCTOR_ITEM&amp;lt;/font&amp;gt; instances are created from the representing &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;'s `''&amp;lt;font color=darkgreen&amp;gt;layout_item&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; attribute.&lt;br /&gt;
&lt;br /&gt;
The pick and drop pebble functions are implemented on &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;, which probably can be refactored to be placed at a higher level of specialization. Functions such as `''&amp;lt;font color=darkgreen&amp;gt;can_add_child&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; are used when picking and dropping to determine if the target of a pick and drop action, from a peripheral window, is supported given the source. In `''&amp;lt;font color=darkgreen&amp;gt;can_add_child&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; it would be if the target in the '''Layout Constructor''' supported the notion of children.&lt;br /&gt;
&lt;br /&gt;
The '''Layout Constructor'' is able to persist state, both between switching top-level windows/widgets and between sessions (unloading and reloading a project.) Every item in the '''Layout Constructor''' has an associated &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance. `&amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;is_expanded&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; reports the expansion status of an item. Because `''&amp;lt;font color=darkgreen&amp;gt;is_expanded&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is implemented on &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instead of &amp;lt;font color=blue&amp;gt;GB_LAYOUT_CONSTRUCTOR_ITEM&amp;lt;/font&amp;gt; it will always be held onto as &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s are never destroyed and new ones created.&lt;br /&gt;
&lt;br /&gt;
=== Widget Selector ===&lt;br /&gt;
&lt;br /&gt;
[[Image:eiffel_build.widget_selector.png]]&lt;br /&gt;
&lt;br /&gt;
In the EiffelBuild code, due to legacy reasons, a widget in the '''Widget Selector''' is sometimes referred to as a window or top-level window. This is because EiffelBuild at a point in history only supported the notion of a top-level window, but now additionally supports top-level widgets.&lt;br /&gt;
&lt;br /&gt;
Top-level widgets refers to those widgets that have been extracted from part of a widget hierarchy, in the '''Layout Constructor'', and have been designated to be a reusable widget. A separate class will be generated for each top-level window/widget during code generation. As such the selected hierarchy can not be expanded or manipulated except when editing the top-level widget on it's own, from the '''Layout Constructor''.&lt;br /&gt;
&lt;br /&gt;
To retrieve the EiffelBuild instance-scoped instance of &amp;lt;font color=blue&amp;gt;GB_WIDGET_SELECTOR&amp;lt;/font&amp;gt;, use `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;tools&amp;lt;/font&amp;gt;''.''&amp;lt;font color=darkgreen&amp;gt;widget_selector&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The Widget Selector supports a directory hierarchy and new windows/widgets can be places into arbitrary directories. The locations are never set in stone and a user can pick and drop top-level windows/widgets to and from directories. This functionality needs mentioning because of the implementation in place to do this needs to be smarter than just moving a node around a tree. There is the possibility of class name conflicts unless this action is handled correctly. If a system has already been generated and then a top-level widget/window is moved into a different folder, the old generated classes need to be removed. &amp;lt;font color=blue&amp;gt;GB_COMMAND_MOVE_WINDOW&amp;lt;/font&amp;gt; command class handles this action. The class is also undoable so it should be used when pragmatically moving items from directory to directory. Although it would be a rare case, it required mentioning for potentially interested parties.&lt;br /&gt;
&lt;br /&gt;
All items in the Widget Selector descend &amp;lt;font color=blue&amp;gt;GB_WIDGET_SELECTOR_COMMON_ITEM*&amp;lt;/font&amp;gt;. A &amp;lt;font color=blue&amp;gt;GB_WIDGET_SELECTOR_DIRECTORY_ITEM&amp;lt;/font&amp;gt; instance represents a directory in the '''Widget Selector''' and a &amp;lt;font color=blue&amp;gt;GB_WIDGET_SELECTOR_ITEM&amp;lt;/font&amp;gt; instance is for top-level windows/widgets. Just like the '''Layout Constructor''', there is a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance associated with every top-level window/widget in the '''Widget Selector'''. The &amp;lt;font color=blue&amp;gt;GB_WIDGET_SELECTOR_ITEM&amp;lt;/font&amp;gt; instance representing the associated &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; is accessible through `&amp;lt;font color=blue&amp;gt;GB_WIDGET_SELECTOR_ITEM&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;widget_selector_item&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Component Selector ===&lt;br /&gt;
&lt;br /&gt;
[[Image:eiffel_build.component_selector.png]]&lt;br /&gt;
&lt;br /&gt;
The '''Component Selector''' is similar to the '''Widget Selector''' but instead of making associated references when adding a top-level widget to the '''Layout Constructor''', the '''Component Selector''' creates new &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; object hierarchies. What this means is a pick and drop action from the '''Layout Constructor''' to the '''Component Selector''' will create a new object hierarchy for the '''Component Selector''' item. In reverse, the same applies - a new hierarchy is created in the '''Layout Constructor''' from the '''Component Selector'''.&lt;br /&gt;
&lt;br /&gt;
The '''Component Selector''', &amp;lt;font color=blue&amp;gt;GB_COMPONENT_SELECTOR&amp;lt;/font&amp;gt;, is another instanced-scoped tool window available from `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;tools&amp;lt;/font&amp;gt;''.''&amp;lt;font color=darkgreen&amp;gt;component_selector&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. The items in the Component Selector are represented by &amp;lt;font color=blue&amp;gt;GB_COMPONENT_SELECTOR_ITEM&amp;lt;/font&amp;gt; instances.&lt;br /&gt;
&lt;br /&gt;
=== Design Limitation ===&lt;br /&gt;
&lt;br /&gt;
The current design of the componentized EiffelBuild poses a design limitation. The EiffelBuild tool windows are per-instance windows and are internally tied to an EiffelBuild project/instance. This means that an application that supports multiple EiffelBuild instances, but only displays one set of EiffelBuild tool windows, will need to remove and add the tool windows for the respective project/instances when each EiffelBuild main windows is activated (focuses, shown, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Other Tool Windows ===&lt;br /&gt;
&lt;br /&gt;
There are many other tool windows in EiffelBuild, but, at the time of writing, are not present in the main window user interface. To access and instance-scoped EiffelBuild tools use: `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;tools&amp;lt;/font&amp;gt;''.''&amp;lt;tool_name&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;'.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Every constant in EiffelBuild descends the common &amp;lt;font color=blue&amp;gt;EB_CONSTANT*&amp;lt;/font&amp;gt; ancestor. There are number of specialized constants, one for every type that can be set in EiffelBuild. Such a concrete class is &amp;lt;font color=blue&amp;gt;GB_STRING_CONSTANT&amp;lt;/font&amp;gt;, representing &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; constants.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;EB_CONSTANT*&amp;lt;/font&amp;gt; has a number of attributes one of which is `''&amp;lt;font color=darkgreen&amp;gt;referers&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which is a list containing constant contexts (&amp;lt;font color=blue&amp;gt;GB_CONSTANT_CONTEXT&amp;lt;/font&amp;gt; instances) of referrers to the constant. A constant context contains; information about the constant, the &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; (via `''&amp;lt;font color=darkgreen&amp;gt;object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;) using the constant and a &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; attribute representing the name of the class attribute (`''&amp;lt;font color=darkgreen&amp;gt;attribute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;) which the constant is attached to (i.e. `&amp;lt;font color=blue&amp;gt;EV_TITLED_WINDOW&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;title&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.) `''&amp;lt;font color=darkgreen&amp;gt;property&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is another attribute, which is the class type name which the attribute is a member of.&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;referers&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is used to propagate any changes to the visual components, such as those found in the display window. When a constant changes all referrers must be update, so this is what it does through the context object. `''&amp;lt;font color=darkgreen&amp;gt;referers&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is also used to check if a constant is attached before removing the constant.&lt;br /&gt;
&lt;br /&gt;
The instance-scoped constants handler &amp;lt;font color=blue&amp;gt;GB_CONSTANTS_HANDLER&amp;lt;/font&amp;gt; can be accessed using `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;constants&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&lt;br /&gt;
The command model used inside of EiffelBuild is very similar to the model used within EiffelStudio. There is a command class for all commands available from the menu and toolbar. This means a EiffelBuild clients can create their own user interface, to represent the commands available in the EiffelBuild command model. Commands are also available for any major operations that may require a undo/redo; such as moving, adding or deleting a widget or widget structure. &lt;br /&gt;
&lt;br /&gt;
There are two types of EiffelBuild commands - Undoable commands and non-undoable commands. For all commands that have undo actions, or are at least undo-applicable, command classes inherit &amp;lt;font color=blue&amp;gt;GB_COMMAND*&amp;lt;/font&amp;gt;. For those command classes, such as the command to open a project - &amp;lt;font color=blue&amp;gt;GB_FILE_OPEN_COMMAND&amp;lt;/font&amp;gt; - that have no undo action they inherit &amp;lt;font color=blue&amp;gt;E_CMD*&amp;lt;/font&amp;gt;. &amp;lt;font color=blue&amp;gt;E_CMD*&amp;lt;/font&amp;gt; is very abstract and is subclassed many times before specialized to a command class such as &amp;lt;font color=blue&amp;gt;GB_FILE_OPEN_COMMAND&amp;lt;/font&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Both &amp;lt;font color=blue&amp;gt;GB_COMMAND*&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;E_CMD*&amp;lt;/font&amp;gt; are deferred and both define `''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which should be called when processing the command action. &amp;lt;font color=blue&amp;gt;GB_COMMAND*&amp;lt;/font&amp;gt; also defines `''&amp;lt;font color=darkgreen&amp;gt;undo&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; to provide a means to undo the actions of `''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. `''&amp;lt;font color=darkgreen&amp;gt;textual_representation&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is the final feature defined in &amp;lt;font color=blue&amp;gt;GB_COMMAND*&amp;lt;/font&amp;gt;. All undoable commands should return a &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; to represent the command in the history, which is used by the EiffelBuild history tool to display the command in a list.&lt;br /&gt;
&lt;br /&gt;
 deferred class E_CMD&lt;br /&gt;
 &lt;br /&gt;
 feature -- Access&lt;br /&gt;
 &lt;br /&gt;
   executable: BOOLEAN is&lt;br /&gt;
       -- Is Current command executable?&lt;br /&gt;
       -- (True by default)&lt;br /&gt;
     do&lt;br /&gt;
       Result := True&lt;br /&gt;
     end&lt;br /&gt;
 &lt;br /&gt;
 feature -- Execution&lt;br /&gt;
 &lt;br /&gt;
   execute is&lt;br /&gt;
       -- Execute Current command.&lt;br /&gt;
     require&lt;br /&gt;
       executable: executable&lt;br /&gt;
     deferred&lt;br /&gt;
     end&lt;br /&gt;
 &lt;br /&gt;
 end -- class E_CMD&lt;br /&gt;
&lt;br /&gt;
 deferred class&lt;br /&gt;
   GB_COMMAND&lt;br /&gt;
 &lt;br /&gt;
 feature -- Basic operations&lt;br /&gt;
 &lt;br /&gt;
   execute is&lt;br /&gt;
       -- Execute `Current'.&lt;br /&gt;
     deferred&lt;br /&gt;
     end&lt;br /&gt;
     &lt;br /&gt;
   undo is&lt;br /&gt;
       -- Undo `Current'.&lt;br /&gt;
       -- Calling `execute' followed by `undo' must restore&lt;br /&gt;
       -- the system to its previous state.&lt;br /&gt;
     deferred&lt;br /&gt;
     end&lt;br /&gt;
 &lt;br /&gt;
 feature -- Access&lt;br /&gt;
     &lt;br /&gt;
   textual_representation: STRING is&lt;br /&gt;
       -- Text representation of command exectuted.&lt;br /&gt;
     deferred&lt;br /&gt;
     ensure&lt;br /&gt;
       result_not_void: Result /= Void&lt;br /&gt;
     end&lt;br /&gt;
 &lt;br /&gt;
 end -- class GB_COMMAND&lt;br /&gt;
&lt;br /&gt;
Commands that derive &amp;lt;font color=blue&amp;gt;GB_COMMAND*&amp;lt;/font&amp;gt; should add instances of themselves to the history when executed (the call to `''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;). The following code is taken from `&amp;lt;font color=blue&amp;gt;GB_COMMAND_NAME_CHANGE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 execute is&lt;br /&gt;
     -- Execute `Current'.&lt;br /&gt;
   do&lt;br /&gt;
     ...&lt;br /&gt;
     if not components.history.command_list.has (Current) then&lt;br /&gt;
       components.history.add_command (Current)&lt;br /&gt;
     end&lt;br /&gt;
     ...&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
It should be asserted that commands associated with &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s should store &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s ids and retrieve the &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; using the &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt;, and not store the &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; directly. This does not just pertain to undo actions but to all actions. This is because some actions from within EiffelBuild will replace the held &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;. This may sound confusing initially but objects are replaced when the are reconstructed through the `&amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;reset_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. When an object is reset the &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; is removed and an new one is created with the same id. This means that the held &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; in the command is not the same as instance held in the object lists of &amp;lt;font color=blue&amp;gt;GB_OBJECT_HANDLER&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Accessing Commands ===&lt;br /&gt;
&lt;br /&gt;
Like all other components in EiffelBuils the commands can also be accessed through `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPNENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;commands&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. This provides a EiffelBuild instance-scoped GB_COMMAND_HANDLER&amp;lt;/font&amp;gt;, through which the EiffelBuild user interface related commands can be accessed. User interface designers/implements should go through `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;commands&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; to retrieve and execute the respective command for the user interface elements.&lt;br /&gt;
&lt;br /&gt;
== Other Instance-Scoped Components == &lt;br /&gt;
&lt;br /&gt;
This section of the document describes some of the other EiffelBuild instance-scoped objects, accessible through &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== History ===&lt;br /&gt;
&lt;br /&gt;
EiffelBuild provides a instanced-scoped history object, &amp;lt;font color=blue&amp;gt;GB_GLOBAL_HISTORY&amp;lt;/font&amp;gt; accessible through `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;history&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; that may be used to add command execution to the history as well as rollback commands through undo.&lt;br /&gt;
&lt;br /&gt;
=== System Status ===&lt;br /&gt;
&lt;br /&gt;
For every instance of EiffelBuild there is an instance of &amp;lt;font color=blue&amp;gt;GB_SYSTEM_STATUS&amp;lt;/font&amp;gt;, which reports on the EiffelBuild instance's current state. Clients can retrieve the instance-scoped version of &amp;lt;font color=blue&amp;gt;GB_SYSTEM_STATUS&amp;lt;/font&amp;gt; via `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;system_status&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_SYSTEM_STATUS&amp;lt;/font&amp;gt; provides clients access to `''&amp;lt;font color=darkgreen&amp;gt;current_project_settings&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which can be used to retrieve information on a project loaded into the respective EiffelBuild instance.&lt;br /&gt;
&lt;br /&gt;
=== Clipboard ===&lt;br /&gt;
&lt;br /&gt;
EiffelBuild supports the standard clipboard functions; cut, copy and paste. All functions are represented by a command in the command object model. The EiffelBuild clipboard, &amp;lt;font color=blue&amp;gt;GB_CLIPBOARD&amp;lt;/font&amp;gt;, is per-instance of EiffelBuild, accessible through `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;clipboard&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. Cut, copy and paste operations cannot span multiple instances of EiffelBuild as of current because of the dependencies on top-level objects available in one EiffelBuild instance, which may not (most likely not) be available in another EiffelBuild instances.&lt;br /&gt;
&lt;br /&gt;
The information persisted in the clipboard is a serialized representation of a widget structure in XML. `&amp;lt;font color=blue&amp;gt;GB_CLIPBOARD&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;set_object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; serializes a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; and stores it in `&amp;lt;font color=blue&amp;gt;GB_CLIPBOARD&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;contents_cell&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; for later retrieval. Querying `&amp;lt;font color=blue&amp;gt;GB_CLIPBOARD&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;object&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will perform the reverse, deserializing the XML in `&amp;lt;font color=blue&amp;gt;GB_CLIPBOARD&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;contents_cell&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; and constructing a &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; from it.&lt;br /&gt;
&lt;br /&gt;
One thing to note is that the clipboard does not preserve any names given to any of the objects serialized, which would be the feature names in the generated code. So serialization and deserialization will yield an object structure without any name information.&lt;br /&gt;
&lt;br /&gt;
EiffelBuild supports the ability to view the clipboard contents via a display window tool as well as a pick and drop version of paste, via a pick and drop from the paste toolbar button to the destination area.&lt;br /&gt;
&lt;br /&gt;
== XML Serialization and Persistence ==&lt;br /&gt;
&lt;br /&gt;
Throughout EiffelBuild there is a need to serialize widget structures, represented by hierarchies of &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt;s. The two main classes in serialization of an active widget structures is &amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt;. An instance-scoped instance of &amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt; can be retrieved from `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;xml_handler&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is a EiffelBuild command available - &amp;lt;font color=blue&amp;gt;GB_FILE_SAVE_COMMAND&amp;lt;/font&amp;gt; - Calling `''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will begin a complete serialization of all of the project's widget structures and persist the result to disk. It is a good place to look to learn how to serialize widget structures.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt; is a wrapper, of sorts, for the &amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt; and &amp;lt;font color=blue&amp;gt;GB_XML_LOAD&amp;lt;/font&amp;gt; classes. It also handles special operations such as importing and merging projects files persisted as XML.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt; is fairly straight forward in it's interface and implementation. It's primary routine `''&amp;lt;font color=darkgreen&amp;gt;store&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is used to store the project widget structures, built in EiffelBuild, to disk as XML. The process of storing creates an XML structure and then write that to disk in a text document. A document &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt;is create using `&amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;generate_document&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. &amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt; is specific to serializing only the widget structures and storing the serialized XML data to disk.&lt;br /&gt;
&lt;br /&gt;
=== Creating system_interfaces.xml ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''system_interfaces.xml''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is generated entirely inside `&amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;store&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which is called by `&amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;save&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first thing generated in a document is the constants defined in a loaded project. Constants require to be stored at the beginning of a file so the deserialization process can correctly initialize the constants for future use when assigning constants to widget properties when deserializing the widget structures. Generation of the XML is done by iterating every constant in the project and calling &amp;lt;font color=blue&amp;gt;GB_CONSTANT&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;generate_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The next step stores all of the directories and windows (or widgets in the '''Widget Selector'''.) with a call to `''&amp;lt;font color=darkgreen&amp;gt;store_windows&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. For every window the properties, which are both the top level windows/widgets  and property objects (&amp;lt;font color=blue&amp;gt;EV_SELECTABLE&amp;lt;/font&amp;gt;, &amp;lt;font color=blue&amp;gt;EV_TEXTABLE&amp;lt;/font&amp;gt;, ...), are generated into the window XML node. If any directories are in the project, directories will also be generated in a nested fashion, with directories in directories and windows in directories.&lt;br /&gt;
&lt;br /&gt;
Any selected events/action sequences that have been subscribed to on a widget, through the '''Object Editor''' user interface, are generated after any properties are generated.&lt;br /&gt;
&lt;br /&gt;
The entire XML persistence is nested. So every widget in a window is generated as a child widget, and every widget within a widget is t is generated as a child of that widget, and so on. For every widget/window, the same process as used in the '''Object Editor'''; the use of `&amp;lt;font color=blue&amp;gt;GB_EV_HANDLER&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;suppported_types&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is iterated, a &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; is created and conformance is checked. Then for every conforming type/property ''&amp;lt;font color=darkgreen&amp;gt;generate_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is called on the associated &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; instance, with the current XML element node passed.&lt;br /&gt;
&lt;br /&gt;
After all of the top-level windows/widgets have been generated the generated XML is stored in `&amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;document&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== XML Deserialization and Retrieval ==&lt;br /&gt;
&lt;br /&gt;
Retrieving and deserializing XML is the same process are serializing and storing XML, as explained in the previous section, but in reverse.&lt;br /&gt;
&lt;br /&gt;
Instead of using &amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt;, &amp;lt;font color=blue&amp;gt;GB_XML_LOAD&amp;lt;/font&amp;gt; is used. &amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt; wraps the deserialization of the &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''system_interface.xml''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; files in the `&amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;load&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Just like storing XML, there is a EiffelBuild command available for retrieving a project - &amp;lt;font color=blue&amp;gt;GB_FILE_OPEN_COMMAND&amp;lt;/font&amp;gt; - Calling `''&amp;lt;font color=darkgreen&amp;gt;execute&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will start a complete deserialization and create all of the necessary instances required to retrieve a authored user interface description, created using EiffelBuild.&lt;br /&gt;
&lt;br /&gt;
Loading/retrieval starts at `&amp;lt;font color=blue&amp;gt;GB_XML_HANDLER&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;load&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. `''&amp;lt;font color=darkgreen&amp;gt;load&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; loads and then parses the XML data. Parsing is the direct opposite of the generation, it looks for constants, windows and then events, in the XML. During the parsing process the necessary objects and structures are rebuilt. &lt;br /&gt;
&lt;br /&gt;
When parsing, upon discover of a constant `&amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;constants&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is retrieve and `''&amp;lt;font color=darkgreen&amp;gt;build_constants_from_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is called to rebuild the constants for the project using an respective XML node. For windows and widgets and their serialized property classes (&amp;lt;font color=blue&amp;gt;EV_SELECTABLE&amp;lt;/font&amp;gt;, &amp;lt;font color=blue&amp;gt;EV_TEXTABLE&amp;lt;/font&amp;gt;, ...) a new &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; is created and initialized and then `''&amp;lt;font color=darkgreen&amp;gt;modify_from_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is called to modify the object associated with prior created &amp;lt;font color=blue&amp;gt;GB_OBJECT*&amp;lt;/font&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
As a helper function, &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; provides the function `''&amp;lt;font color=darkgreen&amp;gt;get_unique_full_info&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which returns a hash table containing information read from all of the subnodes converter to objects of type &amp;lt;font color=blue&amp;gt;ELEMENT_INFORMATION&amp;lt;/font&amp;gt;. Using the returned hash table it is easy to retrieve atomic pieces of information about subnodes of a widget being deserializing . It should be noted that when querying the table for information, some information may not be returned. This is supporting backwards compatibility so that older serialized widget structure XML descriptions, that do not have the new elements, will not be flagged as erroneous. For a simple example see `&amp;lt;font color=blue&amp;gt;GB_EV_SENSITIVE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;modify_from_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; also provides `''&amp;lt;font color=darkgreen&amp;gt;retrieve_and_set_XXX_value&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, where ''&amp;lt;font color=darkgreen&amp;gt;XXX&amp;lt;/font&amp;gt;'' is a type that supports constants (e.g. string, integer, font, ...). For supported constant types examine the all classes that descend &amp;lt;font color=blue&amp;gt;GB_CONSTANT*&amp;lt;/font&amp;gt;. This function will return back a respective type; `''&amp;lt;font color=darkgreen&amp;gt;retrieve_and_set_string_value&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; returns an &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; instance, `''&amp;lt;font color=darkgreen&amp;gt;retrieve_and_set_color_value&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; returns an &amp;lt;font color=blue&amp;gt;EV_COLOR&amp;lt;/font&amp;gt; instance, etc. These function take a &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; value and examine it to see if the &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; is a constant reference. If so then the constant value is used, else the manifest XML string data is parsed for conversion to the corresponding return type. For an example of this see `&amp;lt;font color=blue&amp;gt;GB_EV_TEXTABLE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;modify_from_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. These functions highlight a need to have the constants loaded before building of the widgets, failure to do so results in the constant value not being returned correctly.&lt;br /&gt;
&lt;br /&gt;
There are a number of situations where setting the attributes of a widget needs to be deferred. Such a case is with &amp;lt;font color=blue&amp;gt;EV_VERTICAL_BOX&amp;lt;/font&amp;gt;, where `''&amp;lt;font color=darkgreen&amp;gt;disable_item_expand&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; needs to be called after the children have been added, not before. For situations such as the one mentioned, use the `''&amp;lt;font color=darkgreen&amp;gt;deferred_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, available from &amp;lt;font color=blue&amp;gt;GB_INTERNAL_COMPONENTS&amp;lt;/font&amp;gt; and call `''&amp;lt;font color=darkgreen&amp;gt;defer_building&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; passing the current instance of a &amp;lt;font color=blue&amp;gt;GB_EV_xxx&amp;lt;/font&amp;gt; (&amp;lt;font color=blue&amp;gt;GB_EV_VERTICAL_BOX&amp;lt;/font&amp;gt; in the provided example) along with the source XML element instance. For those &amp;lt;font color=blue&amp;gt;GB_EV_xxx&amp;lt;/font&amp;gt; classes that require deferred building of their user interface, they should redefine `&amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;modify_from_xml_after_build&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, which will do what `''&amp;lt;font color=darkgreen&amp;gt;modify_from_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; should do if attribute setting were not deferred. Please note that the widget itself should be created in `''&amp;lt;font color=darkgreen&amp;gt;modify_from_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, only the setting of attributes should be deferred.&lt;br /&gt;
&lt;br /&gt;
That's it. The creation of constant, directories and window/widget objects is done while parsing. Once everything has been created the user is free to modify the widget structure and it's properties, from within EiffelBuild.&lt;br /&gt;
&lt;br /&gt;
== Code Generation ==&lt;br /&gt;
&lt;br /&gt;
Code generation begins with &amp;lt;font color=blue&amp;gt;GB_CODE_GENERATOR&amp;lt;/font&amp;gt;, the root of all Eiffel code generation for a loaded EiffelBuild project. There are two modes of generation; Full generation, supported by the `''&amp;lt;font color=darkgreen&amp;gt;generate&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; routine, which will generate the project files and Eiffel classes for the entire loaded project. Alternatively there is the `''&amp;lt;font color=darkgreen&amp;gt;generate_window&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; that can be used to generate a single top-level window/widget Eiffel class. This prevents modification or &amp;quot;touching&amp;quot; of already generated Eiffel classes.&lt;br /&gt;
&lt;br /&gt;
Eiffel code generation is not a single, but a three phase process. The first phase is to generated an intermediate, in-memory  XML representation of the project, using &amp;lt;font color=blue&amp;gt;GB_XML_STORE&amp;lt;/font&amp;gt;. The XML is generated in exactly the same way that the XML is persisted to disk when saving a project but is retained in-memory. The next phase is to take the generated XML and then create an internal data structure that is easier to read and navigate when performing actual code generation. The data structure has to be created so that any system interface that reference yet unparsed objects, further down in the XML, can be resolved before generation occurs. It solves dependencies between top-level window/widget objects. The data structure is created in `''&amp;lt;font color=darkgreen&amp;gt;parse_directories&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; and then each window/widget data structure is created in `''&amp;lt;font color=darkgreen&amp;gt;prepass_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;parse_directories&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; and `''&amp;lt;font color=darkgreen&amp;gt;prepass_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; takes a instance of &amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt;, which they will in turn modify and populate with the relevant data. `''&amp;lt;font color=darkgreen&amp;gt;parse_directories&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; uses the root node, which is available from `&amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;document_info&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, and `''&amp;lt;font color=darkgreen&amp;gt;prepass_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; uses the current generated info instance, attained from the within the structure of `''&amp;lt;font color=darkgreen&amp;gt;document_info&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. A new `&amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;document_info&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is created prior to calling `''&amp;lt;font color=darkgreen&amp;gt;prepass_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, and then is passed to `''&amp;lt;font color=darkgreen&amp;gt;prepass_xml&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;. These routines are used to populate the &amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt; data structure so that actually Eiffel code can be generated for them.&lt;br /&gt;
&lt;br /&gt;
`&amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; and `&amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;actually_name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; features require a little explanation. `''&amp;lt;font color=darkgreen&amp;gt;name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; refers to the name given to an object through the '''Object Editor''' user interface. `''&amp;lt;font color=darkgreen&amp;gt;actual_name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is name that will be generated so it can be correctly accessed in the code. Top-level widgets need to be handled specially depending on if they are being inherited, in which case `''&amp;lt;font color=darkgreen&amp;gt;actual_name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; returns an empty &amp;lt;font color=blue&amp;gt;STRING&amp;lt;/font&amp;gt; to indicate no qualified call is to be generated. If code generation generates top-level windows/widgets as clients `''&amp;lt;font color=darkgreen&amp;gt;actual_name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; will return a name to use to create a qualified access call. Finally, `''&amp;lt;font color=darkgreen&amp;gt;actual_name_for_feature_call&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; uses `''&amp;lt;font color=darkgreen&amp;gt;actual_name&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; to determine if a qualified call needs to be generated for the a top-level window/widget. `''&amp;lt;font color=darkgreen&amp;gt;actual_name_for_feature_call&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is called in all of the `''&amp;lt;font color=darkgreen&amp;gt;generated_code&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; features present in the &amp;lt;font color=blue&amp;gt;GB_EV_&amp;lt;/font&amp;gt;xxx widget adapter classes.&lt;br /&gt;
&lt;br /&gt;
Back to `&amp;lt;font color=blue&amp;gt;GB_CODE_GENERATOR&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;generate&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;: After creating the structure, in &amp;lt;font color=blue&amp;gt;GB_GENERATED_INFO&amp;lt;/font&amp;gt;, and everything else that is necessary, all of the selected project files; such as project ace files and &amp;lt;font color=blue&amp;gt;APPLICATION&amp;lt;/font&amp;gt; class(es), are generated based off of the user specified project settings. Project settings are EiffelBuild instance and project-based, that is per-instance-per-project. The generation is trivial for these peripheral files/classes, it's a simple matter of replacing token names within a template. After that the `''&amp;lt;font color=darkgreen&amp;gt;build_main_windows_implementation&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; routine is called to do the actually building of the classes to represent the project's system interface built using EiffelBuild, which is a little more complex.&lt;br /&gt;
&lt;br /&gt;
All EiffelBuild templates files are located in &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''Delivery/build/templates''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Code generation for top-level windows/widgets is based also on templates. An example is the &amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;''build_class_template_imp.e''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, located in the templates directory. The default code in there is used to handle the runtime switching of constants, supporting runtime internationalization changes. The code is littered with &amp;quot;tags&amp;quot; that look like non-well-formed XML, in that there is no ending tags. Tags are represented by &amp;lt;TAGNAME&amp;gt; and are replace by EiffelBuild. There is no &amp;quot;engine&amp;quot; to speak of that looks for the angle brackets, it's merely a simple search and replace on text. The brackets were used to prevent keyword/other text clashes within the class text and to provide a simple mechanism to replace text tokens.&lt;br /&gt;
&lt;br /&gt;
`''&amp;lt;font color=darkgreen&amp;gt;build_main_windows_implementation&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is factored down into separate code generation routines, such as `''&amp;lt;font color=darkgreen&amp;gt;generate_declarations&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt;, etc. `''&amp;lt;font color=darkgreen&amp;gt;generate_settings&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is the most interesting because it uses the same mechanism used in the '''Object Editor''' to discern what panels to create for a selected widget. For every widget a &amp;lt;font color=blue&amp;gt;GB_EV_ANY*&amp;lt;/font&amp;gt; descendent is created and initialized and the `''&amp;lt;font color=darkgreen&amp;gt;generate_code&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; is called on the created instance. This does the job of adding all of the setter calls for a widget. Again check `&amp;lt;font color=blue&amp;gt;GB_EV_SELECTABLE&amp;lt;/font&amp;gt;.''&amp;lt;font color=darkgreen&amp;gt;generate_code&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; for an example, to see the use of `''&amp;lt;font color=darkgreen&amp;gt;actual_name_for_feature_call&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; described earlier.&lt;br /&gt;
&lt;br /&gt;
=== Making Changes ===&lt;br /&gt;
&lt;br /&gt;
It is not recommended to change the code generation code unless you have a concrete understanding of how it works. If code generation needs to be modified please do the following:&lt;br /&gt;
&lt;br /&gt;
* Test generation in all client/inheritance modes.&lt;br /&gt;
* Test it again!&lt;br /&gt;
&lt;br /&gt;
=== Additional Support ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=blue&amp;gt;GB_CODE_GENERATOR&amp;lt;/font&amp;gt; could be extended to include another feature, or simply just to modify `''&amp;lt;font color=darkgreen&amp;gt;generate&amp;lt;/font&amp;gt;''&amp;lt;nowiki&amp;gt;'&amp;lt;/nowiki&amp;gt; to only generate classes that have changed. As the time stamps inside each generated class always change it is annoying for source code repositories user to have their generated classes changed when there is no need to change them.&lt;br /&gt;
&lt;br /&gt;
=== Final Word ===&lt;br /&gt;
&lt;br /&gt;
This is a high level explanation of code generation. To understand fully how the code generation process works and the three phases used in code generation (XML, data structure and then code generation) you will need to follow the code and read all of the comments.&lt;br /&gt;
&lt;br /&gt;
== EiffelVision2 Tour ==&lt;br /&gt;
&lt;br /&gt;
Be careful when modifying EiffelBuild as part of the '''Object Editor''' internals is duplicated and used in the EiffelVision2 Tour. Specifically the XML persistence and retrieval mechanism. You should cross examine the &amp;lt;font color=blue&amp;gt;GB_EV_BOX&amp;lt;/font color=blue&amp;gt;s in both EiffelBuild and EiffelVision2 Tour's code to see how they differ. This forked abstraction is to prevent the requirement of having to compile EiffelBuild in its entirety into the EiffelVision2 Tour, as we do not want to distribute the EiffelBuild code with the tour.&lt;br /&gt;
&lt;br /&gt;
== Future Additions/Changes ==&lt;br /&gt;
&lt;br /&gt;
There is a need to be able to load a single windows at a time. The problem with the current implementation is that there is no support for resolving references to other top-level widget/windows. The other issue is that EiffelBuild currently stores duplicate layout/object information about referenced top-level windows/widgets. This is not good because if the dependency is modified in any way, the window/widget that consumes the top-level window/widget needs to retrieve the changes.&lt;br /&gt;
&lt;br /&gt;
-- Place to specify submitted suggestions --&lt;/div&gt;</summary>
		<author><name>Fokou</name></author>	</entry>

	</feed>