/*******************************************************************************
* Copyright (c) 2009, 2010 Innovation Gate GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Innovation Gate GmbH - initial API and implementation
******************************************************************************/
package de.innovationgate.eclipse.utils.ui;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
public abstract class ValidatedMultiPageWizard extends Wizard implements INewWizard {
@Override
public boolean canFinish() {
boolean result = super.canFinish();
if (result) {
IWizardPage current = getContainer().getCurrentPage();
IWizardPage last = getPages()[getPages().length - 1];
if (current.equals(last)) {
return true;
}
}
return false;
}
}