blob: 07b39737733f9787fa6522c4e2dfa5beaa710bbe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
/*******************************************************************************
* Copyright (c) 2008 Red Hat, Inc.
* 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:
* Elliott Baron <ebaron@redhat.com> - initial API and implementation
*******************************************************************************/
package org.eclipse.linuxtools.valgrind.launch;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView;
import org.osgi.framework.Version;
/**
* Interface for declaring a tool-specific delegate for a Valgrind
* <code>LaunchConfiguration</code>.
*/
public interface IValgrindLaunchDelegate {
/**
* To be called after Valgrind has been called for a given launch.
* This method is responsible for parsing Valgrind's output as needed
* by this tool
* @param config - the configuration to launch
* @param launch - the launch object to contribute processes and debug
* targets to
* @param logDir - directory to store Valgrind log output files
* @param monitor - to report progress
* @throws CoreException - if this method fails
* @since 3.0
*/
void handleLaunch(ILaunchConfiguration config, ILaunch launch, IPath logDir, IProgressMonitor monitor) throws CoreException;
/**
* Called after handleLaunch returns control to the main Valgrind launch
* delegate, and initializes the Valgrind view. This method is responsible
* for initializing the tool-specific portion of the Valgrind view with tool-specific
* output from the launch.
* @param view - the tool-specific part of the Valgrind view contributed via extension point
* @param contentDescription - String describing the launch that populated the view
* @param monitor - to report progress
* @throws CoreException - if this method fails
* @since 3.0
*/
void initializeView(IValgrindToolView view, String contentDescription, IProgressMonitor monitor) throws CoreException;
/**
* Parses attributes of an <code>ILaunchConfiguration</code> into an array
* of arguments to be passed to Valgrind
* @param config - the <code>ILaunchConfiguration</code>
* @param ver - the version of Valgrind, or null if version checking should not be performed
* @param logDir - directory to store Valgrind log output files
* @return an array of arguments that can appended to a <code>valgrind</code> command
* @throws CoreException - retrieving attributes from config failed
* @since 3.0
*/
String[] getCommandArray(ILaunchConfiguration config, Version ver, IPath logDir) throws CoreException;
}
|