[Esbox-commits] r2326 - in branches/work_Andre: org.maemo.esbox.help org.maemo.esbox.help/html org.maemo.esbox.help/html/context_help org.maemo.esbox.help/html/tasks org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard org.maemo.esbox.vm/conf org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/preferences org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards

andregomes at garage.maemo.org andregomes at garage.maemo.org
Mon Oct 19 23:25:49 EEST 2009


Author: andregomes
Date: 2009-10-19 23:25:46 +0300 (Mon, 19 Oct 2009)
New Revision: 2326

Added:
   branches/work_Andre/org.maemo.esbox.help/html/tasks/SettingUpSharedFolders.html
Modified:
   branches/work_Andre/org.maemo.esbox.help/html/context_help/esbox_dialogs_help.xml
   branches/work_Andre/org.maemo.esbox.help/html/tocgettingstarted.html
   branches/work_Andre/org.maemo.esbox.help/html/toctasks.html
   branches/work_Andre/org.maemo.esbox.help/toctasks.xml
   branches/work_Andre/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/ILaunchableMachineController.java
   branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/BuildMachinePreferencePage.java
   branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTreeViewer.java
   branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFoldersPreferencePage.java
   branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/ValidateMachineRunner.java
   branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java
   branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1SDKInstallerDataContentLabelProvider.java
   branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerDataContentLabelProvider.java
   branches/work_Andre/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuMachineController.java
   branches/work_Andre/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxMachineController.java
   branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineController.java
   branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareSettingsPreferencePage.java
   branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java
   branches/work_Andre/org.maemo.esbox.vm/conf/vm_prefs.xml
   branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java
   branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/preferences/AddressFieldEditor.java
Log:
Merging with trunk rev2324.

Modified: branches/work_Andre/org.maemo.esbox.help/html/context_help/esbox_dialogs_help.xml
===================================================================
--- branches/work_Andre/org.maemo.esbox.help/html/context_help/esbox_dialogs_help.xml	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.help/html/context_help/esbox_dialogs_help.xml	2009-10-19 20:25:46 UTC (rev 2326)
@@ -12,11 +12,15 @@
     <!-- PLUGIN: org.maemo.esbox.maemosdk.ui -->
 	<!-- ESbox preferences -->
 	<context id="global_pref_esbox_buildmachines" >
-		<description>Select the build machine for ESbox.</description>
+		<description>Configure the build machine or virtual machine for ESbox.</description>
 		<topic label="Build Machines"  		href="html/tasks/SettingPreferences.xhtml#build_machines" />
- 		 <topic href="html/tasks/UsingVirtualMachines.html" label="Using Virtual Machines with ESbox"/>
 	</context>
 
+	<context id="global_pref_esbox_sharedfolders" >
+		<description>Shared folders in ESbox</description>
+		<topic label="Setting Up Shared Folders"  		href="html/tasks/SettingUpSharedFolders.html" />
+	</context>
+
 	<context id="global_pref_esbox_xserver" >
 		<description>Display settings for X server</description>
 		<topic label="X server"	  href="html/tasks/SettingPreferences.xhtml#x_server" />

Copied: branches/work_Andre/org.maemo.esbox.help/html/tasks/SettingUpSharedFolders.html (from rev 2325, trunk/org.maemo.esbox.help/html/tasks/SettingUpSharedFolders.html)
===================================================================
--- branches/work_Andre/org.maemo.esbox.help/html/tasks/SettingUpSharedFolders.html	                        (rev 0)
+++ branches/work_Andre/org.maemo.esbox.help/html/tasks/SettingUpSharedFolders.html	2009-10-19 20:25:46 UTC (rev 2326)
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<html><head>
+  <title>Setting Up Shared Folders</title>
+</head><body>
+
+<iframe src="http://esbox.garage.maemo.org/2nd_edition/shared_folders.html" align="left"
+ height="100%" width="100%">
+<a href="http://esbox.garage.maemo.org/2nd_edition/shared_folders.html">Visit
+the current documentation online.</a>
+</iframe>
+
+
+
+</body></html>
\ No newline at end of file

