Example usage for org.eclipse.jface.wizard WizardDialog removePageChangingListener

List of usage examples for org.eclipse.jface.wizard WizardDialog removePageChangingListener

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard WizardDialog removePageChangingListener.

Prototype

public void removePageChangingListener(IPageChangingListener listener) 

Source Link

Document

Removes the provided page changing listener from the list of page changing listeners registered for the dialog.

Usage

From source file:org.eclipse.acceleo.internal.ide.ui.wizards.newfile.AcceleoNewTemplatesWizard.java

License:Open Source License

/**
 * {@inheritDoc}/*from w w  w.  j av a  2s.c  o m*/
 * 
 * @see org.eclipse.jface.wizard.Wizard#dispose()
 */
@Override
public void dispose() {
    if (pageChangingListener != null && getContainer() instanceof WizardDialog) {
        WizardDialog dialog = (WizardDialog) getContainer();
        dialog.removePageChangingListener(pageChangingListener);
    }
    super.dispose();
}

From source file:org.kalypso.ui.layoutwizard.LayoutWizardActivationHandler.java

License:Open Source License

private void unhookWizard(final IWizard oldWizard) {
    if (oldWizard == null)
        return;/*from w w  w .j  a v a 2 s.  c  o  m*/

    final ICommandService cmdService = (ICommandService) m_page.getWizardContext()
            .getService(ICommandService.class);
    if (cmdService != null)
        cmdService.removeExecutionListener(m_cmdExecutionListener);

    final IWizardContainer container = oldWizard.getContainer();
    if (container instanceof WizardView) {
        final WizardView view = (WizardView) container;
        view.removePageChangingListener(m_pageChangingListener);
        view.removePageChangedListener(m_pageChangedListener);
    } else if (container instanceof WizardDialog) {
        final WizardDialog dialog = (WizardDialog) container;
        dialog.removePageChangingListener(m_pageChangingListener);
        dialog.removePageChangedListener(m_pageChangedListener);
    }
}