[Esbox-commits] r946 - in branches/work_Ed: org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/maemosdk/core/adapters org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/core org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/adapters org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware

eswartz at garage.maemo.org eswartz at garage.maemo.org
Tue Nov 18 02:47:16 EET 2008


Author: eswartz
Date: 2008-11-18 02:47:16 +0200 (Tue, 18 Nov 2008)
New Revision: 946

Modified:
   branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/MaemoLauncher.java
   branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/maemosdk/core/adapters/MaemoTargetEnvironmentModifierAdapter.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/ESboxProductTestSuite.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestOProfileValgrindSupport.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1SDKProvider.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java
   branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java
   branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDKTarget.java
   branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1EnvironmentProvider.java
   branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java
   branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/core/Scratchbox2SDK.java
   branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2EnvironmentProvider.java
   branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2ProcessLauncher.java
   branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/adapters/MaemoScratchbox2SDKManageTargetAdapter.java
   branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineFactory.java
   branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java
Log:
Merge with mica rev 83 and ESbox rev 944, plus changes:
-- fix some issues with accidentally selecting RSE SDKs in the unit tests 
-- make a common routine to get "desired" scratchbox SDK targets rather than repeating this all over

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/MaemoLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/MaemoLauncher.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/MaemoLauncher.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -62,7 +62,7 @@
 			IProcessLauncherFactory processLauncherFactory = sdkTarget.getProcessLauncherFactory();
 			
 			IEnvironmentModifierBlock envBlock = processLauncherFactory.defaultEnvironmentModifierBlock();
-			MaemoEnvironmentUtils.defineEmulatorXDisplayVariable(sdkTarget.getSDK().getMachine(), envBlock);
+			MaemoEnvironmentUtils.defineEmulatorXDisplayVariable(sdkTarget.getMachine(), envBlock);
 			
 			IProcessLauncher processLauncher = ProcessLauncherCreator.createProcessLauncher(processLauncherFactory, null,
 					Collections.singletonList(maemoCommand), envBlock);
@@ -172,8 +172,7 @@
 	 */
 	private boolean testMaemoLauncher(ISDKTarget sdkTarget)
 			throws MicaException {
-		List<IProcess> runningProcesses = getMaemoLaunchers(sdkTarget.getSDK()
-				.getMachine());
+		List<IProcess> runningProcesses = getMaemoLaunchers(sdkTarget.getMachine());
 		return runningProcesses.size() > 0;
 	}
 
@@ -248,7 +247,7 @@
 	 * @throws MicaException
 	 */
 	public void killMaemo(ISDKTarget sdkTarget) throws MicaException {
-		List<IProcess> pids = getMaemoLaunchers(sdkTarget.getSDK().getMachine());
+		List<IProcess> pids = getMaemoLaunchers(sdkTarget.getMachine());
 		if (pids.size() == 0)
 			return;
 
@@ -261,7 +260,7 @@
 		}
 
 		// try again