Modified: branches/work_Andre/org.maemo.esbox.help/html/tocgettingstarted.html
===================================================================
--- branches/work_Andre/org.maemo.esbox.help/html/tocgettingstarted.html	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.help/html/tocgettingstarted.html	2009-10-19 20:25:46 UTC (rev 2326)
@@ -15,8 +15,10 @@
 <ul>
 <li><h3>Installation and Setup</h3>
 <ul>
-<li><a href="../html/tasks/UsingVirtualMachines.html">Running ESbox on Virtual Machine</a>
+<li><a href="../html/tasks/UsingVirtualMachines.html">Running ESbox on a Virtual Machine</a>
 </li>
+<li><a href="../html/tasks/SettingUpSharedFolders.html">Setting Up Shared Folders</a>
+</li>
 <li><a href="../html/tasks/InstallingScratchbox1.html">Installing Scratchbox 1</a>
 </li>
 <li><a href="../html/tasks/InstallingScratchbox1Targets.html">Installing Scratchbox 1 Targets</a>

Modified: branches/work_Andre/org.maemo.esbox.help/html/toctasks.html
===================================================================
--- branches/work_Andre/org.maemo.esbox.help/html/toctasks.html	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.help/html/toctasks.html	2009-10-19 20:25:46 UTC (rev 2326)
@@ -14,6 +14,7 @@
 <h2>Tasks</h2>
 <ul>
 <li><h3><a href="../html/tasks/UsingVirtualMachines.html">Using ESbox with Virtual Machines</a>
+<h3><a href="../html/tasks/SettingUpSharedFolders.html">Setting Up Shared Folders</a>
 </h3><li><h3><a href="../html/tasks/InstallingScratchbox1.html">Install Scratchbox 1</a>
 </h3><li><h3><a href="../html/tasks/InstallingScratchbox1Targets.html">Install Scratchbox 1 Targets</a>
 </h3><li><h3><a href="../html/tasks/InstallingScratchbox2Targets.html">Install Scratchbox 2 Targets</a>

Modified: branches/work_Andre/org.maemo.esbox.help/toctasks.xml
===================================================================
--- branches/work_Andre/org.maemo.esbox.help/toctasks.xml	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.help/toctasks.xml	2009-10-19 20:25:46 UTC (rev 2326)
@@ -4,6 +4,8 @@
 <toc label="Tasks" link_to="toc.xml#tasks" topic="html/toctasks.html">
      <topic href="html/tasks/UsingVirtualMachines.html" label="Using ESbox with Virtual Machines">
     </topic>
+     <topic href="html/tasks/SettingUpSharedFolders.html" label="Setting Up Shared Folders">
+    </topic>
      <topic href="html/tasks/InstallingScratchbox1.html" label="Install Scratchbox 1">
     </topic>
      <topic href="html/tasks/InstallingScratchbox1Targets.html" label="Install Scratchbox 1 Targets">

Modified: branches/work_Andre/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/ILaunchableMachineController.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/ILaunchableMachineController.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/ILaunchableMachineController.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -13,8 +13,6 @@
 
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.maemo.mica.common.core.MicaException;
-import org.maemo.mica.common.core.process.IProcessLauncher;
 
 /**
  * This interface identifies a machine controller whose machine can be launched as a process
@@ -44,5 +42,4 @@
 	 * @return status of launch
 	 */
 	IStatus launchMachine(IProgressMonitor monitor);
-
 }
\ No newline at end of file

Modified: branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/BuildMachinePreferencePage.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/BuildMachinePreferencePage.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/BuildMachinePreferencePage.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -27,6 +27,7 @@
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.SubProgressMonitor;
 import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.IMessageProvider;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.jface.preference.PreferencePage;
@@ -330,7 +331,7 @@
 			Display.getDefault().asyncExec(new Runnable() {
 				public void run() {
 					setErrorMessage(null);
-					setMessage(null, INFORMATION);
+					setMessage(null, NONE);
 					page.revalidate();	
 					updateApplyButton();
 				}
@@ -637,8 +638,11 @@
 	public int getMessageType() {
 		if (selectedMachine != null) {
 			IComposablePreferencePage pref = machineConfigPages.get(selectedMachine.getName());
-			if (pref != null)
-				return pref.getMessageType();
+			if (pref != null) {
+				int type = pref.getMessageType();
+				if (type != IMessageProvider.NONE)
+					return type;
+			}
 		}
 		return super.getMessageType();
 	}

Modified: branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTreeViewer.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTreeViewer.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTreeViewer.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -427,7 +427,8 @@
 		 * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
 		 */
 		public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
-			viewer.refresh();
+			if (newInput != null)
+				viewer.refresh();
 		}
 		
 	}
