# HG changeset patch # User Eugene Ostroukhov # Date 1280444341 25200 # Node ID c0bff5ed874c6d678d4708999d95aee1e0c18554 # Parent c278f0c8917f806078dc0995ffc521184255ceaa Local filesystem deployment was added diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/icons/full/obj16/folder.gif Binary file org.symbian.tools.mtw.ui/icons/full/obj16/folder.gif has changed diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/plugin.xml --- a/org.symbian.tools.mtw.ui/plugin.xml Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/plugin.xml Thu Jul 29 15:59:01 2010 -0700 @@ -140,13 +140,20 @@ class="org.symbian.tools.mtw.ui.deployment.bluetooth.BluetoothTargetType" icon="icons/full/obj16/bluetooth.gif" id="org.symbian.tools.mtw.bluetooth" + long-running="true" priority="10"> + + @@ -161,12 +168,19 @@ + adaptableType="org.symbian.tools.mtw.internal.deployment.targets.ExternalApplicationDeploymentType" + class="org.symbian.tools.mtw.internal.deployment.targets.AdapterFactory"> + + + + diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/schema/deploymentTargetType.exsd --- a/org.symbian.tools.mtw.ui/schema/deploymentTargetType.exsd Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/schema/deploymentTargetType.exsd Thu Jul 29 15:59:01 2010 -0700 @@ -76,6 +76,13 @@ + + + + Set to true if the deployment process is time-consuming and should be ran as an asynchroneous job. + + + diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/schema/targetPresentation.exsd --- a/org.symbian.tools.mtw.ui/schema/targetPresentation.exsd Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/schema/targetPresentation.exsd Thu Jul 29 15:59:01 2010 -0700 @@ -17,6 +17,9 @@ + + + @@ -46,13 +49,13 @@ - + - + diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DefaultDeploymentTypePresentation.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DefaultDeploymentTypePresentation.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DefaultDeploymentTypePresentation.java Thu Jul 29 15:59:01 2010 -0700 @@ -18,7 +18,8 @@ */ package org.symbian.tools.mtw.internal.deployment; -import org.eclipse.jface.wizard.IWizardPage; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -29,7 +30,7 @@ public class DefaultDeploymentTypePresentation implements ITargetDetailsPane { private Text text; - public void init(IWizardPage page) { + public void init(Context page) { } public void setTarget(IDeploymentTarget target) { @@ -43,4 +44,8 @@ public Control getControl() { return text; } + + public IStatus validate() { + return Status.OK_STATUS; + } } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetPresentationsManager.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetPresentationsManager.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetPresentationsManager.java Thu Jul 29 15:59:01 2010 -0700 @@ -34,7 +34,7 @@ public ITargetDetailsPane createDetailsPane(IDeploymentTargetType targetType) { readRegistry(); final IConfigurationElement element = presentations.get(targetType); - if (element != null && element.getAttribute("detailsPane") == null) { + if (element != null && element.getAttribute("detailsPane") != null) { try { return (ITargetDetailsPane) element.createExecutableExtension("detailsPane"); } catch (CoreException e) { @@ -50,7 +50,7 @@ final IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor( MTWCoreUI.PLUGIN_ID, "targetPresentation"); for (IConfigurationElement element : elements) { - final String runtimeId = element.getAttribute("targetId"); + final String runtimeId = element.getAttribute("targetTypeId"); final IDeploymentTargetType targetType = MTWCoreUI.getDefault().getDeploymentTypesRegistry() .getType(runtimeId); if (targetType == null) { diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetTypeDescriptor.java Thu Jul 29 15:59:01 2010 -0700 @@ -167,6 +167,9 @@ if (obj == null) { return false; } + if (obj instanceof IDeploymentTargetType) { + return obj.equals(type); + } if (getClass() != obj.getClass()) { return false; } @@ -181,4 +184,7 @@ return true; } + public boolean isLongRunning() { + return Boolean.valueOf(element.getAttribute("long-running")); + } } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWizardPage.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWizardPage.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWizardPage.java Thu Jul 29 15:59:01 2010 -0700 @@ -21,7 +21,9 @@ import java.lang.reflect.InvocationTargetException; import java.text.MessageFormat; import java.util.HashMap; +import java.util.HashSet; import java.util.Map; +import java.util.Set; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; @@ -53,19 +55,22 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.ui.model.WorkbenchLabelProvider; import org.eclipse.ui.part.PageBook; +import org.symbian.tools.mtw.core.MTWCore; +import org.symbian.tools.mtw.core.runtimes.IPackager; import org.symbian.tools.mtw.ui.MTWCoreUI; import org.symbian.tools.mtw.ui.ProjectMemo; import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; import org.symbian.tools.mtw.ui.deployment.ITargetDetailsPane; -public class DeploymentTargetWizardPage extends WizardPage { +public class DeploymentTargetWizardPage extends WizardPage implements ITargetDetailsPane.Context { private final DeployWizardContext context; + private PageBook descriptions; + private Control emptyness; + private final Set inited = new HashSet(); private TableViewer list; + private final Map panes = new HashMap(); private final IDeploymentTarget prev; - private PageBook descriptions; - private final Map panes = new HashMap(); - private Control emptyness; public DeploymentTargetWizardPage(DeployWizardContext context, ProjectMemo memo) { super("TargetPage", "Select Deployment Target", null); @@ -123,7 +128,7 @@ data.left = new FormAttachment(0, 5); data.right = new FormAttachment(100, -5); data.bottom = new FormAttachment(100, -5); - data.height = 50; + data.height = 80; descriptions.setLayoutData(data); data = new FormData(); @@ -138,25 +143,15 @@ data.right = new FormAttachment(search, -10); list.getControl().setLayoutData(data); + list.setInput(context.getDeploymentTargets()); + setPageComplete(false); - list.setInput(context.getDeploymentTargets()); - - setPageComplete(false); if (prev != null) { list.setSelection(new StructuredSelection(prev)); } - - if (!context.areTargetsReady()) { - setMessage("Press \"Discover\" to find more deployment targets", IStatus.WARNING); - } - setControl(root); } - protected void toggleLogging(boolean logging) { - context.setLogging(logging); - } - protected void doBluetoothSearch(final Button search) { try { final ISelection sel = list.getSelection(); @@ -174,7 +169,8 @@ list.setInput(context.getDeploymentTargets()); if (!sel.isEmpty()) { list.setSelection(sel); - selectDeploymentTarget((DeploymentTargetWrapper) ((IStructuredSelection)sel).getFirstElement()); + selectDeploymentTarget((DeploymentTargetWrapper) ((IStructuredSelection) sel) + .getFirstElement()); } else { DeploymentTargetWrapper[] deploymentTargets = context.getDeploymentTargets(); if (deploymentTargets.length == 0) { @@ -195,12 +191,18 @@ } } + private IPackager getPackager() { + return MTWCore.getDefault().getRuntimesManager().getPackager(context.getProject()); + } + protected void selectDeploymentTarget(DeploymentTargetWrapper target) { if (target != null) { + if (!inited.contains(target)) { + target.init(context.getProject(), getPackager(), + MTWCoreUI.getMemo(context.getProject()).getMemo(target.getType().getId(), target)); + inited.add(target); + } context.setTarget(target); - setMessage(null); - setErrorMessage(null); - setPageComplete(true); IDeploymentTargetType type = target.getType(); ITargetDetailsPane pane = panes.get(type); @@ -217,8 +219,30 @@ context.setTarget(null); setPageComplete(false); setMessage(null); - setErrorMessage("Select device or emulator to deploy the application"); } + revalidate(); + } + + protected void toggleLogging(boolean logging) { + context.setLogging(logging); + } + + public void revalidate() { + String error = null; + String warning = !context.areTargetsReady() ? "Press \"Discover\" to find more deployment targets" : null; + if (context.getTarget() == null) { + error = "Select device or emulator to deploy the application"; + } else { + final IStatus validate = panes.get(context.getTarget().getType()).validate(); + if (validate.getSeverity() == IStatus.ERROR) { + error = validate.getMessage(); + } else if (validate.getSeverity() == IStatus.WARNING) { + warning = validate.getMessage(); + } + } + setErrorMessage(error); + setMessage(warning, IStatus.WARNING); + setPageComplete(error == null); } } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/DeploymentTargetWrapper.java Thu Jul 29 15:59:01 2010 -0700 @@ -30,7 +30,6 @@ import org.symbian.tools.mtw.core.projects.IMTWProject; import org.symbian.tools.mtw.core.runtimes.IPackager; import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; -import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; public class DeploymentTargetWrapper implements IDeploymentTarget { public class WorkbenchAdapter2Wrapper implements IWorkbenchAdapter2 { @@ -76,9 +75,18 @@ return adapter.getParent(((DeploymentTargetWrapper) o).getActualTarget()); } } - final DeploymentTargetTypeDescriptor type; + + private final DeploymentTargetTypeDescriptor type; private final IDeploymentTarget target; + public void save(IMemento memento) { + target.save(memento); + } + + public void init(IMTWProject project, IPackager packager, IMemento memento) { + target.init(project, packager, memento); + } + public DeploymentTargetWrapper(IDeploymentTarget target, DeploymentTargetTypeDescriptor type) { this.target = target; this.type = type; @@ -146,15 +154,7 @@ return result; } - public void save(IMemento child) { - target.save(child); - } - - public void load(IMemento child) { - target.load(child); - } - - public IDeploymentTargetType getType() { + public DeploymentTargetTypeDescriptor getType() { return type; } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/TargetWorkbenchAdapter.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/TargetWorkbenchAdapter.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/TargetWorkbenchAdapter.java Thu Jul 29 15:59:01 2010 -0700 @@ -42,7 +42,7 @@ } public ImageDescriptor getImageDescriptor(Object object) { - return this.deploymentTargetWrapper.type.getImageDescriptor(); + return this.deploymentTargetWrapper.getType().getImageDescriptor(); } public RGB getForeground(Object element) { diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/externalapp/AdapterFactory.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/externalapp/AdapterFactory.java Thu Jul 29 10:51:59 2010 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/** - * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Symbian Foundation - initial contribution. - * Contributors: - * Description: - * Overview: - * Details: - * Platforms/Drives/Compatibility: - * Assumptions/Requirement/Pre-requisites: - * Failures and causes: - */ -package org.symbian.tools.mtw.internal.deployment.externalapp; - -import org.eclipse.core.runtime.IAdapterFactory; -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.ui.model.IWorkbenchAdapter; -import org.eclipse.ui.model.WorkbenchAdapter; - -@SuppressWarnings("rawtypes") -public class AdapterFactory implements IAdapterFactory { - private final IWorkbenchAdapter adapter = new WorkbenchAdapter() { - @Override - public ImageDescriptor getImageDescriptor(Object object) { - if (object instanceof ExternalApplicationDeploymentType) { - return ImageDescriptor.createFromImageData(((ExternalApplicationDeploymentType) object).getProgram() - .getImageData()); - } - return super.getImageDescriptor(object); - } - - public String getLabel(Object object) { - if (object instanceof ExternalApplicationDeploymentType) { - return ((ExternalApplicationDeploymentType) object).getName(); - } - return super.getLabel(object); - }; - }; - - public Object getAdapter(Object adaptableObject, Class adapterType) { - if (adaptableObject instanceof ExternalApplicationDeploymentType - && IWorkbenchAdapter.class.isAssignableFrom(adapterType)) { - return adapter; - } - return null; - } - - public Class[] getAdapterList() { - return new Class[] { IWorkbenchAdapter.class }; - } - -} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/externalapp/ExternalApplicationDeploymentType.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/externalapp/ExternalApplicationDeploymentType.java Thu Jul 29 10:51:59 2010 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/** - * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). - * All rights reserved. - * This component and the accompanying materials are made available - * under the terms of the License "Eclipse Public License v1.0" - * which accompanies this distribution, and is available - * at the URL "http://www.eclipse.org/legal/epl-v10.html". - * - * Initial Contributors: - * Symbian Foundation - initial contribution. - * Contributors: - * Description: - * Overview: - * Details: - * Platforms/Drives/Compatibility: - * Assumptions/Requirement/Pre-requisites: - * Failures and causes: - */ -package org.symbian.tools.mtw.internal.deployment.externalapp; - -import java.io.File; - -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.PlatformObject; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.jobs.ISchedulingRule; -import org.eclipse.swt.program.Program; -import org.eclipse.ui.IMemento; -import org.symbian.tools.mtw.core.MTWCore; -import org.symbian.tools.mtw.core.projects.IMTWProject; -import org.symbian.tools.mtw.core.runtimes.IPackager; -import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; -import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; - -public class ExternalApplicationDeploymentType extends PlatformObject implements IDeploymentTargetType, - IDeploymentTarget { - - private IMTWProject project; - - public IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) - throws CoreException { - Program app = getExternalApp(project); - File file = packager.packageApplication(project, monitor); - if (file != null) { - app.execute(file.toString()); - return new Status( - IStatus.OK, - MTWCore.PLUGIN_ID, - "Mobile web application was passed as an argument to external application. Please follow its prompts to complete deployment."); - } else { - return new Status(IStatus.ERROR, MTWCore.PLUGIN_ID, "Application packaging failed"); - } - } - - public void discoverTargets(IProgressMonitor monitor) throws CoreException { - // Do nothing - } - - public IDeploymentTarget findTarget(IMTWProject project, String id) { - if (getExternalApp(project) != null) { - return this; - } else { - return null; - } - } - - public String getDescription() { - return getExternalApp(project).getName(); - } - - private Program getExternalApp(IMTWProject project) { - this.project = project; - IPackager packager = MTWCore.getDefault().getRuntimesManager().getPackager(project); - if (packager != null) { - return Program.findProgram(packager.getFileType(project)); - } else { - return null; - } - } - - public String getId() { - return "mtw.externalapp"; - } - - public String getName() { - return "Use external application"; - } - - public Program getProgram() { - return getExternalApp(project); - } - - public ISchedulingRule getSchedulingRule(IDeploymentTarget target) { - return null; - } - - public IDeploymentTarget[] getTargets(IMTWProject project) { - if (getExternalApp(project) != null) { - return new IDeploymentTarget[] { this }; - } else { - return null; - } - } - - public void load(IMemento memento) { - // Do nothing - } - - public void save(IMemento memento) { - // Do nothing - } - - public boolean targetsDiscovered() { - return true; - } -} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/externalapp/FilesystemDeploymentTarget.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/externalapp/FilesystemDeploymentTarget.java Thu Jul 29 15:59:01 2010 -0700 @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Symbian Foundation - initial contribution. + * Contributors: + * Description: + * Overview: + * Details: + * Platforms/Drives/Compatibility: + * Assumptions/Requirement/Pre-requisites: + * Failures and causes: + */ +package org.symbian.tools.mtw.internal.deployment.externalapp; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.symbian.tools.mtw.core.projects.IMTWProject; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; + +public class FilesystemDeploymentTarget implements IDeploymentTargetType { + + public FilesystemDeploymentTarget() { + // TODO Auto-generated constructor stub + } + + public IDeploymentTarget[] getTargets(IMTWProject project) { + // TODO Auto-generated method stub + return null; + } + + public void discoverTargets(IProgressMonitor monitor) throws CoreException { + // TODO Auto-generated method stub + + } + + public IDeploymentTarget findTarget(IMTWProject project, String id) { + // TODO Auto-generated method stub + return null; + } + + public boolean targetsDiscovered() { + // TODO Auto-generated method stub + return false; + } + + public ISchedulingRule getSchedulingRule(IDeploymentTarget target) { + // TODO Auto-generated method stub + return null; + } + +} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/AdapterFactory.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/AdapterFactory.java Thu Jul 29 15:59:01 2010 -0700 @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Symbian Foundation - initial contribution. + * Contributors: + * Description: + * Overview: + * Details: + * Platforms/Drives/Compatibility: + * Assumptions/Requirement/Pre-requisites: + * Failures and causes: + */ +package org.symbian.tools.mtw.internal.deployment.targets; + +import org.eclipse.core.runtime.IAdapterFactory; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.model.IWorkbenchAdapter; +import org.eclipse.ui.model.WorkbenchAdapter; + +@SuppressWarnings("rawtypes") +public class AdapterFactory implements IAdapterFactory { + private final IWorkbenchAdapter adapter = new WorkbenchAdapter() { + @Override + public ImageDescriptor getImageDescriptor(Object object) { + if (object instanceof ExternalApplicationDeploymentType) { + return ImageDescriptor.createFromImageData(((ExternalApplicationDeploymentType) object).getProgram() + .getImageData()); + } + return super.getImageDescriptor(object); + } + + public String getLabel(Object object) { + if (object instanceof ExternalApplicationDeploymentType) { + return ((ExternalApplicationDeploymentType) object).getName(); + } + return super.getLabel(object); + }; + }; + + public Object getAdapter(Object adaptableObject, Class adapterType) { + if (adaptableObject instanceof ExternalApplicationDeploymentType + && IWorkbenchAdapter.class.isAssignableFrom(adapterType)) { + return adapter; + } + return null; + } + + public Class[] getAdapterList() { + return new Class[] { IWorkbenchAdapter.class }; + } + +} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/ExternalApplicationDeploymentType.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/ExternalApplicationDeploymentType.java Thu Jul 29 15:59:01 2010 -0700 @@ -0,0 +1,118 @@ +/** + * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Symbian Foundation - initial contribution. + * Contributors: + * Description: + * Overview: + * Details: + * Platforms/Drives/Compatibility: + * Assumptions/Requirement/Pre-requisites: + * Failures and causes: + */ +package org.symbian.tools.mtw.internal.deployment.targets; + +import java.io.File; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.eclipse.swt.program.Program; +import org.eclipse.ui.IMemento; +import org.symbian.tools.mtw.core.MTWCore; +import org.symbian.tools.mtw.core.projects.IMTWProject; +import org.symbian.tools.mtw.core.runtimes.IPackager; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; + +public class ExternalApplicationDeploymentType extends PlatformObject implements IDeploymentTargetType, + IDeploymentTarget { + + private IMTWProject project; + + public IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) + throws CoreException { + Program app = getExternalApp(project); + File file = packager.packageApplication(project, monitor); + if (file != null) { + app.execute(file.toString()); + return new Status( + IStatus.OK, + MTWCore.PLUGIN_ID, + "Mobile web application was passed as an argument to external application. Please follow its prompts to complete deployment."); + } else { + return new Status(IStatus.ERROR, MTWCore.PLUGIN_ID, "Application packaging failed"); + } + } + + public void discoverTargets(IProgressMonitor monitor) throws CoreException { + // Do nothing + } + + public IDeploymentTarget findTarget(IMTWProject project, String id) { + if (getExternalApp(project) != null) { + return this; + } else { + return null; + } + } + + public String getDescription() { + return getExternalApp(project).getName(); + } + + private Program getExternalApp(IMTWProject project) { + this.project = project; + IPackager packager = MTWCore.getDefault().getRuntimesManager().getPackager(project); + if (packager != null) { + return Program.findProgram(packager.getFileType(project)); + } else { + return null; + } + } + + public String getId() { + return "mtw.externalapp"; + } + + public String getName() { + return "Use external application"; + } + + public Program getProgram() { + return getExternalApp(project); + } + + public ISchedulingRule getSchedulingRule(IDeploymentTarget target) { + return null; + } + + public IDeploymentTarget[] getTargets(IMTWProject project) { + if (getExternalApp(project) != null) { + return new IDeploymentTarget[] { this }; + } else { + return null; + } + } + + public void init(IMTWProject project, IPackager packager, IMemento memento) { + // Do nothing + } + + public void save(IMemento memento) { + // Do nothing + } + + public boolean targetsDiscovered() { + return true; + } +} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/FilesystemDeploymentTarget.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/FilesystemDeploymentTarget.java Thu Jul 29 15:59:01 2010 -0700 @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Symbian Foundation - initial contribution. + * Contributors: + * Description: + * Overview: + * Details: + * Platforms/Drives/Compatibility: + * Assumptions/Requirement/Pre-requisites: + * Failures and causes: + */ +package org.symbian.tools.mtw.internal.deployment.targets; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.eclipse.ui.IMemento; +import org.symbian.tools.mtw.core.projects.IMTWProject; +import org.symbian.tools.mtw.core.runtimes.IPackager; +import org.symbian.tools.mtw.ui.MTWCoreUI; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; + +public class FilesystemDeploymentTarget extends PlatformObject implements IDeploymentTargetType, IDeploymentTarget { + private String defaultName; + private IPath path; + + public IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) throws CoreException { + final File file = packager.packageApplication(project, monitor); + try { + final InputStream inputStream = new BufferedInputStream(new FileInputStream(file)); + final OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(path.toFile())); + try { + final byte[] buffer = new byte[16384]; + int read = -1; + while ((read = inputStream.read(buffer)) > 0) { + outputStream.write(buffer, 0, read); + } + } finally { + inputStream.close(); + outputStream.close(); + } + } catch (IOException e) { + throw new CoreException( + new Status(IStatus.ERROR, MTWCoreUI.PLUGIN_ID, "Failed to copy application file", e)); + } finally { + file.delete(); + } + return Status.OK_STATUS; + } + + public void discoverTargets(IProgressMonitor monitor) throws CoreException { + // Do nothing + } + + public IDeploymentTarget findTarget(IMTWProject project, String id) { + return getId().equals(id) ? this : null; + } + + public String getDefaultName() { + return defaultName; + } + + public String getDescription() { + return "Copies application package to a location in the local filesystem"; + } + + public String getId() { + return "mtw.filesystem"; + } + + public String getName() { + return "Local filesystem"; + } + + public IPath getPath() { + return path; + } + + public ISchedulingRule getSchedulingRule(IDeploymentTarget target) { + return null; + } + + public IDeploymentTarget[] getTargets(IMTWProject project) { + return new IDeploymentTarget[] { this }; + } + + public void init(IMTWProject project, IPackager packager, IMemento memento) { + defaultName = new Path(project.getName()).addFileExtension(packager.getFileType(project)).toOSString(); + path = null; + String string = memento != null ? memento.getString("path") : null; + if (string == null) { + string = MTWCoreUI.getDefault().getPreferenceStore().getString("path"); + if (string != null) { + final IPath p = Path.fromPortableString(string); + if (p.toFile().isDirectory()) { + this.path = p.append(defaultName); + } + } + } else { + path = Path.fromPortableString(string); + if (!path.removeLastSegments(1).toFile().isDirectory()) { + path = null; + } + } + } + + public void save(IMemento memento) { + memento.putString("path", path.toPortableString()); + MTWCoreUI.getDefault().getPreferenceStore().setValue("path", path.removeLastSegments(1).toPortableString()); + } + + public void setPath(IPath path) { + this.path = path; + } + + public boolean targetsDiscovered() { + return true; + } + +} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/LocalFileSystemPane.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/internal/deployment/targets/LocalFileSystemPane.java Thu Jul 29 15:59:01 2010 -0700 @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2010 Symbian Foundation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Symbian Foundation - initial contribution. + * Contributors: + * Description: + * Overview: + * Details: + * Platforms/Drives/Compatibility: + * Assumptions/Requirement/Pre-requisites: + * Failures and causes: + */ +package org.symbian.tools.mtw.internal.deployment.targets; + +import java.io.File; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; +import org.symbian.tools.mtw.ui.MTWCoreUI; +import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; +import org.symbian.tools.mtw.ui.deployment.ITargetDetailsPane; + +public class LocalFileSystemPane implements ITargetDetailsPane { + private Composite root; + private Text location; + private FilesystemDeploymentTarget target; + private Context page; + + public void init(Context page) { + this.page = page; + } + + public void setTarget(IDeploymentTarget target) { + this.target = (FilesystemDeploymentTarget) target; + IPath path = this.target.getPath(); + String string; + if (path == null) { + string = ""; + } else { + string = path.toOSString(); + } + location.setText(string); + page.revalidate(); + } + + public void createControl(Composite parent) { + root = new Composite(parent, SWT.NONE); + root.setLayout(new GridLayout(2, false)); + Label label = new Label(root, SWT.NONE); + label.setText("File name:"); + GridDataFactory.generate(label, 2, 1); + location = new Text(root, SWT.BORDER); + location.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + location.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + page.revalidate(); + } + }); + final Button button = new Button(root, SWT.NONE); + button.setText("Browse..."); + button.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + browse(); + } + }); + } + + protected void browse() { + final FileDialog dialog = new FileDialog(location.getShell(), SWT.SAVE); + dialog.setText("Select Application Package Location"); + dialog.setFileName(target.getDefaultName()); + final IPath path = target.getPath(); + if (path != null) { + dialog.setFilterPath(path.removeLastSegments(1).toOSString()); + } + String newPath = dialog.open(); + if (newPath != null) { + location.setText(newPath); + page.revalidate(); + } + } + + public IStatus validate() { + target.setPath(null); + String path = location.getText(); + if (path.trim().length() == 0) { + return new Status(IStatus.ERROR, MTWCoreUI.PLUGIN_ID, "File name must be specified"); + } else { + final File file = new File(path); + if (!file.getParentFile().isDirectory()) { + return new Status(IStatus.ERROR, MTWCoreUI.PLUGIN_ID, String.format("%s is not a valid folder", + file.getParent())); + } else { + IStatus status = ResourcesPlugin.getWorkspace().validateName(file.getName(), IResource.FILE); + if (status.getSeverity() == IStatus.ERROR) { + return status; + } else { + Path p = new Path(path.trim()); + target.setPath(p); + if (p.toFile().exists()) { + return new Status(IStatus.WARNING, MTWCoreUI.PLUGIN_ID, + "Target file already exists. It will be overwritten."); + } else { + return status; + } + } + } + } + } + + public Control getControl() { + return root; + } + +} diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/ProjectMemo.java Thu Jul 29 15:59:01 2010 -0700 @@ -36,7 +36,7 @@ import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; public class ProjectMemo { - private static final String DEPLOYMENT_PROVIDER = "providerId"; + private static final String TARGET_TYPE = "typeId"; private static final String TARGET = "targetId"; private static final String TARGET_CONFIGURATION = "target"; private static final String MEMO_TYPE = "deployment"; @@ -51,9 +51,21 @@ public synchronized void setDeploymentTarget(String providerId, IDeploymentTarget target) { try { checkMemento(); - memento.putString(DEPLOYMENT_PROVIDER, providerId); + memento.putString(TARGET_TYPE, providerId); memento.putString(TARGET, target.getId()); - final IMemento child = memento.createChild(TARGET_CONFIGURATION); + IMemento child = null; + IMemento[] children = memento.getChildren(TARGET_CONFIGURATION); + for (IMemento memento : children) { + if (providerId.equals(memento.getString(TARGET_TYPE)) + && target.getId().equals(memento.getString(TARGET))) { + child = memento; + } + } + if (child == null) { + child = memento.createChild(TARGET_CONFIGURATION); + child.putString(TARGET_TYPE, providerId); + child.putString(TARGET, target.getId()); + } target.save(child); saveMemento(); } catch (CoreException e) { @@ -93,17 +105,13 @@ public IDeploymentTarget getPreviousDeploymentTarget() { try { checkMemento(); - String type = memento.getString(DEPLOYMENT_PROVIDER); + String type = memento.getString(TARGET_TYPE); if (type != null) { final IDeploymentTargetType provider = MTWCoreUI.getDefault().getDeploymentTypesRegistry() .getType(type); if (provider != null) { IDeploymentTarget target = provider.findTarget(project, memento.getString(TARGET)); if (target != null) { - IMemento child = memento.getChild(TARGET_CONFIGURATION); - if (child != null) { - target.load(child); - } return target; } } @@ -116,4 +124,17 @@ return null; } + public IMemento getMemo(String targetType, IDeploymentTarget target) { + if (memento != null) { + IMemento[] children = memento.getChildren(TARGET_CONFIGURATION); + for (IMemento memento : children) { + if (targetType.equals(memento.getString(TARGET_TYPE)) + && target.getId().equals(memento.getString(TARGET))) { + return memento; + } + } + } + return null; + } + } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/DeployWizard.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/DeployWizard.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/DeployWizard.java Thu Jul 29 15:59:01 2010 -0700 @@ -18,12 +18,15 @@ */ package org.symbian.tools.mtw.ui.deployment; +import java.lang.reflect.InvocationTargetException; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.jobs.ISchedulingRule; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.MultiRule; +import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.wizard.Wizard; import org.eclipse.ui.statushandlers.StatusManager; import org.symbian.tools.mtw.core.MTWCore; @@ -35,7 +38,7 @@ import org.symbian.tools.mtw.ui.MTWCoreUI; import org.symbian.tools.mtw.ui.ProjectMemo; -public class DeployWizard extends Wizard { +public final class DeployWizard extends Wizard { private final DeployWizardContext context; private final IMTWProject project; @@ -53,7 +56,34 @@ @Override public boolean performFinish() { - return deploy(); + final DeploymentTargetWrapper target = context.getTarget(); + if (target.getType().isLongRunning()) { + DeployJob job = new DeployJob(context.getProject(), target); + job.schedule(); + return true; + } else { + final IStatus[] retval = new IStatus[1]; + try { + getContainer().run(false, true, new IRunnableWithProgress() { + public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + retval[0] = doDeploy(target, context.getProject(), monitor); + } + }); + } catch (InvocationTargetException e) { + MTWCoreUI.log(e); + } catch (InterruptedException e) { + MTWCoreUI.log(e); + } + switch (retval[0].getSeverity()) { + case IStatus.ERROR: + StatusManager.getManager().handle(retval[0], StatusManager.SHOW | StatusManager.BLOCK); + return false; + case IStatus.WARNING: + StatusManager.getManager().handle(retval[0], StatusManager.SHOW | StatusManager.BLOCK); + default: + return true; + } + } } @Override @@ -61,14 +91,17 @@ return false; } - /** - * deploys the actual widget. - */ - private boolean deploy() { - DeploymentTargetWrapper target = context.getTarget(); - DeployJob job = new DeployJob(context.getProject(), target); - job.schedule(); - return true; + private IStatus doDeploy(DeploymentTargetWrapper target, IMTWProject project, IProgressMonitor monitor) { + IStatus status; + try { + IPackager packager = MTWCore.getDefault().getRuntimesManager().getPackager(project); + status = target.deploy(project, packager, monitor); + } catch (CoreException e) { + status = e.getStatus(); + } + ProjectMemo memo = MTWCoreUI.getMemo(project); + memo.setDeploymentTarget(target.getProviderId(), target); + return status; } private final class DeployJob extends Job { @@ -90,18 +123,10 @@ } public IStatus run(IProgressMonitor monitor) { - IStatus status; - try { - IPackager packager = MTWCore.getDefault().getRuntimesManager().getPackager(project); - status = target.deploy(project, packager, monitor); - } catch (CoreException e) { - status = e.getStatus(); - } + final IStatus status = doDeploy(target, project, monitor); if (status.getSeverity() != IStatus.ERROR && status.getSeverity() != IStatus.WARNING) { StatusManager.getManager().handle(status, StatusManager.SHOW); } - ProjectMemo memo = MTWCoreUI.getMemo(project); - memo.setDeploymentTarget(target.getProviderId(), target); return status; } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/IDeploymentTarget.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/IDeploymentTarget.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/IDeploymentTarget.java Thu Jul 29 15:59:01 2010 -0700 @@ -83,8 +83,7 @@ void save(IMemento memento); /** - * Restore project-specific deployment settings. Target should be reset to - * default state if its state cannot be restored. + * Initialize target for project deployment. */ - void load(IMemento memento); + void init(IMTWProject project, IPackager packager, IMemento memento); } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/ITargetDetailsPane.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/ITargetDetailsPane.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/ITargetDetailsPane.java Thu Jul 29 15:59:01 2010 -0700 @@ -18,7 +18,7 @@ */ package org.symbian.tools.mtw.ui.deployment; -import org.eclipse.jface.wizard.IWizardPage; +import org.eclipse.core.runtime.IStatus; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -32,11 +32,12 @@ * @author Eugene Ostroukhov (eugeneo@symbian.org) */ public interface ITargetDetailsPane { - void init(IWizardPage page); - + interface Context { + void revalidate(); + } + void init(Context page); void setTarget(IDeploymentTarget target); - void createControl(Composite parent); - Control getControl(); + IStatus validate(); } diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/bluetooth/BluetoothTarget.java --- a/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/bluetooth/BluetoothTarget.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.mtw.ui/src/org/symbian/tools/mtw/ui/deployment/bluetooth/BluetoothTarget.java Thu Jul 29 15:59:01 2010 -0700 @@ -45,6 +45,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.MultiStatus; import org.eclipse.core.runtime.PlatformObject; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.SubProgressMonitor; @@ -70,8 +71,9 @@ this.provider = provider; } - public IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) - throws CoreException { + public IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) throws CoreException { + message = "Deployment was successful. Please follow on-screen instructions to complete application deployment on your device."; + statuses.clear(); monitor.beginTask(String.format("Deploying application %s to %s", project.getName(), name), IProgressMonitor.UNKNOWN); final File application = packager.packageApplication(project, new SubProgressMonitor(monitor, 100)); @@ -81,7 +83,11 @@ application.delete(); } monitor.done(); - return new Status(IStatus.OK, MTWCore.PLUGIN_ID, message); + MultiStatus multiStatus = new MultiStatus(MTWCore.PLUGIN_ID, 0, message, null); + for (IStatus status : statuses) { + multiStatus.add(status); + } + return multiStatus; } private void deployWidget(File inputWidget, String fileType, IProgressMonitor progressMonitor) throws CoreException { @@ -292,13 +298,12 @@ return serviceURL; } - public void load(IMemento memento) { + public void init(IMTWProject project, IPackager packager, IMemento memento) { // nothing } public void save(IMemento memento) { // nothing - } public void setAddress(RemoteDevice device) { diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.wrttools.product/launch/WRT IDE Product (Windows).launch --- a/org.symbian.tools.wrttools.product/launch/WRT IDE Product (Windows).launch Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.wrttools.product/launch/WRT IDE Product (Windows).launch Thu Jul 29 15:59:01 2010 -0700 @@ -22,8 +22,8 @@ - - + + diff -r c278f0c8917f -r c0bff5ed874c org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/core/deploy/emulator/Emulator.java --- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/core/deploy/emulator/Emulator.java Thu Jul 29 10:51:59 2010 -0700 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/core/deploy/emulator/Emulator.java Thu Jul 29 15:59:01 2010 -0700 @@ -115,7 +115,7 @@ // Do nothing } - public void load(IMemento memento) { + public void init(IMTWProject project, IPackager packager, IMemento memento) { // Do nothing }