Bug 87111 [Dialogs] Feature: add general-purpose page change notification for dialogs
New dynamic help pane attaches itself to all the dialogs that JFace provides. Some of these dialogs manage multiple pages but dynamic help has no way of registering for page change notification. Examples of dialogs that exhibit this behaviour are WizardDialog, PreferenceDialog, LaunchConfigurationDialog (in Debug), PropertiesDialog etc. Attached is the code for the following proposed enhancement: 1) A new interface 'IBaseDialogPage' that interfaces like IDialogPage and ILaunchConfigurationTab can extend 2) A class PageChangedEvent for page change notification 3) A new interface 'IPageChangeProvider' 4) A new interface 'IPageChangedListener' In the attached patch, WizardDialog and PreferenceDialog implement IPageChangeProvider and notify page changed listeners whenever current page changes. This allows dynamic help to update its content and show the relevant help for the currently selected page. Since IBaseDialogPage is now a base interface for IDialogPage, two methods (getTitle() and getControl()) are moved up from IDialogPage. This is consistent with ILaunchConfigurationTab and does not clash with any existing method.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/PreferenceDialog.java
/**
	 * Display the given error message. The currently displayed message is saved
	 * and will be redisplayed when the error message is set to
	 * <code>null</code>.
	 * 
	 * @param newErrorMessage
	 *            the errorMessage to display or <code>null</code>
	 */
	public void setErrorMessage(String newErrorMessage) {
		if (newErrorMessage == null)
			messageArea.clearErrorMessage();
		else
			messageArea.updateText(newErrorMessage, IMessageProvider.ERROR);
	}
	/**
	 * Save the last known tree width.
	 * 
	 * @param width
	 *            the width.
	 */
	private void setLastTreeWidth(int width) {
		lastTreeWidth = width;
	}
	/**
	 * Sets whether a Help button is available for this dialog.
	 * <p>
	 * Clients must call this framework method before the dialog's control has
	 * been created.
	 * <p>
	 *