28 import org.eclipse.core.runtime.jobs.ISchedulingRule; |
28 import org.eclipse.core.runtime.jobs.ISchedulingRule; |
29 import org.eclipse.swt.program.Program; |
29 import org.eclipse.swt.program.Program; |
30 import org.eclipse.ui.IMemento; |
30 import org.eclipse.ui.IMemento; |
31 import org.symbian.tools.mtw.core.MTWCore; |
31 import org.symbian.tools.mtw.core.MTWCore; |
32 import org.symbian.tools.mtw.core.projects.IMTWProject; |
32 import org.symbian.tools.mtw.core.projects.IMTWProject; |
33 import org.symbian.tools.mtw.core.runtimes.IMobileWebRuntime; |
|
34 import org.symbian.tools.mtw.core.runtimes.IPackager; |
33 import org.symbian.tools.mtw.core.runtimes.IPackager; |
35 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; |
34 import org.symbian.tools.mtw.ui.deployment.IDeploymentTarget; |
36 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; |
35 import org.symbian.tools.mtw.ui.deployment.IDeploymentTargetType; |
37 |
36 |
38 public class ExternalApplicationDeploymentType extends PlatformObject implements IDeploymentTargetType, |
37 public class ExternalApplicationDeploymentType extends PlatformObject implements IDeploymentTargetType, |
39 IDeploymentTarget { |
38 IDeploymentTarget { |
40 |
39 |
41 private IMTWProject project; |
40 private IMTWProject project; |
42 |
41 |
43 public IStatus deploy(IMTWProject project, IMobileWebRuntime runtime, IProgressMonitor monitor) |
42 public IStatus deploy(IMTWProject project, IPackager packager, IProgressMonitor monitor) |
44 throws CoreException { |
43 throws CoreException { |
45 Program app = getExternalApp(project); |
44 Program app = getExternalApp(project); |
46 IPackager packager = MTWCore.getDefault().getRuntimesManager().getPackager(project, runtime); |
45 File file = packager.packageApplication(project, monitor); |
47 File file = packager.packageApplication(project, runtime, monitor); |
|
48 if (file != null) { |
46 if (file != null) { |
49 app.execute(file.toString()); |
47 app.execute(file.toString()); |
50 return new Status( |
48 return new Status( |
51 IStatus.OK, |
49 IStatus.OK, |
52 MTWCore.PLUGIN_ID, |
50 MTWCore.PLUGIN_ID, |