KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > launching > IRuntimeClasspathProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.launching;
12
13
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.debug.core.ILaunchConfiguration;
16
17 /**
18  * A classpath provider computes an unresolved classpath for a launch
19  * configuration, and resolves classpath entries for a launch configuration.
20  * A classpath provider is defined as an extension of type
21  * <code>org.eclipse.jdt.launching.classpathProvider</code>.
22  * <p>
23  * A provider is registered with an identifier that can be
24  * referenced by a launch configuration. A classpath provider is consulted
25  * to compute a classpath or source lookup path when a launch configuration
26  * references a provider in one or both of the following attributes:
27  * <ul>
28  * <li><code>ATTR_CLASSPATH_PROVIDER</code></li>
29  * <li><code>ATTR_SOURCE_PATH_PROVIDER</code></li>
30  * </ul>
31  * </p>
32  * A provider extension is defined in <code>plugin.xml</code>.
33  * Following is an example definition of a runtime classpath provider
34  * extension.
35  * <pre>
36  * &lt;extension point="org.eclipse.jdt.launching.classpathProviders"&gt;
37  * &lt;classpathProvider
38  * id="com.example.ExampleClasspathProvider"
39  * class="com.example.ExampleClasspathProviderImpl"
40  * &lt;/classpathProvider&gt;
41  * &lt;/extension&gt;
42  * </pre>
43  * The attributes are specified as follows:
44  * <ul>
45  * <li><code>id</code> specifies a unique identifier for this extension. This
46  * identifier may be used to reference a provider on one of the launch
47  * configuration attributes mentioned above.</li>
48  * <li><code>class</code> specifies the fully qualified name of the Java class
49  * that implements <code>IRuntimeClasspathProvider</code>.</li>
50  * </ul>
51  * </p>
52  * <p>
53  * Clients may implement this interface.
54  * </p>
55  *
56  * @since 2.0
57  */

58 public interface IRuntimeClasspathProvider {
59     
60     /**
61      * Computes and returns an unresolved classpath for the given launch configuration.
62      * Variable and container entries are not resolved.
63      *
64      * @param configuration launch configuration
65      * @return unresolved path
66      * @exception CoreException if unable to compute a path
67      */

68     public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException;
69     
70     /**
71      * Returns the resolved path corresponding to the given path, in the context of the
72      * given launch configuration. Variable and container entries are resolved. The returned
73      * (resolved) path need not have the same number of entries as the given (unresolved)
74      * path.
75      *
76      * @param entries entries to resolve
77      * @param configuration launch configuration context to resolve in
78      * @return resolved path
79      * @exception CoreException if unable to resolve a path
80      */

81     public IRuntimeClasspathEntry[] resolveClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException;
82
83 }
84
Popular Tags