use of org.eclipse.equinox.internal.p2.ui.model.IUElementListRoot in project translationstudio8 by heartsome.
the class UpdateWizard method initializeResolutionModelElements.
protected void initializeResolutionModelElements(Object[] selectedElements) {
root = new IUElementListRoot();
ArrayList<AvailableUpdateElement> list = new ArrayList<AvailableUpdateElement>(selectedElements.length);
for (int i = 0; i < selectedElements.length; i++) {
if (selectedElements[i] instanceof AvailableUpdateElement) {
AvailableUpdateElement element = (AvailableUpdateElement) selectedElements[i];
AvailableUpdateElement newElement = new AvailableUpdateElement(root, element.getIU(), element.getIUToBeUpdated(), getProfileId(), shouldShowProvisioningPlanChildren());
list.add(newElement);
} else if (selectedElements[i] instanceof Update) {
Update update = (Update) selectedElements[i];
AvailableUpdateElement newElement = new AvailableUpdateElement(root, update.replacement, update.toUpdate, getProfileId(), shouldShowProvisioningPlanChildren());
list.add(newElement);
}
}
root.setChildren(list.toArray());
}
Aggregations