public boolean performFinish() {
page.setErrorMessage(null);
final IStatus[] result = new IStatus[1];
IRunnableWithProgress runnable = null;
page.setMessage(Messages.MappedURLsWizard_TEXT_UPDATE_URL);
// If the app module is not deployed, set the URIs in the deployment
// descriptor.
if (!applicationModule.isDeployed()) {
runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
try {
DeploymentInfoWorkingCopy wc = applicationModule.resolveDeploymentInfoWorkingCopy(monitor);
wc.setUris(page.getURLs());
wc.save();
}
catch (CoreException e) {
result[0] = e.getStatus();
}
}
};
}
else {
runnable = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) {
try {
cloudServer.getBehaviour().updateApplicationUrls(appName, page.getURLs(), monitor);
}
catch (CoreException e) {