@@ -441,12 +442,14 @@
 		public Image getColumnImage(Object element, int columnIndex) {
 			ISharedFolder folder = null;
 			if (scanFolders && element instanceof ISharedFolder && columnIndex == COLUMN_FIELD) {
-				folder = (ISharedFolder) element;
-				IStatus status = getShareStatus(folder);
-				if (status != null)
-					return CommonUIImages.getStatusLightIcon(status);
-				else if (scanSharedFoldersThread != null)
+				if (scanSharedFoldersThread != null)
 					return CommonUIImages.getImage(CommonUIImages.STATUS_PENDING_ICON);
+				else {
+					folder = (ISharedFolder) element;
+					IStatus status = getShareStatus(folder);
+					if (status != null)
+						return CommonUIImages.getStatusLightIcon(status);
+				}
 			}
 			return null;
 		}
@@ -462,23 +465,25 @@
 							? folder.getLocalPath().toOSString() 
 									: folder.getRemotePath().toPortableString());
 				} else if (scanFolders && columnIndex == COLUMN_CONTENT) {
-					IStatus status = getShareStatus(folder);
-					if (status != null) {
-						if (!status.isOK() && status.getSeverity() != IStatus.CANCEL) {
-							String prefix = "";
-							if (status.getSeverity() == IStatus.WARNING)
-								prefix = "Warning: ";
-							else if (status.getSeverity() == IStatus.ERROR)
-								prefix = "Error: ";
-							else if (status.getSeverity() == IStatus.INFO)
-								prefix = "Info: ";
-							return prefix + status.getMessage();
-						} else if (status.isOK()) {
-							return "Connected";
+					if (scanSharedFoldersThread != null) {
+						return "Scanning...";
+					} else {
+						IStatus status = getShareStatus(folder);
+						if (status != null) {
+							if (!status.isOK() && status.getSeverity() != IStatus.CANCEL) {
+								String prefix = "";
+								if (status.getSeverity() == IStatus.WARNING)
+									prefix = "Warning: ";
+								else if (status.getSeverity() == IStatus.ERROR)
+									prefix = "Error: ";
+								else if (status.getSeverity() == IStatus.INFO)
+									prefix = "Info: ";
+								return prefix + status.getMessage();
+							} else if (status.isOK()) {
+								return "Connected";
+							}
+							return "";
 						}
-						return "";
-					} else if (scanSharedFoldersThread != null) {
-						return "Scanning...";
 					}
 				}
 			}

Modified: branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFoldersPreferencePage.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFoldersPreferencePage.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFoldersPreferencePage.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -37,8 +37,9 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
 import org.eclipse.swt.widgets.Tree;
+import org.maemo.esbox.internal.maemosdk.ui.IHelpID;
 import org.maemo.esbox.maemosdk.core.MaemoPreferenceConstants;
 import org.maemo.mica.common.core.filesystem.EShareType;
 import org.maemo.mica.common.core.filesystem.ISharedFolder;
@@ -50,6 +51,8 @@
 import org.maemo.mica.internal.api.common.core.filesystem.SharedFolderPreferenceConverter;
 import org.maemo.mica.internal.api.common.core.ui.GridLayoutWrappedTextUtils;
 
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
+
 /**
  * This page is included inside a BuildMachineSelectionPreferencePage
  * to configure the shared folder mappings between host and target.
@@ -151,6 +154,7 @@
 		composite = new Composite(parent, SWT.NONE);
 		setControl(composite);
 
+		WorkbenchUtils.setHelpContextId(composite, IHelpID.HID_GLOBAL_PREF_ESBOX_SHAREDFOLDERS);
 		GridLayout layout = new GridLayout(2, false);
 		layout.marginWidth = layout.marginHeight = 0;
 		composite.setLayout(layout);
@@ -159,17 +163,17 @@
 		layoutData.horizontalSpan = 2;
 		composite.setLayoutData(layoutData);
 		
-		// left side is the table
-		Label label = new Label(composite, SWT.WRAP);
+		Link label = new Link(composite, SWT.WRAP);
 		label.setText(
 		"ESbox needs to create projects on the host, in a shared folder visible to the VM.  "+
-		"For C/C++ indexing and C++ hover help, ESbox must be able to see SDK contents from a VM shared folder visible to the host.\n\n"+
+		"For C/C++ indexing and C++ hover help, ESbox must be able to see SDK contents from a VM shared folder visible to the host.\n \n"+
 		"&Configure the shared folders to use:");
 		
 		GridData labelLayout = new GridData(SWT.LEFT, SWT.TOP, true, false);
 		labelLayout.horizontalSpan = 2;
 		GridLayoutWrappedTextUtils.setupLabel(composite, label, labelLayout);
 
+		// left side is the table
 		Composite tableComposite = new Composite(composite, SWT.NONE);
 		GridLayoutFactory.fillDefaults().applyTo(tableComposite);
 		GridDataFactory.fillDefaults().grab(true, true).applyTo(tableComposite);
@@ -317,7 +321,8 @@
 	}
 	
 	protected void validate() {
-		if (treeViewer.getControl().isDisposed())
+		if (treeViewer.getControl().isDisposed() || 
+				getOwner() == null || getOwner().getControl().isDisposed())
 			return;
 		
 		setErrorMessage(null);
@@ -413,6 +418,8 @@
 		// hmm, this is a no-op... we'd really like to edit into the
 		// first field of the share.
 		treeViewer.editElement(share, 0);
+		
+		treeViewer.scheduleStatusUpdate();
 	}
 	
 	protected void doRemove() {

Modified: branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/ValidateMachineRunner.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/ValidateMachineRunner.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/ValidateMachineRunner.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -11,6 +11,7 @@
 
 package org.maemo.esbox.internal.api.maemosdk.ui.preferences;
 
+import java.io.File;
 import java.io.OutputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.text.MessageFormat;
@@ -313,18 +314,26 @@
 			return false;
 		
 		// wait a little while for samba to notice, or else it looks like the file doesn't exist (:p !!!)
-		try {
-			Thread.sleep(2000);
-		} catch (InterruptedException e1) {
-		}
+		int sleepLeft = 1000 * 10;
+		do {
+			shareUserStore = share.isHostProvidedShare() 
+					? machine.getFileSystemAccess().getFileStore(shareUserFilePath)
+					: EFS.getLocalFileSystem().getStore(shareUserFilePath);
+					
+			fileExists = checkFileExists(new SubProgressMonitor(monitor, 1), shareUserStore);
+			if (!fileExists) {
+				try {
+					Thread.sleep(1000);
+					sleepLeft -= 1000;
+				} catch (InterruptedException e1) {
+				}
+			}
+		} while (!fileExists && sleepLeft > 0);
 		
-		shareUserStore = share.isHostProvidedShare() ? machine.getFileSystemAccess().getFileStore(shareUserFilePath)
-					: EFS.getLocalFileSystem().getStore(shareUserFilePath);
-		fileExists = checkFileExists(new SubProgressMonitor(monitor, 1), shareUserStore);
 		if (!fileExists) {
 			fail("Could not access {0} over SSH filesystem.\n\n"+
-					"If the share is mounted, then this file should be visible\n"
-					+"since we created it on the sharing machine\n"
+					"If the share is mounted, then this file should be visible "
+					+"since we created it on the sharing machine "
 					+"and this location is assumed to be shared at {1}. \n \n"+
 					"Make sure the host and target paths match, and that a different share "
 					+"is not already mounted there.",
@@ -355,6 +364,13 @@
 	private boolean checkFileExists(IProgressMonitor monitor,
 			IFileStore remoteStore) {
 		boolean fileExists = false;
+		
+		// HACK: localfile implementation can be buggy and have a long cache life
+		if (remoteStore.toURI().getScheme().equals("file")) {
+			File file = new File(remoteStore.toURI().getPath());
+			fileExists = file.exists();
+			return fileExists;
+		}
 		try {
 			IFileInfo info = remoteStore.fetchInfo(0, new SubProgressMonitor(monitor, 1));
 			fileExists = info.exists();

Modified: branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -24,6 +24,11 @@
 	public static final String HID_GLOBAL_PREF_ESBOX_BUILDMACHINES = PREFIX + "global_pref_esbox_buildmachines"; //$NON-NLS-1$
 
 	/**
+	 *  Global preference => ESbox => Build Machines => Shared Folders
+	 */
+	public static final String HID_GLOBAL_PREF_ESBOX_SHAREDFOLDERS = PREFIX + "global_pref_esbox_sharedfolders"; //$NON-NLS-1$
+
+	/**
 	 *  Global preference => ESbox => X Server.
 	 */
 	public static final String HID_GLOBAL_PREF_ESBOX_XSERVER = PREFIX + "global_pref_esbox_xserver"; //$NON-NLS-1$

Modified: branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1SDKInstallerDataContentLabelProvider.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1SDKInstallerDataContentLabelProvider.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1SDKInstallerDataContentLabelProvider.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -50,7 +50,7 @@
 						"scratchbox-toolchain-host-gcc"));
 			}
 			
