KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > sourcelookup > ISourcePathComputer


1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 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.debug.core.sourcelookup;
12
13 import org.eclipse.debug.core.DebugPlugin;
14
15 /**
16  * A source path computer computes the default source lookup path (set of source
17  * containers that should be considered) for a launch configuration.
18  * <p>
19  * A source path computer is contributed in plug-in XML via the
20  * <code>sourcePathComputers</code> extension point, that provides a delegate
21  * to compute the path specific to a launch configuration. Following
22  * is an example contribution.
23  * <pre>
24  * &lt;extension point=&quot;org.eclipse.debug.core.sourcePathComputers&quot;&gt;
25  * &lt;sourcePathComputer
26  * id=&quot;org.eclipse.example.exampleSourcePathComputer&quot;
27  * class=&quot;org.eclipse.example.SourcePathComputer&quot;&gt;
28  * &lt;/sourcePathComputer&gt;
29  * &lt;/extension&gt;
30  * </pre>
31  * </p>
32  * <p>
33  * A source path computer can be associated with a launch configuration type
34  * via the <code>sourcePathComputerId</code> attribute of a launch configuration
35  * type extension. As well, a launch configuration can specify its own
36  * source path computer to use via the <code>ATTR_SOURCE_PATH_COMPUTER_ID</code>
37  * attribute.
38  * </p>
39  * <p>
40  * Clients are not intended to implement this interface. Instead, clients contributing
41  * a source path computer provide an implementation of
42  * {@link org.eclipse.debug.core.sourcelookup.ISourcePathComputerDelegate}.
43  * </p>
44  * @since 3.0
45  */

46 public interface ISourcePathComputer extends ISourcePathComputerDelegate {
47     
48     /**
49      * Launch configuration attribute to specify a source path computer
50      * that should be used for a launch configuration. The value is an identifier
51      * of a source path computer extension, or unspecified (<code>null</code>), if the
52      * default source path computer should be used. A default source path computer
53      * can be associated with a launch configuration type.
54      */

55     public static final String JavaDoc ATTR_SOURCE_PATH_COMPUTER_ID = DebugPlugin.getUniqueIdentifier() + ".SOURCE_PATH_COMPUTER_ID"; //$NON-NLS-1$
56

57     /**
58      * Returns the unique identifier for this source path computer.
59      *
60      * @return the unique identifier for this source path computer
61      */

62     public String JavaDoc getId();
63     
64 }
65
Popular Tags