use of org.eclipse.wst.server.discovery.ExtensionWizard in project webtools.servertools by eclipse.
the class ExtensionWizardPage method handleSelection.
protected void handleSelection(Extension sel) {
extension = sel;
if (extension == null)
licensePage.updateForPlan(new IInstallableUnit[0], null);
else {
try {
getContainer().run(true, true, new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
final IProvisioningPlan plan = extension.getProvisioningPlan(true, monitor);
if (plan != null && plan.getStatus().isOK()) {
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
licensePage.updateForPlan(extension.getIUs(), plan);
nextPage = licensePage;
((ExtensionWizard) getWizard()).setSecondPage(nextPage);
}
});
} else {
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
errorPage.setStatus(plan.getStatus());
}
});
nextPage = errorPage;
((ExtensionWizard) getWizard()).setSecondPage(nextPage);
}
monitor.done();
}
});
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error verifying license", e);
}
}
setPageComplete(extension != null);
}
Aggregations