Example usage for org.eclipse.jface.wizard Wizard getContainer

List of usage examples for org.eclipse.jface.wizard Wizard getContainer

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard Wizard getContainer.

Prototype

@Override
    public IWizardContainer getContainer() 

Source Link

Usage

From source file:com.sap.furcas.ide.projectwizard.wizards.LoadPage.java

License:Open Source License

/**
 * Gets called when the URI textfield changes to check the input for mistakes and trim it.
 *//*from ww  w .  j  av  a  2 s.c  o  m*/
protected void dialogChanged() {
    String text = uriField.getText();
    text = text.trim();
    if (!text.endsWith(".ecore")) {
        setPageComplete(false);
    } else {
        setPageComplete(true);
        getNextPage();
    }
    if (!uriField.getText().matches(text)) {
        uriField.setText(text);
    }
    Wizard supWizard = (Wizard) wizard;
    supWizard.getContainer().updateButtons();
    if (getNextPage() != null) {
        getNextPage().setTreeInput(geteP());
    }
}

From source file:org.eclipse.epf.export.wizards.DestinationCommonPage.java

License:Open Source License

/**
 * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event)
 *///from   w  ww  . ja  v  a2s .co m
public void handleEvent(Event event) {
    Wizard wizard = (Wizard) getWizard();
    setPageComplete(isPageComplete());
    wizard.getContainer().updateButtons();
}

From source file:org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.ConditionHelpers.java

License:Open Source License

/**
 * Is the wizard on the page you want?/*w  ww  .  j  a va 2s .c o m*/
 *
 * @param wizard
 *            wizard
 * @param page
 *            the desired page
 * @return true or false
 */
public static ICondition isWizardOnPage(final Wizard wizard, final IWizardPage page) {
    return new SWTBotTestCondition() {
        @Override
        public boolean test() throws Exception {
            if (wizard == null || page == null) {
                return false;
            }
            final IWizardContainer container = wizard.getContainer();
            if (container == null) {
                return false;
            }
            IWizardPage currentPage = container.getCurrentPage();
            return page.equals(currentPage);
        }
    };
}