}
protected void prepareResultsViewComposite(DeploymentResultsComposite resultsComposite,
DeploymentController deploymentWizardController) {
DeploymentResult deploymentResult = deploymentWizardController.getDeploymentResult();
if (deploymentResult == null) {
logger.warn(DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.message"));
Utils.openQuestion(DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.title"),
DeploymentMessages.getString("DeploymentWizard.BaseDeploymentPage.NoResults.message"));
return;
}
// set page description
resultsComposite.setLblResult(deploymentResult.isSuccess());
DeployResultExt result = deploymentResult.getDeployResultHandler();
if (!deploymentResult.isSuccess()) {
if (result != null && result.getMessageCount() == 0) {
resultsComposite.setLblReason(result.getMessageHandler().getDisplayMessages()[0]);
} else if (result != null && result.getMessageCount() > 1) {
resultsComposite.setLblReason(DeploymentMessages
.getString("DeploymentWizard.Results.MultipleProblems.message"));
}
} else {
resultsComposite.setLblReason(DeploymentMessages.getString("DeploymentWizard.Results.Success.message"));
}
// create results tree
DeployResultsViewAssembler assembler =
new DeployResultsViewAssembler(result == null ? new EmptyDeployResultExt() : result, resultsComposite
.getTreeResults(), deploymentWizardController.getProject(), ContainerDelegate.getInstance().getServiceLocator().getProjectService());
assembler.assembleDeployResultsTree();
LogViewShell logView =
new LogViewShell(getShell(), deploymentResult.getDeployLog(), deploymentResult.getRemoteDeployLog(),
deploymentWizardController.getDeploymentWizardModel().getProjectName());
resultsComposite.setLogShellView(logView);
}