Bug 299152 [Forms] FormEditor isDirty() should consider FormEditor pages
Build Identifier: M20090917-0800 FormEditor's isDirty() method checks all of the IFormPage children and returns dirty if any of them are dirty. Since a FormEditor can contain other FormEditors as pages the isDirty method should return dirty if a child FormEditor is dirty. Reproducible: Always
bundles/org.eclipse.ui.forms/src/org/eclipse/ui/forms/editor/FormEditor.java
* be called as a first step of a 'save' operation.
	 * @param onSave <code>true</code> if commit is performed as part
	 * of the 'save' operation, <code>false</code> otherwise.
	 * @since 3.3
	 */
	protected void commitPages(boolean onSave) {
		if (pages != null) {
			for (int i = 0; i < pages.size(); i++) {
				Object page = pages.get(i);
				if (page instanceof IFormPage) {
					IFormPage fpage = (IFormPage)page;
					IManagedForm mform = fpage.getManagedForm();
					if (mform != null && mform.isDirty())
						mform.commit(onSave);
				}
			}
		}	
	}
	/**
	 * Adds a complete editor part to the multi-page editor.
	 * 
	 * @see MultiPageEditorPart#addPage(IEditorPart, IEditorInput)
	 */
	public int addPage(IEditorPart editor, IEditorInput input)
			throws PartInitException {
		int index = super.addPage(editor, input);
		if (editor instanceof IFormPage)
			configurePage(index, (IFormPage) editor);
		else
			registerPage(-1, editor);