-			//Fremantle Beta 2
+			//Fremantle
 			urls = fetchScriptsFromUrl( 
 					"http://repository.maemo.org/stable/5.0/",
 					"maemo-scratchbox-install.*\\.sh");

Modified: branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerDataContentLabelProvider.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerDataContentLabelProvider.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerDataContentLabelProvider.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -53,14 +53,14 @@
 				));
 			}
 			
-			// Fremantle Beta 2 release support
+			// Fremantle release support
 			urls = fetchScriptsFromUrl( 
 					"http://repository.maemo.org/stable/5.0/", 
 					"maemo-sdk-install.*\\.sh");
 
 			for (URL url : urls) {
 				contents.add(new Scratchbox1TargetInstallerData(
-						"Maemo 5.0 Fremantle (Beta 2 Release)",
+						"Maemo 5.0 Fremantle",
 						url,
 						sdks.size() > 0 ? sdks.get(0) : null,
 						"FREMANTLE",

Modified: branches/work_Andre/org.maemo.esbox.vm/conf/vm_prefs.xml
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm/conf/vm_prefs.xml	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm/conf/vm_prefs.xml	2009-10-19 20:25:46 UTC (rev 2326)
@@ -24,8 +24,8 @@
 	<entry key="VM_SSH_TIMEOUT">3</entry>		<!-- VMs are local so should not take long -->
 	<entry key="VM_CIFS_TARGET_PORT">4445</entry>
 	
-	<entry key="VM_SHARED_FOLDERS_WIN32">c:\maemo\shared|/home/maemo/shared|false|true|SMB|shared,c:\maemo\shared|/scratchbox/users/maemo/home/maemo/shared|false|true|SMB|shared</entry>
-	<entry key="VM_SHARED_FOLDERS_UNIX">$(user.home)/maemo/shared|/home/maemo/shared|false|true|SMB|shared,$(user.home)/maemo/shared|/scratchbox/users/maemo/home/maemo/shared|false|true|SMB|shared</entry>
-	<entry key="VM_SHARED_FOLDERS_OSX">$(user.home)/Public|/home/maemo/shared|false|true|SMB|$(user.name)'s Public Folder,$(user.home)/Public|/scratchbox/users/maemo/home/maemo/shared|false|true|SMB|$(user.name)'s Public Folder</entry>
+	<entry key="VM_SHARED_FOLDERS_WIN32">c:\maemo\shared|/home/maemo/shared|false|true|SMB|shared,c:\maemo\shared|/scratchbox/users/maemo/home/maemo/shared|false|true|SMB|shared,/scratchbox|S:|false|false|SMB|scratchbox,/home/maemo|T:|false|false|SMB|maemo</entry>
+	<entry key="VM_SHARED_FOLDERS_UNIX">$(user.home)/maemo/shared|/home/maemo/shared|false|true|SMB|shared,$(user.home)/maemo/shared|/scratchbox/users/maemo/home/maemo/shared|false|true|SMB|shared,/scratchbox|/media/scratchbox|false|false|SMB|scratchbox,/home/maemo|/media/maemo|false|false|SMB|maemo</entry>
+	<entry key="VM_SHARED_FOLDERS_OSX">$(user.home)/Public|/home/maemo/shared|false|true|SMB|$(user.name)'s Public Folder,$(user.home)/Public|/scratchbox/users/maemo/home/maemo/shared|false|true|SMB|$(user.name)'s Public Folder,/scratchbox|/Volumes/scratchbox|false|false|SMB|scratchbox,/home/maemo|/Volumes/maemo|false|false|SMB|maemo</entry>
 	
 </properties>

Modified: branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -83,6 +83,16 @@
 		return machineConfiguration.getSSHConfiguration(); 
 	}
 	
+	/* (non-Javadoc)
+	 * @see org.maemo.mica.internal.api.protocol.ssh.SSHMachineControllerBase#getProbeTimeout(org.maemo.mica.protocol.ssh.SSHConfiguration)
+	 */
+	@Override
+	protected int getProbeTimeout(SSHConfiguration configuration) {
+		// A virtual machine is on the same computer, so this should
+		// be a near-instant check.  Five seconds should be long enough.
+		return 5;
+	}
+	
 	/**
 	 * Tell if the virtual machine or engine is running.  This either detects
 	 * existing instances of the machine running on the host, or verifies
@@ -94,7 +104,7 @@
 	 * @return true if it is likely running, false if we either don't know
 	 * or if it is not running.  If unsure, return false.
 	 */
-	final public boolean isMachineRunning() {
+	final synchronized public boolean isMachineRunning() {
 		if (System.currentTimeMillis() >= nextVMAliveCheck) {
 			isVMRunning = doIsMachineRunning();
 			if (!isVMRunning) {

Modified: branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/preferences/AddressFieldEditor.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/preferences/AddressFieldEditor.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/ui/preferences/AddressFieldEditor.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -227,7 +227,7 @@
 		}
 		
 		if (getPage() != null) {
-			getPage().setMessage(null, IMessageProvider.NONE);
+			getPage().setMessage(null, IMessageProvider.INFORMATION);
 		}
 		clearErrorMessage();
 

Modified: branches/work_Andre/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuMachineController.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuMachineController.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/QemuMachineController.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -223,14 +223,17 @@
 			scheduleProbe();
 		}
 		
-		// make sure it looks like QEMU is running
+		// check connection first
+		IStatus status = super.doProbeMachine(monitor);
+		if (status.isOK())
+			return status;
+		
+		// if that fails, make sure it looks like QEMU is running
 		if (!isMachineRunning())
 			return Activator.createErrorStatus("QEMU is not running " 
 					+ ((IVirtualMachine) machine).getDescriptiveName(), null);
 		
-		IStatus status = super.doProbeMachine(monitor);
-		//if (launchInfo != null && !status.isOK())
-		//	launchInfo.setFailed(status);
+		status = super.doProbeMachine(monitor);
 		return status;
 	}
 }

Modified: branches/work_Andre/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxMachineController.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxMachineController.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm.virtualbox/src/org/maemo/esbox/internal/vm/virtualbox/VirtualBoxMachineController.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -207,12 +207,17 @@
 	 */
 	@Override
 	protected IStatus doProbeMachine(IProgressMonitor monitor) {
+		// check connection first
+		IStatus status = super.doProbeMachine(monitor);
+		if (status.isOK())
+			return status;
+		
 		// make sure it looks like VirtualBox is running
 		if (!isMachineRunning())
 			return Activator.createErrorStatus("VirtualBox is not running " 
 					+ ((IVirtualMachine) machine).getDescriptiveName(), null);
 
-		return super.doProbeMachine(monitor);
+		return status;
 	}
 	
 	/**

Modified: branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineController.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineController.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineController.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -158,7 +158,7 @@
 				"start", vmwareConfiguration.getVmxPath());
 		
 		// if not vmrun, generate directly
-		if (cmdLine == null) {
+		if (cmdLine == null || vmwareConfiguration.getProduct().equals(IVMwareConfiguration.PRODUCT_PLAYER)) {
 			cmdLine = new ArrayList<String>();
 			
 			IPath launchPath = getExecutablePath(vmwareConfiguration);
@@ -198,7 +198,8 @@
 		monitor.beginTask("Starting VMware...", 10);
 
 		IVMwareConfiguration config = (IVMwareConfiguration) machineConfiguration;
-		boolean usingVMrun = VMwareUtils.findVmrunExecutable(config.getInstallPath()) != null;
+		boolean usingVMrun = VMwareUtils.findVmrunExecutable(config.getInstallPath()) != null
+			&& !config.getProduct().equals(IVMwareConfiguration.PRODUCT_PLAYER);
 		
 		monitor.subTask("Checking existing VMware instances...");
 		
@@ -266,8 +267,13 @@
 			status = probeUntilConnect(
 					watchStatus,
 					new SubProgressMonitor(monitor, 8));
-		else
-			status = Status.OK_STATUS;	
+		else {
+			scheduleProbe();
+			status = isMachineRunning() ? Status.OK_STATUS :
+				Activator.createErrorStatus("The machine " + config.getVmxPath() + " failed to start:\n \n"
+						+ launchInfo.streamGrabber.toString(),
+						null);
+		}
 		
 		if (monitor.isCanceled() || status.getSeverity() == IStatus.CANCEL) {
 			launchInfo.cancel();
@@ -318,12 +324,16 @@
 	 */
 	@Override
 	protected IStatus doProbeMachine(IProgressMonitor monitor) {
+		// test connection first
+		IStatus status = super.doProbeMachine(monitor);
+		if (status.isOK())
+			return status;
+		
+		// if that fails, verify the VM engine is running
 		if (!isMachineRunning())
 			return Activator.createErrorStatus("VMware is not running " 
 					+ ((IVirtualMachine) machine).getDescriptiveName(), null);
 		
-		IStatus status = super.doProbeMachine(monitor);
 		return status;
-
 	}
 }

Modified: branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareSettingsPreferencePage.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareSettingsPreferencePage.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareSettingsPreferencePage.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -83,12 +83,12 @@
 			};
 			feVMwareProductType = new RadioGroupFieldEditor(
 					VMwarePreferenceConstants.VMWARE_PRODUCT,
-					"Product Type:",
+					"Product &type:",
 					3, namesAndValues,
 					getFieldEditorParent());
 			
 			Composite radioBoxControl = feVMwareProductType.getRadioBoxControl(getFieldEditorParent());
