Search in sources :

Example 1 with WizardPagePart

use of org.eclipse.sapphire.ui.forms.WizardPagePart in project liferay-ide by liferay.

the class BaseProjectWizard method addToWorkingSets.

protected void addToWorkingSets(IProject newProject) throws Exception {
    if (newProject != null) {
        List<WizardPagePart> wizardPages = part().getPages();
        WizardPagePart wizardPagePart = wizardPages.get(0);
        for (final FormComponentPart formPart : wizardPagePart.children().all()) {
            if (formPart instanceof WorkingSetCustomPart) {
                final WorkingSetCustomPart workingSetPart = (WorkingSetCustomPart) formPart;
                final IWorkingSet[] workingSets = workingSetPart.getWorkingSets();
                if (ListUtil.isNotEmpty(workingSets)) {
                    IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
                    workingSetManager.addToWorkingSets(newProject, workingSets);
                }
            }
        }
    }
}
Also used : FormComponentPart(org.eclipse.sapphire.ui.forms.FormComponentPart) IWorkingSetManager(org.eclipse.ui.IWorkingSetManager) WorkingSetCustomPart(com.liferay.ide.project.ui.wizard.WorkingSetCustomPart) WizardPagePart(org.eclipse.sapphire.ui.forms.WizardPagePart) IWorkingSet(org.eclipse.ui.IWorkingSet)

Aggregations

WorkingSetCustomPart (com.liferay.ide.project.ui.wizard.WorkingSetCustomPart)1 FormComponentPart (org.eclipse.sapphire.ui.forms.FormComponentPart)1 WizardPagePart (org.eclipse.sapphire.ui.forms.WizardPagePart)1 IWorkingSet (org.eclipse.ui.IWorkingSet)1 IWorkingSetManager (org.eclipse.ui.IWorkingSetManager)1