01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.launching;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.debug.core.ILaunchConfiguration;
14:
15: /**
16: * A classpath provider computes an unresolved classpath for a launch
17: * configuration, and resolves classpath entries for a launch configuration.
18: * A classpath provider is defined as an extension of type
19: * <code>org.eclipse.jdt.launching.classpathProvider</code>.
20: * <p>
21: * A provider is registered with an identifier that can be
22: * referenced by a launch configuration. A classpath provider is consulted
23: * to compute a classpath or source lookup path when a launch configuration
24: * references a provider in one or both of the following attributes:
25: * <ul>
26: * <li><code>ATTR_CLASSPATH_PROVIDER</code></li>
27: * <li><code>ATTR_SOURCE_PATH_PROVIDER</code></li>
28: * </ul>
29: * </p>
30: * A provider extension is defined in <code>plugin.xml</code>.
31: * Following is an example definition of a runtime classpath provider
32: * extension.
33: * <pre>
34: * <extension point="org.eclipse.jdt.launching.classpathProviders">
35: * <classpathProvider
36: * id="com.example.ExampleClasspathProvider"
37: * class="com.example.ExampleClasspathProviderImpl"
38: * </classpathProvider>
39: * </extension>
40: * </pre>
41: * The attributes are specified as follows:
42: * <ul>
43: * <li><code>id</code> specifies a unique identifier for this extension. This
44: * identifier may be used to reference a provider on one of the launch
45: * configuration attributes mentioned above.</li>
46: * <li><code>class</code> specifies the fully qualified name of the Java class
47: * that implements <code>IRuntimeClasspathProvider</code>.</li>
48: * </ul>
49: * </p>
50: * <p>
51: * Clients may implement this interface.
52: * </p>
53: *
54: * @since 2.0
55: */
56: public interface IRuntimeClasspathProvider {
57:
58: /**
59: * Computes and returns an unresolved classpath for the given launch configuration.
60: * Variable and container entries are not resolved.
61: *
62: * @param configuration launch configuration
63: * @return unresolved path
64: * @exception CoreException if unable to compute a path
65: */
66: public IRuntimeClasspathEntry[] computeUnresolvedClasspath(
67: ILaunchConfiguration configuration) throws CoreException;
68:
69: /**
70: * Returns the resolved path corresponding to the given path, in the context of the
71: * given launch configuration. Variable and container entries are resolved. The returned
72: * (resolved) path need not have the same number of entries as the given (unresolved)
73: * path.
74: *
75: * @param entries entries to resolve
76: * @param configuration launch configuration context to resolve in
77: * @return resolved path
78: * @exception CoreException if unable to resolve a path
79: */
80: public IRuntimeClasspathEntry[] resolveClasspath(
81: IRuntimeClasspathEntry[] entries,
82: ILaunchConfiguration configuration) throws CoreException;
83:
84: }
|