Customizing a product

There are many customizable aspects of a product, such as its splash screen, about dialog text, window icons, etc. Most of these customizations are defined in the contribution to the org.eclipse.core.runtime.products extension point.

Let's look at how some of the more common customizable elements are defined.

About dialogs

The platform "about" dialog is shown whenever the user selects Customizing a product_自定义产品 Help > About in the workbench menu.  

Customizing a product_自定义产品_02

The upper part of the about dialog shows product level information while the lower part details the features (if any) and plug-ins installed.  The feature details (branding if you will) are supplied using about.ini, about.properties and about.html files in the plug-in associated with the feature.  This information is displayed when the user requests feature details and selects a particular feature.

The product branding (top half of the dialog) is specify by extension properties that describe the text and p_w_picpaths that are shown in this dialog. For example, the following extract from the Eclipse Platform product declaration.

	<property
		name="aboutText"
		value="%aboutText"/>
	<property
		name="aboutImage"
		value="icons/eclipse_lg.png"/>
	</product>
  • aboutText specifies the text to show in the about dialog
  • aboutImage specifies an p_w_picpath that should be used in the about dialog. Large p_w_picpaths will be shown by themselves, and smaller p_w_picpaths will be shown along with the about text.

See IProductConstants for more information about these properties.

Window p_w_picpaths

A 16x16 pixel color p_w_picpath can be used to brand windows created by the product.  It will appear in the upper left hand corner of product windows.  It is specified in the windowImage attribute in the products extension definition. Alternatively, thewindowImages attribute can be used to describe an array of p_w_picpaths of different sizes that should be used in the upper left hand corner.

	<property
		name="windowImages"
		value="icons/eclipse.png,icons/eclipse32.png"/>

The windowImages property supercedes the windowImage property if both are specified.

Welcome page

Products using the Eclipse 2.1 welcome page mechanism can specify the name and location of their welcome page file in thewelcomePage property.

	<property
		name="welcomePage"
		value="$nl$/welcome.xml"/>

Use of this property is now discouraged in favor of the org.eclipse.ui.intro extension point. See Welcome/Intro support for more detail about the new welcome/intro mechanisms.

Preferences defaults

The preferenceCustomization property can be used to specify a file containing default preference values for the product.

	<property
		name="preferenceCustomization"
		value="plugin_customization.ini"/>

This file is a java.io.Properties format file. Typically this file is used to set the values for preferences that are published as part of a plug-in's public API.  That is, you are taking a risk if you refer to preferences that are used by plug-ins but not defined formally in the API.  

Splash screens

The product splash screen is specified in the config.ini which is located underneath the product's configuration directory. Theosgi.splashPath property in this file describes places to search for a file called splash.bmp. The osgi.splashLocation property identifes a complete and exact path to the splash screen file to use. Specifying a splash path allows for locale specific splash screens to be used as the given search path can indicate several plug-ins or fragments to search as well as $nl$ style paths. See the platform SDK's config.ini file for a complete description of properties that can be configured in this file. The p_w_picpath should be supplied in 24-bit color BMP format (RGB format) and should be approximately 500x330 pixels in size.

The location, size, and color of the progress bar and progress message shown in the splash screen during startup can be configured using the properties startupProgressRect, startupMessageRect, and startupForegroundColor. See IProductConstants for more information about these properties. Note that by default, no progress will be reported at startup. To enable startup progress reporting, set the following preference to true, for example in the preference customization file:IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP