[Esbox-commits] r2117 - in branches/work_Ed: org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware
eswartz at garage.maemo.org
eswartz at garage.maemo.org
Tue Sep 8 16:21:27 EEST 2009
Author: eswartz
Date: 2009-09-08 16:21:26 +0300 (Tue, 08 Sep 2009)
New Revision: 2117
Modified:
branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java
branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java
branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java
Log:
Merge revs 2110,2112 from trunk
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java 2009-09-08 12:55:52 UTC (rev 2116)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java 2009-09-08 13:21:26 UTC (rev 2117)
@@ -24,7 +24,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -74,6 +73,8 @@
private Scratchbox1InstallerWorkPage workPage;
private boolean canFinish =false;
+
+ private boolean success = false;
/**
* Constructs a new target wizard for the given SDK (from the target
@@ -92,6 +93,13 @@
}
/**
+ * @return the success
+ */
+ public boolean isSuccess() {
+ return success;
+ }
+
+ /**
* Constructs a new target wizard for the given SDK (from the target
* configuration page).
*
@@ -186,7 +194,7 @@
patchAutotools();
doReboot();
}
-
+ this.success = installedNew;
return goOn;
}
@@ -321,8 +329,8 @@
Shell parent = activeWorkbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
- int result = dialog.open();
- if (result == Window.CANCEL)
+ dialog.open();
+ if (!wizard.isSuccess())
return Activator.createStatus(IStatus.CANCEL, "Scratchbox 1 SDK installation was canceled");
else
return Activator.createStatus(IStatus.OK, "Scratchbox 1 SDK has finished");
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java 2009-09-08 12:55:52 UTC (rev 2116)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java 2009-09-08 13:21:26 UTC (rev 2117)
@@ -21,7 +21,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -64,6 +63,8 @@
private Scratchbox1InstallerWorkPage workPage;
private boolean suppressNokiaBinariesWizard;
+
+ private boolean success;
/**
* Constructs a new target wizard.
@@ -77,6 +78,13 @@
this.buildMachine = buildMachines[0];
initialize();
}
+
+ /**
+ * @return the success
+ */
+ public boolean isSuccess() {
+ return success;
+ }
/**
* Control whether this wizard will ask the user to install the Nokia Binaries
@@ -173,6 +181,7 @@
promptInstallNokiaBinaries(false);
}
+ this.success = success;
return goOn;
}
@@ -273,8 +282,8 @@
Shell parent = activeWorkbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
- int result = dialog.open();
- if (result == Window.CANCEL)
+ dialog.open();
+ if (!wizard.isSuccess())
return Activator.createStatus(IStatus.CANCEL, "Scratchbox 1 target installation was canceled");
// now install Nokia binaries synchronously
Modified: branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java 2009-09-08 12:55:52 UTC (rev 2116)
+++ branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMDownloader.java 2009-09-08 13:21:26 UTC (rev 2117)
@@ -304,8 +304,10 @@
downloadFile.setDownloadedSize(getPreviousDownloadSize(fileName));
Integer remoteFileSize = (Integer) remoteFileInfo.get(1);
- if (downloadFile.getDownloadedSize() == remoteFileSize.intValue())
+ if (downloadFile.getDownloadedSize() == remoteFileSize.intValue()){
+ downloadFile.complete();
return Activator.createStatus(Status.OK, "Maemo SDK virtual image is already downloaded.");
+ }
HttpURLConnection connection = null;
RandomFileOutputStream out = null;
More information about the Esbox-commits
mailing list