use of com.liferay.ide.project.ui.wizard.WorkingSetCustomPart 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);
}
}
}
}
}
Aggregations