-		pids = getMaemoLaunchers(sdkTarget.getSDK().getMachine());
+		pids = getMaemoLaunchers(sdkTarget.getMachine());
 		if (pids.size() == 0)
 			return;
 

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/maemosdk/core/adapters/MaemoTargetEnvironmentModifierAdapter.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/maemosdk/core/adapters/MaemoTargetEnvironmentModifierAdapter.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/maemosdk/core/adapters/MaemoTargetEnvironmentModifierAdapter.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -45,7 +45,7 @@
 		envBlock.define("DBUS_SESSION_BUS_ADDRESS", "unix:path=/tmp/session_bus_socket");
 		
 		if (launchProxy instanceof AbstractLocalLaunchProxy) {
-			MaemoEnvironmentUtils.defineEmulatorXDisplayVariable(sdkTarget.getSDK().getMachine(), envBlock);
+			MaemoEnvironmentUtils.defineEmulatorXDisplayVariable(sdkTarget.getMachine(), envBlock);
 			
 		} else {
 			// remote launches need DISPLAY for its own machine

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/ESboxProductTestSuite.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/ESboxProductTestSuite.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/ESboxProductTestSuite.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -13,6 +13,7 @@
 
 import org.maemo.mica.common.core.MicaException;
 import org.maemo.mica.common.core.machine.*;
+import org.maemo.mica.common.core.tests.TestMachineUtils;
 
 import junit.framework.Test;
 import junit.framework.TestSuite;
@@ -30,11 +31,16 @@
 		TestSuite suite = new TestSuite(
 				"Test for ESbox Product");
 		
-		for (IBuildMachine machine : MachineRegistry.getInstance().getBuildMachines()) {
-			try {
-				MachineUtils.acquireMachine(machine);
-			} catch (MicaException e) {
+		try {
+			IMachine testMachine = TestMachineUtils.getSSHBuildMachine();
+			if (testMachine != null) {
+				MachineUtils.acquireMachine(testMachine);
+			} else {
+				for (IBuildMachine machine : MachineRegistry.getInstance().getBuildMachines()) {
+					MachineUtils.acquireMachine(machine);
+				}
 			}
+		} catch (MicaException e) {
 		}
 		
 		suite.addTest(org.maemo.mica.common.core.tests.MicaCoreTestSuite.suite());

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestOProfileValgrindSupport.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestOProfileValgrindSupport.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestOProfileValgrindSupport.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -43,7 +43,7 @@
 				assertNotNull(sdkTarget.getName(), oprofileSupport);
 				assertNotNull(sdkTarget.getName(), valgrindSupportAdapter);
 				
-				IMachine machine = sdkTarget.getSDK().getMachine();
+				IMachine machine = sdkTarget.getMachine();
 				if (sdkTarget.getArchitecture().equals(IScratchboxSDKTarget.ARCHITECTURE_ARMEL)) {
 					armelTarget = sdkTarget;
 					assertNotNull(oprofileSupport.validateSupport(machine));	// not a device

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestProcessLauncher.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -71,7 +71,7 @@
 						|| target.getName().contains("REMOVE")
 						|| target.getName().contains("bora"))
 					continue;
-				if (!validateMachine(target.getSDK().getMachine()))
+				if (!validateMachine(target.getMachine()))
 					continue;
 				if (--count < 0)
 					break;
@@ -232,7 +232,7 @@
 	private IPath createStockScript(ISDKTarget target, String cmdText)
 			throws Exception {
 		
-		IPath scriptPath = target.getSDK().getMachine().getUserHome().append(".tmp").append("foo.sh");
+		IPath scriptPath = target.getMachine().getUserHome().append(".tmp").append("foo.sh");
 		IPath targetPath = target.getMachineToSDKTargetFileSystemMapping().convertTargetToHostPath(scriptPath);
 		target.getTargetFileSystemAccess().getFileStore(targetPath.removeLastSegments(1)).mkdir(0, null);
 		
@@ -430,7 +430,7 @@
 				// make an overridden environment that has the script directory in its PATH
 				String scriptDir = scriptPath.removeLastSegments(1).toPortableString();
 				IEnvironmentModifierBlock envVarBlock =
-					ProcessLauncherUtils.addToPATH(target.getSDK().getMachine(),
+					ProcessLauncherUtils.addToPATH(target.getMachine(),
 							target.getProcessLauncherFactory(), 
 							scriptDir, true);
 				

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1ProcessLauncher.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -67,6 +67,7 @@
 			else
 				sdks = sb1Provider.createSDKs();
 		}
+		SDKFactory.getInstance().waitForRefreshComplete(null);
 		return sdks;
 	}
 

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1SDKProvider.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1SDKProvider.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB1SDKProvider.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -146,7 +146,7 @@
 				assertTrue(target + " @" + sbPath.toString(), store.fetchInfo().exists());
 				
 				// if we happen to be running locally, verify sanity
-				if (target.getSDK().getMachine() instanceof ILocalMachine) {
+				if (target.getMachine() instanceof ILocalMachine) {
 					try {
 						hostPath = target.convertTargetToHostPath(sbPath);
 						assertTrue(hostPath.toFile().toString(),

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2ProcessLauncher.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -70,6 +70,7 @@
 			else
 				sdks = sb2Provider.createSDKs();
 		}
+		SDKFactory.getInstance().waitForRefreshComplete(null);
 		return sdks;
 	}
 

Modified: branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -120,7 +120,7 @@
 		
 		// these tests only work on machine
 		IPath hostPath = new Path("/");
-		if (target.getSDK().getMachine() instanceof ILocalMachine) {
+		if (target.getMachine() instanceof ILocalMachine) {
 			try {
 				sbPath = target.convertHostToTargetPath(hostPath);
 			} catch (MicaException e) {

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDKTarget.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDKTarget.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDKTarget.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -50,7 +50,7 @@
 	 */
 	public ICommandAbstractor getCommandAbstractor() throws MicaException {
 		// ensure machine is alive
-		MachineUtils.acquireMachine(this.getSDK().getMachine());
+		MachineUtils.acquireMachine(this.getMachine());
 
 		return new ICommandAbstractor() {
 

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1EnvironmentProvider.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1EnvironmentProvider.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1EnvironmentProvider.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -65,8 +65,7 @@
 						.logError(
 								"Failed to read scratchbox environment; using system environment",
 								e);
-				standardEnv = sdkTarget.getSDK().getMachine()
-						.getStandardEnvironment();
+				standardEnv = sdkTarget.getMachine().getStandardEnvironment();
 			}
 
 			cachedStdEnvMap.put(sdkTarget, standardEnv);

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/launcher/Scratchbox1ProcessLauncher.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -215,7 +215,7 @@
 	 */
 	@Override
 	protected Process doCreateProcess() throws Exception {
-		return sdkTarget.getSDK().getMachine().createProcess(
+		return sdkTarget.getMachine().createProcess(
 				getLaunchCurrentWorkingDirectory(),
 				getLaunchCommandArguments(),
 				getLaunchEnvironmentModifierBlock(), isUsePTY());

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/core/Scratchbox2SDK.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/core/Scratchbox2SDK.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/core/Scratchbox2SDK.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -355,8 +355,7 @@
 			IScratchboxSDKTarget sdkTarget, List<IPath> hostPaths)
 			throws MicaException {
 		// find cached value
-		CacheUtils.getInstance().ensureCurrentMachine(SB2_MACHINE, sdkTarget.getSDK()
-				.getMachine());
+		CacheUtils.getInstance().ensureCurrentMachine(SB2_MACHINE, sdkTarget.getMachine());
 		Map<String, Map<String, String>> targetToPathMappingsMap = null;
 		Map<String, String> storedPathMappings = null;
 		targetToPathMappingsMap = (Map<String, Map<String, String>>) CacheUtils
@@ -464,8 +463,7 @@
 	private synchronized IPath getMaemoRootstrapPath(
 			Scratchbox2SDKTarget sdkTarget) throws MicaException {
 		// find cached value
-		CacheUtils.getInstance().ensureCurrentMachine(SB_MACHINE, sdkTarget.getSDK()
-				.getMachine());
+		CacheUtils.getInstance().ensureCurrentMachine(SB_MACHINE, sdkTarget.getMachine());
 		Map<String, String> targetToRootstrapMap = null;
 		targetToRootstrapMap = (Map<String, String>) CacheUtils.getInstance()
 				.getCachedValue(SB2_TARGET_TO_ROOTSTRAP_MAP);

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2EnvironmentProvider.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2EnvironmentProvider.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2EnvironmentProvider.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -75,8 +75,7 @@
 						.logError(
 								"Failed to read scratchbox environment; using system environment",
 								e);
-				standardEnv = sdkTarget.getSDK().getMachine()
-						.getStandardEnvironment();
+				standardEnv = sdkTarget.getMachine().getStandardEnvironment();
 			}
 
 			cachedStdEnvMap.put(sdkTarget, standardEnv);

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2ProcessLauncher.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2ProcessLauncher.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/launcher/Scratchbox2ProcessLauncher.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -107,7 +107,7 @@
 	 */
 	@Override
 	protected Process doCreateProcess() throws Exception {
-		return sdkTarget.getSDK().getMachine().createProcess(
+		return sdkTarget.getMachine().createProcess(
 				getLaunchCurrentWorkingDirectory(),
 				getLaunchCommandArguments(),
 				getLaunchEnvironmentModifierBlock(), isUsePTY());

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/adapters/MaemoScratchbox2SDKManageTargetAdapter.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/adapters/MaemoScratchbox2SDKManageTargetAdapter.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/adapters/MaemoScratchbox2SDKManageTargetAdapter.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -99,8 +99,7 @@
 				// see if a rootstrap -- possibly disconnected from the target --
 				// exists
 				List<MaemoRootstrap> rootstraps = sdk
-						.getAvailableMaemoRootstraps(selectedTarget.getSDK()
-								.getMachine());
+						.getAvailableMaemoRootstraps(selectedTarget.getMachine());
 				for (MaemoRootstrap rootstrap : rootstraps) {
 					if (rootstrap.getName().equals(selectedTarget.getName())) {
 						rootstrapUsed_ = true;

Modified: branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -28,8 +28,6 @@
 import org.maemo.mica.protocol.ssh.SSHConfiguration;
 
 import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.net.Socket;
 import java.text.MessageFormat;
 import java.util.List;
 
@@ -80,6 +78,8 @@
 	
 	public BaseVirtualMachineController(String name, IVirtualMachineConfiguration configuration) {
 		super(name);
+		if (configuration == null)
+			throw new NullPointerException();
 		this.machineConfiguration = configuration;
 	}
 	

Modified: branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineFactory.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineFactory.java	2008-11-17 21:07:21 UTC (rev 945)
+++ branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/VMwareMachineFactory.java	2008-11-18 00:47:16 UTC (rev 946)
@@ -18,22 +18,22 @@
 import java.net.URI;
 
 /**
- * This factory creates QEMU virtual machines.  
+ * This factory creates VMware virtual machines.  
  * @author eswartz
  *
  */
 public class VMwareMachineFactory implements IMachineFactory {
 
 	/**
-	 * Scheme for QEMU
+	 * Scheme for VMware
 	 */
-	private static final String QEMU_SCHEME = "qemu+ssh";
+	private static final String VMWARE_SCHEME = "vmware+ssh";
 
 	/* (non-Javadoc)
 	 * @see org.maemo.mica.common.core.machine.IMachineFactory#createMachine(java.net.URI)
 	 */
 	public IMachine createMachine(String name, URI uri, ISharedFilesystemProvider sharedFilesystemProvider) throws MicaException {
-		if (!uri.getScheme().equals(QEMU_SCHEME))
+		if (!uri.getScheme().equals(VMWARE_SCHEME))
 			return null;
 		
 		IVMwareConfiguration qemuConfig = new CustomVMwareConfiguration(uri, sharedFilesystemProvider);
@@ -44,7 +44,7 @@
 	 * @see org.maemo.mica.common.core.machine.IMachineFactory#getScheme()
 	 */
 	public String getScheme() {
-		return QEMU_SCHEME;
+		return VMWARE_SCHEME;
 	}
 
 }



More information about the Esbox-commits mailing list