[Esbox-commits] r1058 - in branches/work_Ed: org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences org.maemo.esbox.product org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1 org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/preferences org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2 org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/preferences org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware
eswartz at garage.maemo.org
eswartz at garage.maemo.org
Fri Dec 12 03:59:14 EET 2008
Author: eswartz
Date: 2008-12-12 03:59:14 +0200 (Fri, 12 Dec 2008)
New Revision: 1058
Added:
branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java
branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxAptPackageManagerBridge.java
branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/IHelpID.java
branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/IHelpID.java
branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineURIQueryDecoder.java
Modified:
branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/BuildMachinePreferencePage.java
branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/XServerPreferencePage.java
branches/work_Ed/org.maemo.esbox.product/ESbox.product
branches/work_Ed/org.maemo.esbox.product/plugin.properties
branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java
branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/IScratchboxSDKPlatformArchitectureProvider.java
branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java
branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/preferences/Scratchbox1PreferencesPage.java
branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/preferences/Scratchbox2PreferencesPage.java
branches/work_Ed/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/CustomQemuConfiguration.java
branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/CustomVMwareConfiguration.java
branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseCustomVirtualMachineConfiguration.java
branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BasePreferenceVirtualMachineConfiguration.java
branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java
Log:
Merge with trunk rev 1057, finish package installer feature, fix some VM support issues
Copied: branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java (from rev 1057, trunk/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java (rev 0)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/IHelpID.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ling Wang (Nokia) - initial API and implementation. Dec 11, 2008
+ *******************************************************************************/
+package org.maemo.esbox.internal.maemosdk.ui;
+
+
+/**
+ * @author LWang.
+ *
+ */
+public interface IHelpID {
+ public static final String PREFIX = UIActivator.PLUGIN_ID + "."; //$NON-NLS-1$
+
+ /**
+ * Global preference => ESbox => Build Machines.
+ */
+ public static final String HID_GLOBAL_PREF_ESBOX_BUILDMACHINES = PREFIX + "global_pref_esbox_buildmachines"; //$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_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/BuildMachinePreferencePage.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/BuildMachinePreferencePage.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/BuildMachinePreferencePage.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -25,7 +25,9 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.maemo.esbox.internal.api.maemosdk.ui.preferences.ValidateMachineRunner;
+import org.maemo.esbox.internal.maemosdk.ui.IHelpID;
import org.maemo.esbox.internal.maemosdk.ui.UIActivator;
+import org.maemo.mica.common.core.GeneralUtils;
import org.maemo.mica.common.core.machine.*;
import java.util.*;
@@ -112,6 +114,9 @@
@Override
protected Control createContents(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
+
+ GeneralUtils.setHelpID(composite, IHelpID.HID_GLOBAL_PREF_ESBOX_BUILDMACHINES);
+
GridLayout layout = new GridLayout();
layout.marginWidth = layout.marginHeight = 0;
composite.setLayout(layout);
Modified: branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/XServerPreferencePage.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/XServerPreferencePage.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/maemosdk/ui/preferences/XServerPreferencePage.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -18,7 +18,9 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.maemo.esbox.internal.maemosdk.ui.IHelpID;
import org.maemo.esbox.maemosdk.core.MaemoPreferenceConstants;
+import org.maemo.mica.common.core.GeneralUtils;
/**
@@ -52,6 +54,8 @@
"Command template to launch server:",
getFieldEditorParent());
+ GeneralUtils.setHelpID(getFieldEditorParent(), IHelpID.HID_GLOBAL_PREF_ESBOX_XSERVER);
+
// make this string manageable
GC gc = new GC(getFieldEditorParent().getShell());
GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false);
Modified: branches/work_Ed/org.maemo.esbox.product/ESbox.product
===================================================================
--- branches/work_Ed/org.maemo.esbox.product/ESbox.product 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.product/ESbox.product 2008-12-12 01:59:14 UTC (rev 1058)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.4"?>
-<product name="ESbox" id="org.maemo.esbox.product.esbox" application="org.eclipse.ui.ide.workbench" version="2.0.0.M1" useFeatures="true">
+<product name="ESbox" id="org.maemo.esbox.product.esbox" application="org.eclipse.ui.ide.workbench" version="2.0.0-I20081202" useFeatures="true">
<aboutInfo>
<image path="/org.maemo.esbox.product/icons/esbox_64.png"/>
@@ -44,16 +44,16 @@
<plugin id="com.jcraft.jsch"/>
<plugin id="com.redhat.eclipse.cdt.autotools"/>
<plugin id="org.eclipse.cdt.core"/>
- <plugin id="org.eclipse.cdt.core.aix" fragment="true"/>
+ <plugin id="org.eclipse.cdt.core.aix"/>
<plugin id="org.eclipse.cdt.core.linux" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.linux.ia64" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.linux.ppc" fragment="true"/>
+ <plugin id="org.eclipse.cdt.core.linux.ia64"/>
+ <plugin id="org.eclipse.cdt.core.linux.ppc"/>
<plugin id="org.eclipse.cdt.core.linux.x86" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.linux.x86_64" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.macosx" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.qnx" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.solaris" fragment="true"/>
- <plugin id="org.eclipse.cdt.core.win32" fragment="true"/>
+ <plugin id="org.eclipse.cdt.core.linux.x86_64"/>
+ <plugin id="org.eclipse.cdt.core.macosx"/>
+ <plugin id="org.eclipse.cdt.core.qnx"/>
+ <plugin id="org.eclipse.cdt.core.solaris"/>
+ <plugin id="org.eclipse.cdt.core.win32"/>
<plugin id="org.eclipse.cdt.debug.core"/>
<plugin id="org.eclipse.cdt.debug.mi.core"/>
<plugin id="org.eclipse.cdt.debug.mi.ui"/>
Modified: branches/work_Ed/org.maemo.esbox.product/plugin.properties
===================================================================
--- branches/work_Ed/org.maemo.esbox.product/plugin.properties 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.product/plugin.properties 2008-12-12 01:59:14 UTC (rev 1058)
@@ -13,7 +13,7 @@
productName=ESbox
productBlurb=ESbox\n\
-version: 2.0.0-I20081120\n\
+version: 2.0.0-I20081202\n\
Eclipse build id: {0}\n\
\n\
Copyright (c)2007-2008 INdT, 2007-2008 Nokia Corporation. All rights reserved.\n\
@@ -28,7 +28,7 @@
shortcut.samples.tooltip = Samples
shortcut.whatsnew.tooltip = What's New
-productIntroTitle = Welcome to ESbox 2.0.0-I20081120
+productIntroTitle = Welcome to ESbox 2.0.0-I20081202
productIntroBrandingText = ESbox
introDescription-overview = ESbox is an Eclipse plug-in that helps programmers to develop applications for maemo platform on Scratchbox Apophis.
introDescription-tutorials = Learn how to be productive using ESbox by completing end-to-end tutorials that will guide you along the way.
Added: branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxAptPackageManagerBridge.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxAptPackageManagerBridge.java (rev 0)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxAptPackageManagerBridge.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.api.scratchbox.core;
+
+import org.maemo.esbox.scratchbox.core.sdk.IScratchboxSDKTarget;
+import org.maemo.mica.common.core.machine.IFileSystemAccess;
+import org.maemo.mica.common.core.process.IProcessLauncherFactory;
+import org.maemo.mica.linux.packages.core.aptpkgconfig.IAptPackageManagerBridge;
+
+/**
+ * @author eswartz
+ *
+ */
+public class ScratchboxAptPackageManagerBridge implements IAptPackageManagerBridge {
+
+ private final IScratchboxSDKTarget sdkTarget;
+ public ScratchboxAptPackageManagerBridge(IScratchboxSDKTarget sdkTarget) {
+ this.sdkTarget = sdkTarget;
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.internal.linux.packages.core.adapters.IAptPackageManagerAdapter#createAptConfigurationFileSystemAccess()
+ */
+ public IFileSystemAccess createAptConfigurationFileSystemAccess(boolean writeable) {
+ // no special privileges needed since the rootstrap has the user's ownership
+ return sdkTarget.getTargetFileSystemAccess();
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.linux.packages.core.aptpkgconfig.IAptPackageManagerBridge#createAptGetProcessLauncherFactory()
+ */
+ public IProcessLauncherFactory createAptGetOrDpkgProcessLauncherFactory() {
+ // in sb, apt commands must either be run as fakeroot or with different mapping modes
+ IProcessLauncherFactory aptProcessLauncherFactory;
+ aptProcessLauncherFactory = sdkTarget.getProcessLauncherFactoryForInstall();
+ return aptProcessLauncherFactory;
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.linux.packages.core.aptpkgconfig.IAptPackageManagerBridge#createAptCacheProcessLauncherFactory()
+ */
+ public IProcessLauncherFactory createAptCacheOrDpkgProcessLauncherFactory() {
+ // in sb, apt commands must either be run as fakeroot or with different mapping modes
+ IProcessLauncherFactory aptProcessLauncherFactory;
+ // we're not really installing, but sb1 and sb2 don't need special permissions either way
+ aptProcessLauncherFactory = sdkTarget.getProcessLauncherFactoryForInstall();
+ return aptProcessLauncherFactory;
+ }
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.internal.linux.packages.core.adapters.IAptPackageManagerAdapter#createPkgConfigProcessLauncherFactory()
+ */
+ public IProcessLauncherFactory createPkgConfigProcessLauncherFactory() {
+ // in sb, apt commands must either be run as fakeroot or with different mapping modes
+ IProcessLauncherFactory pkgconfigProcessLauncherFactory = sdkTarget.getProcessLauncherFactory();
+ return pkgconfigProcessLauncherFactory;
+ }
+
+}
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/ScratchboxPackageManagerProvider.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -12,7 +12,6 @@
package org.maemo.esbox.internal.api.scratchbox.core;
import org.maemo.esbox.scratchbox.core.sdk.IScratchboxSDKTarget;
-import org.maemo.mica.common.core.process.IProcessLauncherFactory;
import org.maemo.mica.common.core.sdk.ISDKTarget;
import org.maemo.mica.linux.packages.core.IPackageManager;
import org.maemo.mica.linux.packages.core.IPackageManagerProvider;
@@ -24,8 +23,7 @@
* @author eswartz
*
*/
-public class ScratchboxPackageManagerProvider implements
- IPackageManagerProvider {
+public class ScratchboxPackageManagerProvider implements IPackageManagerProvider {
/**
*
@@ -36,26 +34,15 @@
/*
* (non-Javadoc)
*
- * @seeorg.maemo.esbox.linux.packages.core.IPackageManagerProvider#
+ * @see org.maemo.esbox.linux.packages.core.IPackageManagerProvider#
* createPackageManager(org.maemo.esbox.common.core.sdk.ISDKTarget)
*/
public IPackageManager createPackageManager(ISDKTarget sdkTarget) {
if (!(sdkTarget instanceof IScratchboxSDKTarget))
return null;
- // in sb2, apt commands must be run as root
- IProcessLauncherFactory aptProcessLauncherFactory;
- if (sdkTarget instanceof IScratchboxSDKTarget)
- aptProcessLauncherFactory = ((IScratchboxSDKTarget) sdkTarget)
- .getProcessLauncherFactoryForInstall();
- else
- aptProcessLauncherFactory = sdkTarget.getProcessLauncherFactory();
-
- IProcessLauncherFactory pkgconfigProcessLauncherFactory = sdkTarget
- .getProcessLauncherFactory();
-
- IPackageManager manager = new AptPackageManager(sdkTarget,
- aptProcessLauncherFactory, pkgconfigProcessLauncherFactory);
+ IPackageManager manager = new AptPackageManager(sdkTarget,
+ new ScratchboxAptPackageManagerBridge((IScratchboxSDKTarget) sdkTarget));
return manager;
}
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/IScratchboxSDKPlatformArchitectureProvider.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/IScratchboxSDKPlatformArchitectureProvider.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/IScratchboxSDKPlatformArchitectureProvider.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -16,6 +16,7 @@
* Helper interface to identify the platform and architecture
*
* @author eswartz
+ * @deprecated see IPlatformDetectorAdapter and SDKFactory#establishPlatform()
*
*/
public interface IScratchboxSDKPlatformArchitectureProvider {
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -12,7 +12,6 @@
package org.maemo.esbox.scratchbox.core.command;
import org.eclipse.core.runtime.*;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ui.console.MessageConsole;
import org.maemo.mica.common.core.*;
import org.maemo.mica.common.core.env.IEnvironmentModifierBlock;
@@ -244,104 +243,21 @@
envBlock);
processLauncher.usePTY(true);
- final Process process = processLauncher.createProcess();
+ processLauncher.createProcess();
new PrintStream(console.newMessageStream()).println(commandline);
-
- Job job = new Job(jobName) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask("", 2);
- monitor.subTask("Running " + commandline);
- try {
- processLauncher.redirectToConsole(console);
- try {
- process.waitFor();
- monitor.worked(1);
- int exit = process.exitValue();
- if (exit != 0) {
- return Activator.createErrorStatus(
- "Process failed with exit value " + exit,
- null);
- }
- } catch (InterruptedException e) {
- return CANCEL_STATUS;
- }
- } finally {
- monitor.done();
- }
- return Status.OK_STATUS;
- }
- };
- job.schedule();
- try {
- long deadline = System.currentTimeMillis() + timeout;
- while (job.getResult() == null) {
- Thread.sleep(500);
- if (monitor.isCanceled()
- || (timeout != 0 && System.currentTimeMillis() >= deadline)) {
- process.destroy();
- job.cancel();
- return CANCEL_STATUS;
- }
- }
- return job.getResult();
- } catch (InterruptedException e) {
+
+ processLauncher.redirectToConsole(console);
+ int exit = processLauncher.waitToComplete(monitor);
+
+ if (exit == -1)
return CANCEL_STATUS;
- }
+ else if (exit != 0)
+ return Activator.createErrorStatus("Process terminated with exit code: " + exit, null);
+ else
+ return Status.OK_STATUS;
}
/**
- * Wait for the process to finish with a certain timeout.
- *
- * @param timeout
- * if not zero, timeout in milliseconds before throwing exception
- * @return exit code
- */
- protected int waitForProcess(final Process process, final long timeout)
- throws ScratchboxException {
- final Exception[] excs = { null };
- Runnable runnable = new Runnable() {
-
- public void run() {
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- excs[0] = e;
- }
- }
-
- };
-
- if (timeout == 0) {
- runnable.run();
- } else {
- Thread thread = new Thread(runnable);
- thread.start();
- try {
- thread.join(timeout);
- if (thread.isAlive()) {
- thread.interrupt();
- excs[0] = new InterruptedException();
- }
- } catch (InterruptedException e) {
- excs[0] = e;
- }
- }
-
- if (excs[0] instanceof InterruptedException) {
- throw new ScratchboxException("Command interrupted after "
- + timeout + " milliseconds");
- } else if (excs[0] instanceof ScratchboxException) {
- throw (ScratchboxException) excs[0];
- } else if (excs[0] != null) {
- throw new ScratchboxException(excs[0]);
- }
-
- return process.exitValue();
- }
-
- /**
* Eat the stdout and stderr results from the process and wait for it to
* finish. Optionally check whether stderr is empty.
* <p>
Copied: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/IHelpID.java (from rev 1057, trunk/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/IHelpID.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/IHelpID.java (rev 0)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/IHelpID.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ling Wang (Nokia) - initial API and implementation. Dec 11, 2008
+ *******************************************************************************/
+package org.maemo.esbox.internal.scratchbox.sb1;
+
+
+/**
+ * @author LWang.
+ *
+ */
+public interface IHelpID {
+ public static final String PREFIX = Activator.PLUGIN_ID + "."; //$NON-NLS-1$
+
+ /**
+ * Global preference => ESbox => Scratchbox 1.
+ */
+ public static final String HID_GLOBAL_PREF_ESBOX_SCRATCHBOX_1 = PREFIX + "global_pref_esbox_scratchbox_1"; //$NON-NLS-1$
+}
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -23,8 +23,8 @@
import org.maemo.mica.common.core.sdk.*;
import org.maemo.mica.common.core.sdk.commands.ICommandAbstractor;
import org.maemo.mica.internal.api.common.core.sdk.BaseSDKPlatform;
-import org.maemo.mica.maemosdk.core.MaemoSDKEngine;
-import org.maemo.mica.maemosdk.core.MaemoSDKInfo;
+import org.maemo.mica.maemosdk.core.MaemoSDKPlatformEngine;
+import org.maemo.mica.maemosdk.core.MaemoSDKPlatform;
import java.util.*;
@@ -332,13 +332,9 @@
platformName = platform.substring(0, 1).toUpperCase()
+ platform.substring(1).toLowerCase();
- List<MaemoSDKInfo> maemoSDKS = MaemoSDKEngine.getInstance()
- .getMaemoSDKS();
- for (MaemoSDKInfo info : maemoSDKS) {
- if (info.getName().equalsIgnoreCase(platformName)) {
- version = info.getVersion();
- break;
- }
+ MaemoSDKPlatform info = MaemoSDKPlatformEngine.getInstance().getPlatformForName(platformName);
+ if (info != null) {
+ return info;
}
} else {
// TODO: look at key files or versions to determine the
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/preferences/Scratchbox1PreferencesPage.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/preferences/Scratchbox1PreferencesPage.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/preferences/Scratchbox1PreferencesPage.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -19,11 +19,13 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.maemo.esbox.internal.scratchbox.sb1.IHelpID;
import org.maemo.esbox.internal.scratchbox.sb1.core.SB1PreferenceConstants;
import org.maemo.esbox.scratchbox.core.scratchbox.ScratchboxException;
import org.maemo.esbox.scratchbox.core.sdk.IScratchboxSDK;
import org.maemo.esbox.scratchbox.core.sdk.ScratchboxSDKFacade;
import org.maemo.esbox.scratchbox.sb1.sdk.IScratchbox1SDK;
+import org.maemo.mica.common.core.GeneralUtils;
import org.maemo.mica.common.core.machine.ILocalMachine;
import org.maemo.mica.common.core.sdk.SDKFactory;
@@ -69,6 +71,9 @@
* ()
*/
public void createFieldEditors() {
+
+ GeneralUtils.setHelpID(getFieldEditorParent(), IHelpID.HID_GLOBAL_PREF_ESBOX_SCRATCHBOX_1);
+
IScratchboxSDK sdk = null;
try {
sdk = ScratchboxSDKFacade.getInstance().getScratchboxSDK(
Copied: branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/IHelpID.java (from rev 1057, trunk/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/IHelpID.java)
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/IHelpID.java (rev 0)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/IHelpID.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ling Wang (Nokia) - initial API and implementation. Dec 11, 2008
+ *******************************************************************************/
+package org.maemo.esbox.internal.scratchbox.sb2;
+
+
+/**
+ * @author LWang.
+ *
+ */
+public interface IHelpID {
+ public static final String PREFIX = Activator.PLUGIN_ID + "."; //$NON-NLS-1$
+
+ /**
+ * Global preference => ESbox => Scratchbox 2.
+ */
+ public static final String HID_GLOBAL_PREF_ESBOX_SCRATCHBOX_2 = PREFIX + "global_pref_esbox_scratchbox_2"; //$NON-NLS-1$
+}
Modified: branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/preferences/Scratchbox2PreferencesPage.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/preferences/Scratchbox2PreferencesPage.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.sb2/src/org/maemo/esbox/internal/scratchbox/sb2/ui/preferences/Scratchbox2PreferencesPage.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -20,6 +20,8 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.maemo.esbox.internal.api.scratchbox.sb2.core.SB2PreferenceConstants;
+import org.maemo.esbox.internal.scratchbox.sb2.IHelpID;
+import org.maemo.mica.common.core.GeneralUtils;
/**
* General preference page for scratchbox 2
@@ -63,6 +65,8 @@
*/
public void createFieldEditors() {
+ GeneralUtils.setHelpID(getFieldEditorParent(), IHelpID.HID_GLOBAL_PREF_ESBOX_SCRATCHBOX_2);
+
feSbox2BuildMappingMode = new StringFieldEditor(
SB2PreferenceConstants.SB2_MAPPING_MODE.toString(),
"Build mapping mode:", getFieldEditorParent());
Modified: branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseCustomVirtualMachineConfiguration.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseCustomVirtualMachineConfiguration.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseCustomVirtualMachineConfiguration.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -10,9 +10,11 @@
*******************************************************************************/
package org.maemo.esbox.internal.api.vm.core;
+import com.nokia.cpp.internal.api.utils.core.TextUtils;
+
import org.maemo.esbox.internal.vm.Activator;
import org.maemo.esbox.vm.core.IVirtualMachineConfiguration;
-import org.maemo.mica.common.core.MicaException;
+import org.maemo.mica.common.core.*;
import org.maemo.mica.common.core.machine.ISharedFilesystemProvider;
import org.maemo.mica.protocol.ssh.SSHConfiguration;
@@ -26,13 +28,6 @@
*/
public abstract class BaseCustomVirtualMachineConfiguration implements IVirtualMachineConfiguration {
- private static final String SSH_HOST_ADDRESS = "sshHostAddress";
- private static final String SSH_HOST_PORT = "sshHostPort";
- private static final String TIMEOUT = "timeout";
- private static final String CIFS_PORT = "cifsPort";
- private static final String COMMAND_LAUNCH_PATTERN = "commandLaunchPattern";
- private static final String EXECUTABLE = "executable";
-
protected SSHConfiguration sshConfiguration;
protected String executable;
protected String commandLaunchPattern;
@@ -45,58 +40,27 @@
setupDefaults();
- String query = uri.getQuery();
- String[] queryParts = query.split("&");
- for (String queryPart : queryParts) {
- int equIdx = queryPart.indexOf("=");
- if (equIdx < 0)
- throw new MicaException("Invalid query component: " + queryPart);
-
- String key = queryPart.substring(0, equIdx);
- String value = queryPart.substring(equIdx + 1);
-
- try {
- if (decodeQueryPart(key, value)) {
- continue;
- } else {
- Activator.getErrorLogger().logError("Ignoring unknown query component: " + queryPart, null);
- }
- } catch (NumberFormatException e) {
- throw new MicaException("Invalid integer in query component: " + queryPart);
- }
+ URIQueryParser parser = new URIQueryParser();
+ parser.run(getURIQueryDecoder(), uri.getQuery());
+ String[] unknownParts = parser.getUnknownQueryComponents();
+ if (unknownParts.length > 0) {
+ Activator.getErrorLogger().logError("Ignoring unknown query components in URI: "
+ + TextUtils.catenateStrings(unknownParts, "&"), null);
}
}
/**
- * Decode a portion of the query URI.
- * @param key
- * @param value
- * @return true if handled, false if not
+ * Get the decoder for URI query components, which modifies the configuration accordingly.
+ * @return IURIQueryDecoder, never <code>null</code>
*/
- protected boolean decodeQueryPart(String key, String value) {
- if (key.equals(SSH_HOST_ADDRESS)) {
- sshConfiguration.setHostIPAddress(value);
- } else if (key.equals(SSH_HOST_PORT)) {
- sshConfiguration.setHostPort(Integer.parseInt(value));
- } else if (key.equals(TIMEOUT)) {
- sshConfiguration.setConnectionTimeout(Integer.parseInt(value));
- } else if (key.equals(CIFS_PORT)) {
- this.cifsPort = Integer.parseInt(value);
- } else if (key.equals(COMMAND_LAUNCH_PATTERN)) {
- this.commandLaunchPattern = value;
- } else if (key.equals(EXECUTABLE)) {
- this.executable = value;
- } else {
- return false;
- }
- return true;
- }
+ protected abstract IURIQueryDecoder getURIQueryDecoder();
+
/**
*
*/
protected void setupDefaults() {
- this.sshConfiguration.setConnectionTimeout(1);
+ this.sshConfiguration.setConnectionTimeout(5);
this.executable = null;
this.commandLaunchPattern = null;
this.cifsPort = 445;
Modified: branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BasePreferenceVirtualMachineConfiguration.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BasePreferenceVirtualMachineConfiguration.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BasePreferenceVirtualMachineConfiguration.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -66,8 +66,7 @@
getTargetAddr(), getTargetPort(),
getHostAddr(), 22,
getUserName(), getUserPassword(),
- 10 /*timeout*/
- );
+ 10 /*timeout*/);
return sshConfiguration;
}
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-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineController.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -476,7 +476,7 @@
machine,
new SubProgressMonitor(monitor, 1));
if (!status.isOK()) {
- Activator.getErrorLogger().logError(status.getMessage(), status.getException());
+ Activator.getErrorLogger().log(status);
}
// TODO we just log warnings instead of passing them back, otherwise "status.isOK()" checks everywhere fail
if (status.getSeverity() == IStatus.WARNING)
Added: branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineURIQueryDecoder.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineURIQueryDecoder.java (rev 0)
+++ branches/work_Ed/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualMachineURIQueryDecoder.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Nokia Corporation
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Ed Swartz (Nokia) - initial API and implementation
+ *******************************************************************************/
+
+package org.maemo.esbox.internal.api.vm.core;
+
+import org.maemo.mica.common.core.IURIQueryDecoder;
+import org.maemo.mica.common.core.machine.IMachineFactory;
+
+/**
+ * URI decoder for the common shared URI components
+ * @author eswartz
+ * @see IMachineFactory#createMachine(String, java.net.URI, org.maemo.mica.common.core.machine.ISharedFilesystemProvider)
+ *
+ */
+public class BaseVirtualMachineURIQueryDecoder implements IURIQueryDecoder {
+ private static final String SSH_HOST_ADDRESS = "sshHostAddress";
+ private static final String SSH_HOST_PORT = "sshHostPort";
+ private static final String TIMEOUT = "timeout";
+ private static final String CIFS_PORT = "cifsPort";
+ private static final String COMMAND_LAUNCH_PATTERN = "commandLaunchPattern";
+ private static final String EXECUTABLE = "executable";
+ protected BaseCustomVirtualMachineConfiguration config;
+
+ public BaseVirtualMachineURIQueryDecoder(BaseCustomVirtualMachineConfiguration config) {
+ this.config = config;
+ }
+ /**
+ * Decode a portion of the query URI.
+ * @param key
+ * @param value
+ * @return true if handled, false if not
+ */
+ public boolean decode(String key, String value) {
+ if (key.equals(SSH_HOST_ADDRESS)) {
+ config.sshConfiguration.setHostIPAddress(value);
+ } else if (key.equals(SSH_HOST_PORT)) {
+ config.sshConfiguration.setHostPort(Integer.parseInt(value));
+ } else if (key.equals(TIMEOUT)) {
+ config.sshConfiguration.setConnectionTimeout(Integer.parseInt(value));
+ } else if (key.equals(CIFS_PORT)) {
+ config.cifsPort = Integer.parseInt(value);
+ } else if (key.equals(COMMAND_LAUNCH_PATTERN)) {
+ config.commandLaunchPattern = value;
+ } else if (key.equals(EXECUTABLE)) {
+ config.executable = value;
+ } else {
+ return false;
+ }
+ return true;
+ }
+}
Modified: branches/work_Ed/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/CustomQemuConfiguration.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/CustomQemuConfiguration.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.vm.qemu/src/org/maemo/esbox/internal/vm/qemu/CustomQemuConfiguration.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.maemo.esbox.internal.vm.qemu;
-import org.maemo.esbox.internal.api.vm.core.BaseCustomVirtualMachineConfiguration;
+import org.maemo.esbox.internal.api.vm.core.*;
import org.maemo.esbox.vm.qemu.IQemuConfiguration;
+import org.maemo.mica.common.core.IURIQueryDecoder;
import org.maemo.mica.common.core.MicaException;
import org.maemo.mica.common.core.machine.ISharedFilesystemProvider;
@@ -24,15 +25,11 @@
*
*/
public class CustomQemuConfiguration extends BaseCustomVirtualMachineConfiguration implements IQemuConfiguration {
-
- private static final String INSTALL_PATH = "installPath";
- private static final String DISK_IMAGE_PATHS = "diskImagePaths";
- private static final String MEMORY_SIZE = "memorySize";
-
- private String installPath;
- private String diskImagePaths;
- private int memorySize;
+ protected String installPath;
+ protected String diskImagePaths;
+ protected int memorySize;
+
public CustomQemuConfiguration(URI uri, ISharedFilesystemProvider sharedFilesystemProvider) throws MicaException {
super(uri, sharedFilesystemProvider);
}
@@ -50,22 +47,35 @@
}
/* (non-Javadoc)
- * @see org.maemo.esbox.internal.vm.qemu.BaseCustomVirtualMachineConfiguration#decodeQueryPart(java.lang.String, java.lang.String)
+ * @see org.maemo.esbox.internal.api.vm.core.BaseCustomVirtualMachineConfiguration#getURIQueryDecoder()
*/
@Override
- protected boolean decodeQueryPart(String key, String value) {
- if (super.decodeQueryPart(key, value))
- return true;
- if (key.equals(INSTALL_PATH)) {
- this.installPath = value;
- } else if (key.equals(DISK_IMAGE_PATHS)) {
- this.diskImagePaths = value;
- } else if (key.equals(MEMORY_SIZE)) {
- this.executable = value;
- } else {
- return false;
- }
- return true;
+ protected IURIQueryDecoder getURIQueryDecoder() {
+ return new BaseVirtualMachineURIQueryDecoder(this) {
+
+ private static final String INSTALL_PATH = "installPath";
+ private static final String DISK_IMAGE_PATHS = "diskImagePaths";
+ private static final String MEMORY_SIZE = "memorySize";
+
+ /* (non-Javadoc)
+ * @see org.maemo.esbox.internal.vm.qemu.BaseCustomVirtualMachineConfiguration#decodeQueryPart(java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean decode(String key, String value) {
+ if (super.decode(key, value))
+ return true;
+ if (key.equals(INSTALL_PATH)) {
+ CustomQemuConfiguration.this.installPath = value;
+ } else if (key.equals(DISK_IMAGE_PATHS)) {
+ CustomQemuConfiguration.this.diskImagePaths = value;
+ } else if (key.equals(MEMORY_SIZE)) {
+ CustomQemuConfiguration.this.executable = value;
+ } else {
+ return false;
+ }
+ return true;
+ }
+ };
}
public String getInstallPath() {
Modified: branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/CustomVMwareConfiguration.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/CustomVMwareConfiguration.java 2008-12-11 07:42:00 UTC (rev 1057)
+++ branches/work_Ed/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/vm/vmware/CustomVMwareConfiguration.java 2008-12-12 01:59:14 UTC (rev 1058)
@@ -10,8 +10,9 @@
*******************************************************************************/
package org.maemo.esbox.internal.vm.vmware;
-import org.maemo.esbox.internal.api.vm.core.BaseCustomVirtualMachineConfiguration;
+import org.maemo.esbox.internal.api.vm.core.*;
import org.maemo.esbox.vm.vmware.IVMwareConfiguration;
+import org.maemo.mica.common.core.IURIQueryDecoder;
import org.maemo.mica.common.core.MicaException;
import org.maemo.mica.common.core.machine.ISharedFilesystemProvider;
@@ -42,19 +43,27 @@
}
/* (non-Javadoc)
- * @see org.maemo.esbox.internal.api.vm.core.BaseCustomVirtualMachineConfiguration#decodeQueryPart(java.lang.String, java.lang.String)
+ * @see org.maemo.esbox.internal.api.vm.core.BaseCustomVirtualMachineConfiguration#getURIQueryDecoder()
*/
@Override
- protected boolean decodeQueryPart(String key, String value) {
- if (super.decodeQueryPart(key, value))
- return true;
-
- if (key.equals(VMX_PATH)) {
- vmxPath = value;
- } else {
- return false;
- }
- return true;
+ protected IURIQueryDecoder getURIQueryDecoder() {
+ return new BaseVirtualMachineURIQueryDecoder(this) {
+ /* (non-Javadoc)
+ * @see org.maemo.esbox.internal.api.vm.core.BaseVirtualMachineURIQueryDecoder#decode(java.lang.String, java.lang.String)
+ */
+ @Override
+ public boolean decode(String key, String value) {
+ if (super.decode(key, value))
+ return true;
+
+ if (key.equals(VMX_PATH)) {
+ vmxPath = value;
+ } else {
+ return false;
+ }
+ return true;
+ }
+ };
}
/* (non-Javadoc)
More information about the Esbox-commits
mailing list