1
package com.hp.mdbug.core.launcher;
2
/*******************************************************************************
3
* Copyright (c) 2005, 2008 IBM Corporation and others.
4
* All rights reserved. This program and the accompanying materials
5
* are made available under the terms of the Eclipse Public License v1.0
6
* which accompanies this distribution, and is available at
7
* http://www.eclipse.org/legal/epl-v10.html
10
* IBM Corporation - initial API and implementation
11
* Bjorn Freeman-Benson - initial API and implementation
12
*******************************************************************************/
15
import org.eclipse.core.runtime.CoreException;
16
import org.eclipse.core.runtime.IProgressMonitor;
17
import org.eclipse.core.runtime.IStatus;
18
import org.eclipse.core.runtime.Status;
19
import org.eclipse.debug.core.DebugPlugin;
20
import org.eclipse.debug.core.ILaunch;
21
import org.eclipse.debug.core.ILaunchConfiguration;
22
import org.eclipse.debug.core.ILaunchManager;
23
import org.eclipse.debug.core.model.IDebugTarget;
24
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
28
* Launches PDA program on a PDA interpretter written in Perl
30
public class MdbugLaunchDelegate extends LaunchConfigurationDelegate {
32
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
34
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
37
// if in debug mode, create a debug target
38
//if (mode.equals(ILaunchManager.DEBUG_MODE)) {
39
// IDebugTarget target = new PDADebugTarget(launch, p, requestPort, eventPort);
40
// launch.addDebugTarget(target);
45
* Throws an exception with a new status containing the given
46
* message and optional exception.
48
* @param message error message
49
* @param e underlying exception
50
* @throws CoreException
52
private void abort(String message, Throwable e) throws CoreException {
53
throw new CoreException(new Status(IStatus.ERROR, DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(), 0, message, e));
58
* @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#buildForLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
60
public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {