use of com.twinsoft.convertigo.eclipse.dialogs.ProjectDeployDialog in project convertigo by convertigo.
the class ProjectDeployAction method run.
public void run() {
Display display = Display.getDefault();
Cursor waitCursor = new Cursor(display, SWT.CURSOR_WAIT);
Shell shell = getParentShell();
shell.setCursor(waitCursor);
try {
ProjectExplorerView explorerView = getProjectExplorerView();
if (explorerView != null) {
ProjectTreeObject projectTreeObject = (ProjectTreeObject) explorerView.getFirstSelectedTreeObject();
Project project = projectTreeObject.getObject();
if (projectTreeObject.hasChanged() && !projectTreeObject.save(true)) {
return;
}
ArchiveExportOptionDialog dlg = new ArchiveExportOptionDialog(shell, project, true);
if (dlg.open() != Window.OK) {
return;
}
if (!dlg.getVersion().equals(project.getVersion())) {
project.setVersion(dlg.getVersion());
project.hasChanged = true;
projectTreeObject.save(false);
}
explorerView.refreshTreeObject(projectTreeObject);
ProjectDeployDialog projectDeployDialog = new ProjectDeployDialog(shell, project, dlg.getArchiveExportOptions());
projectDeployDialog.open();
}
} catch (Throwable e) {
ConvertigoPlugin.logException(e, "Unable to deploy the project!");
} finally {
shell.setCursor(null);
waitCursor.dispose();
}
}
Aggregations