Example usage for org.eclipse.jface.wizard WizardPage getWizard

List of usage examples for org.eclipse.jface.wizard WizardPage getWizard

Introduction

In this page you can find the example usage for org.eclipse.jface.wizard WizardPage getWizard.

Prototype

@Override
    public IWizard getWizard() 

Source Link

Usage

From source file:cn.dockerfoundry.ide.eclipse.server.ui.internal.DockerFoundryCredentialsPart.java

License:Open Source License

public DockerFoundryCredentialsPart(DockerFoundryServer cfServer, WizardPage wizardPage) {
    this(cfServer);

    if (wizardPage != null) {
        wizardPage.setTitle(NLS.bind(Messages.DockerFoundryCredentialsPart_TEXT_CREDENTIAL_WIZ_TITLE, service));
        wizardPage.setDescription(Messages.SERVER_WIZARD_VALIDATOR_CLICK_TO_VALIDATE);
        ImageDescriptor banner = DockerFoundryImages.getWizardBanner(serverTypeId);
        if (banner != null) {
            wizardPage.setImageDescriptor(banner);
        }/*from  w  w w  .ja  v a 2s .  com*/
        runnableContext = wizardPage.getWizard() != null && wizardPage.getWizard().getContainer() != null
                ? wizardPage.getWizard().getContainer()
                : null;
    }
}

From source file:com.rcpcompany.uibindings.internal.BindingContextImpl.java

License:Open Source License

/**
 * Sets the top-level element for the context to the specified wizard page.
 * //from  w  w w. j ava 2  s .  c  o m
 * @param page the wizard page
 */
protected void setTop(final WizardPage page) {
    myContextMessageDecoratorAdapter = new WizardPageContextMessageDecoratorAdapter(page);
    setTextCommitStrategy(TextCommitStrategy.ON_MODIFY);
    final Shell shell = page.getWizard().getContainer().getShell();
    myFormReflow = new IFormReflow() {
        @Override
        public void reflow() {
            if (page.getControl() == null)
                return;
            IManagerRunnable.Factory.asyncExec("reflow", page.getControl(), new Runnable() {
                @Override
                public void run() {
                    final Control control = page.getControl();
                    if (control == null || control.isDisposed())
                        return;
                    final Composite c = control.getParent();
                    if (c.isDisposed())
                        return;
                    c.layout(true, true);
                }
            });
        }
    };

    setTop(shell);
}

From source file:com.siteview.mde.ui.templates.OptionTemplateSection.java

License:Open Source License

/**
 * Resets the current page state by clearing the error message and making
 * the page complete, thereby allowing users to flip to the next page.
 *///  ww  w .  j  a v a2s  .c o m
protected void resetPageState() {
    if (pages.size() == 0)
        return;
    WizardPage firstPage = ((TemplatePage) pages.get(0)).page;
    IWizardContainer container = firstPage.getWizard().getContainer();
    WizardPage currentPage = (WizardPage) container.getCurrentPage();
    currentPage.setErrorMessage(null);
    currentPage.setPageComplete(true);
}

From source file:com.twinsoft.convertigo.eclipse.wizards.new_project.NewProjectWizardComposite10.java

License:Open Source License

public NewProjectWizardComposite10(Composite parent, int style, WizardPage page) {
    super(parent, style);
    this.parentWizard = page;
    this.templateId = ((NewProjectWizard) page.getWizard()).templateId;
    initialize();/*w  ww . j  av  a 2 s. co  m*/
}

From source file:fr.inria.diverse.commons.eclipse.pde.wizards.pages.pde.ui.templates.OptionTemplateSection.java

License:Open Source License

/**
 * Resets the current page state by clearing the error message and making
 * the page complete, thereby allowing users to flip to the next page.
 *//*from  ww w  . jav a 2s.  c  o  m*/
protected void resetPageState() {
    if (pages.size() == 0)
        return;
    WizardPage firstPage = pages.get(0).page;
    IWizardContainer container = firstPage.getWizard().getContainer();
    WizardPage currentPage = (WizardPage) container.getCurrentPage();
    currentPage.setErrorMessage(null);
    currentPage.setPageComplete(true);
}

From source file:org.cloudfoundry.ide.eclipse.server.ui.internal.CloudFoundryCredentialsPart.java

License:Open Source License

public CloudFoundryCredentialsPart(CloudFoundryServer cfServer, WizardPage wizardPage) {
    this(cfServer);

    if (wizardPage != null) {
        wizardPage.setTitle(NLS.bind(Messages.CloudFoundryCredentialsPart_TEXT_CREDENTIAL_WIZ_TITLE, service));
        wizardPage.setDescription(Messages.SERVER_WIZARD_VALIDATOR_CLICK_TO_VALIDATE);
        ImageDescriptor banner = CloudFoundryImages.getWizardBanner(serverTypeId);
        if (banner != null) {
            wizardPage.setImageDescriptor(banner);
        }// w w  w .  ja v a 2  s  .  c o  m
        runnableContext = wizardPage.getWizard() != null && wizardPage.getWizard().getContainer() != null
                ? wizardPage.getWizard().getContainer()
                : null;
    }
}

From source file:org.jboss.tools.openshift.internal.ui.server.WizardHandleAwareFragment.java

License:Open Source License

/**
 * Helper method to extract wizard container from the handle.
 * May return null, if composite is not yet created or if wizard is disposed.
 *
 * @return/*from  ww  w.j a v a2 s .com*/
 */
protected IWizardContainer getWizardContainer() {
    if (!(handle instanceof WizardPage)) {
        return null;
    }
    WizardPage page = (WizardPage) handle;
    if (page.getShell() == null || page.getShell().isDisposed()) {
        return null;
    }
    IWizard wizard = page.getWizard();
    return (wizard == null) ? null : wizard.getContainer();
}

From source file:org.talend.repository.nosql.db.ui.neo4j.Neo4jSchemaForm.java

License:Open Source License

@Override
public void processWhenShowPage(WizardPage page) {
    super.processWhenShowPage(page);
    if (!creation) {
        return;//  w  w  w .ja va  2  s .c  om
    }
    try {
        page.getWizard().getContainer().run(true, true, new IRunnableWithProgress() {

            @Override
            public void run(final IProgressMonitor monitor)
                    throws InvocationTargetException, InterruptedException {
                PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {

                    @Override
                    public void run() {
                        try {
                            monitor.beginTask(Messages.getString("Neo4jSchemaForm.cypher.genSchema"), //$NON-NLS-1$
                                    IProgressMonitor.UNKNOWN);
                            generateSchema();
                            initializeForm();
                        } catch (Exception e) {
                            updateStatus(IStatus.ERROR, Messages.getString("RetrieveSchema.status.fail")); //$NON-NLS-1$
                            ExceptionHandler.process(e);
                        } finally {
                            monitor.done();
                        }
                    }
                });
            }

        });
    } catch (Exception e) {
        ExceptionHandler.process(e);
    }
}