platform-update-home/doc/eclipse_splash.html
Parent Directory
|
Revision Log
Revision 1.1 - (view) (download) (as text)
| 1 : | jeem | 1.1 | <html> |
| 2 : | |||
| 3 : | <head> | ||
| 4 : | <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> | ||
| 5 : | <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> | ||
| 6 : | <meta name="ProgId" content="FrontPage.Editor.Document"> | ||
| 7 : | <title>Eclipse executable launcher</title> | ||
| 8 : | </head> | ||
| 9 : | |||
| 10 : | <body> | ||
| 11 : | |||
| 12 : | <h1>Eclipse Splash Screens</h1> | ||
| 13 : | <p>Last revised 16:00 Monday May 6, 2002</p> | ||
| 14 : | <p>This note describes how splash screens work.</p> | ||
| 15 : | <h2>What product developers need to know</h2> | ||
| 16 : | <p>From the product developer's standpoint, the product owner supplies a product | ||
| 17 : | splash screen containing a color image roughly 500x330 pixels in size. This | ||
| 18 : | file, named "<code>splash.bmp</code>", lives in the plug-in for the | ||
| 19 : | product's primary feature. The file is in 24-bit color BMP format (on all operating | ||
| 20 : | environments). For internationalized applications, translated splash | ||
| 21 : | screens live in locale-specific subdirectories of the plug-in (e.g., the splash | ||
| 22 : | screen for locale code "fr_FR_EURO" is in "<code>nl/fr/FR/EURO/splash.bmp</code>") | ||
| 23 : | . For example,</p> | ||
| 24 : | <p><code><<i>install</i>>/<br> | ||
| 25 : | eclipse/<br> | ||
| 26 : | plugins/<br> | ||
| 27 : | <i>com.example.acme.acmefeature_1.0.0</i>/<br> | ||
| 28 : | splash.bmp<br> | ||
| 29 : | nl/<br> | ||
| 30 : | fr/<br> | ||
| 31 : | splash.bmp<br> | ||
| 32 : | CA/<br> | ||
| 33 : | splash.bmp<br> | ||
| 34 : | FR/<br> | ||
| 35 : | splash.bmp<br> | ||
| 36 : | EURO/<br> | ||
| 37 : | | ||
| 38 : | splash.bmp<br> | ||
| 39 : | en/<br> | ||
| 40 : | splash.bmp<br> | ||
| 41 : | US/<br> | ||
| 42 : | | ||
| 43 : | splash.bmp<br> | ||
| 44 : | </code></p> | ||
| 45 : | <p>Any of the translated splash screens can live in a fragment of the product's | ||
| 46 : | primary feature plug-in; they do not need to live in the plug-in itself. This | ||
| 47 : | allows another feature (or features) to supply translated splash screens; e.g., | ||
| 48 : | a special feature that provides a product's Asian language translations.</p> | ||
| 49 : | <p>Each version of a primary feature supplies a version of the splash screen | ||
| 50 : | file. This means that it is possible to update a product's splash screen like | ||
| 51 : | any other file in a plug-in.</p> | ||
| 52 : | <p>A product can have multiple primary features, although only one primary | ||
| 53 : | feature is in control on a given occasion of use. Each of the different primary | ||
| 54 : | features in a product has its own splash screen.</p> | ||
| 55 : | <p>A splash image is shown each time the product is launched (unless the <code>-nosplash</code> | ||
| 56 : | command line option is specified). The splash screen presented is the one for the | ||
| 57 : | controlling primary feature version, translated for the desired locale.</p> | ||
| 58 : | <h2>What product developers do not need to know</h2> | ||
| 59 : | <p><b>N.B. The details in this section are not Eclipse platform API, and may | ||
| 60 : | change over time. Things are described here only to provide a sense of what goes | ||
| 61 : | on in the wings. Product developers must not rely on anything described in this | ||
| 62 : | section.</b></p> | ||
| 63 : | <p>The product splash screen is shown to the user upon launching the program from a desktop item, menu item, or shortcut key. If there | ||
| 64 : | is more than a brief delay, the user will think the product sluggish or | ||
| 65 : | malfunctioning. Time is of the essence when getting the splash screen on the | ||
| 66 : | screen.</p> | ||
| 67 : | <p>In a naive implementation, the Eclipse platform would determine the right splash | ||
| 68 : | screen for the product being launched and locale, and show the splash | ||
| 69 : | screen to the user in a window created with SWT. Unfortunately, the complexity | ||
| 70 : | of starting up the Eclipse platform makes this approach unacceptably slow in | ||
| 71 : | getting the splash screen up. Thus we need a somewhat more sophisticated | ||
| 72 : | approach.</p> | ||
| 73 : | <p>On each occasion of running <code>eclipse.exe</code>, the following factors | ||
| 74 : | determine which splash screen to show:</p> | ||
| 75 : | <ul> | ||
| 76 : | <li>Primary feature id. Each primary features has its own splash screen. The | ||
| 77 : | primary feature is given either by the <code>-feature</code> | ||
| 78 : | command line option, or defaults to a choice recorded in the workspace (<code><<i>workspace</i>>/.metadata/.config/platform.cfg</code>), | ||
| 79 : | or in <code><<i>install</i>>/eclipse/.config/platform.cfg</code> if this is | ||
| 80 : | the first time for this workspace.</li> | ||
| 81 : | <li>Primary feature version. Each primary features version has its own splash | ||
| 82 : | screen. The version to be used is recorded in in the workspace (<code><<i>workspace</i>>/.metadata/.config/platform.cfg</code>), | ||
| 83 : | or in <code><<i>install</i>>/eclipse/.config/platform.cfg</code> if this is | ||
| 84 : | the first time for this workspace.</li> | ||
| 85 : | <li>Locale. Each splash screen may exist in translation. The locale is given either by the <code>-nl</code> command line option, | ||
| 86 : | or obtained directly from the operating system.</li> | ||
| 87 : | </ul> | ||
| 88 : | <p>Because of this complexity is determining which splash screen to show, the | ||
| 89 : | responsibilities are divided as follows:</p> | ||
| 90 : | <ul> | ||
| 91 : | <li>Eclipse itself (BootLoader) is responsible for | ||
| 92 : | determining the full path of the splash screen file and requesting the Eclipse executable launcher | ||
| 93 : | to show it. This is done by analyzing command line arguments and reading the | ||
| 94 : | configuration files in the install or the workspace.</li> | ||
| 95 : | <li>The Eclipse executable launcher is responsible for displaying the | ||
| 96 : | specified splash screen to the user. The Eclipse executable launcher passes | ||
| 97 : | a "show" command to Main; Main calls it with the path of the | ||
| 98 : | appropriate splash file and and holds onto the process object reference. The | ||
| 99 : | process puts up a window with the splash image in it. Since the full path of the splash screen file is | ||
| 100 : | passed as a parameter, the Eclipse executable launcher can remain completely | ||
| 101 : | ignorant of the existence of a splash screen cache and of locale-specific | ||
| 102 : | concerns. If the Eclipse executable launcher is unable to find or read the | ||
| 103 : | requested splash screen file, the launch simply proceeds without showing any | ||
| 104 : | splash screen.</li> | ||
| 105 : | <li>Eclipse itself (Main, Workbench, and BootLoader) is responsible for | ||
| 106 : | deciding when to stop showing the splash screen. As soon as the workbench window has been displayed to the | ||
| 107 : | user, the workbench tells Main to take down the splash screen, which it does | ||
| 108 : | by destroying the process it spawned. If there are any problems with taking | ||
| 109 : | down the splash screen, the launch simply proceeds as if no splash screen | ||
| 110 : | had been shown.</li> | ||
| 111 : | </ul> | ||
| 112 : | <p>When the Eclipse platform formulates a configuration file (<code>platform.cfg</code>), it computes and stores the mapping | ||
| 113 : | from primary feature version and known locale to splash file path. Splash file | ||
| 114 : | paths are stored in install-relative form to ensure they are usable by any user | ||
| 115 : | that locates the install. The absolute file path of the correct splash screen | ||
| 116 : | must be determined quickly so that the splash screen can be displayed to the | ||
| 117 : | user without further delay. The ability to properly resolve arbitrary plug-in | ||
| 118 : | relative paths only becomes available once the plug-in registry has been built; | ||
| 119 : | however, by that time the Eclipse platform is almost up and running, and the | ||
| 120 : | splash screen is already too late. For splash screen purposes, splash file paths | ||
| 121 : | are resolved by prefixing them with <code><<i>install</i>>/eclipse/plugins</code>/. | ||
| 122 : | This works for all splash screens within plug-ins and fragments located within | ||
| 123 : | the product's install directory, which is most of the time. However, it fails to | ||
| 124 : | find splash screens located in another local site, such as an extension.</p> | ||
| 125 : | |||
| 126 : | <p>The very first time the Eclipse platform is launched with a new workspace, | ||
| 127 : | there is no <code>platform.cfg</code> (unless there is a pre-computed default | ||
| 128 : | one stored with the install), and it will take several seconds to compute one. | ||
| 129 : | Until it does, it won't know the correct splash screen. So it immediately | ||
| 130 : | displays an interim splash screen (a plain canned image that reads | ||
| 131 : | "Completing the install. Please wait...") and goes about its business. | ||
| 132 : | When it is done, it takes down the splash screen and does an exit-with-relaunch; | ||
| 133 : | the product now starts with the newly-computed <code>platform.cfg</code> telling it exactly where | ||
| 134 : | to find the correct splash screen. The same holds true for subsequent launches. | ||
| 135 : | This special splash screen and all its translations are in the <code>org.eclipse.core.boot</code> | ||
| 136 : | plug-in (to simplify the implementation, we do <i>not</i> look in fragments).</p> | ||
| 137 : | |||
| 138 : | </body> | ||
| 139 : | |||
| 140 : | </html> |
| help@eclipse.org | ViewVC Help |
| Powered by ViewVC 1.0.3 |