-			radioBoxControl.setToolTipText("Set the VMware product type to use.");
+			radioBoxControl.setToolTipText("Set the VMware product type to use.  You can select, for instance, to use VMware Player instead of Workstation, since both are installed together.");
 			addField(feVMwareProductType);
 		}
 		
@@ -105,7 +105,7 @@
 		
 		feVMWAREPath = new DirectoryFieldEditor(
 				VMwarePreferenceConstants.VMWARE_INSTALL_PATH,
-				"Installation directory:", getFieldEditorParent());
+				"Installation &directory:", getFieldEditorParent());
 		addField(feVMWAREPath);
 		text = feVMWAREPath.getTextControl(getFieldEditorParent()); 
 		text.setToolTipText(
@@ -125,7 +125,7 @@
 		
 		feVmxPath = new NonValidatingFileFieldEditor(
 				VMwarePreferenceConstants.VMWARE_VMX_PATH,
-				"VMX path:", getFieldEditorParent());
+				"&VMX path:", getFieldEditorParent());
 		addField(feVmxPath);
 		text = feVmxPath.getTextControl(getFieldEditorParent());
 		text.setToolTipText(

Modified: branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java
===================================================================
--- branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java	2009-10-19 19:42:37 UTC (rev 2325)
+++ branches/work_Andre/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/ui/wizards/MaemoSDKVMSelectionWizardPage.java	2009-10-19 20:25:46 UTC (rev 2326)
@@ -538,10 +538,6 @@
 			if(uncompressToolPage.shouldShowThisPage(fileToDownload.isMultipart(), fileToDownload.getSize()))
 				 return uncompressToolPage;
 		 }else{
-			 validateTextFields();
-			 if (!isPageComplete()){
-				 return null;
-			 }
 			 File f = new File(installData.getPathOfExistentVM());
 			 if(uncompressToolPage.shouldShowThisPage(DefaultVMZipExtractor.isMultipartFile(installData.getPathOfExistentVM()), f.length()))
 				 return uncompressToolPage;



More information about the Esbox-commits mailing list