KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > launching > sourcelookup > IJavaSourceLocation


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.sourcelookup;
12
13
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.core.runtime.IAdaptable;
16  
17 /**
18  * A repository of source code. A source location is capable of retrieving
19  * source elements.
20  * <p>
21  * For example, a source location could be a project, zip/archive
22  * file, or a directory in the file system.
23  * </p>
24  * <p>
25  * This interface is may be implemented by clients.
26  * </p>
27  * @since 2.0
28  * @deprecated In 3.0, the debug platform provides source lookup facilities that
29  * should be used in place of the Java source lookup support provided in 2.0.
30  * The new facilities provide a source lookup director that coordinates source
31  * lookup among a set of participants, searching a set of source containers.
32  * See the following packages: <code>org.eclipse.debug.core.sourcelookup</code>
33  * and <code>org.eclipse.debug.core.sourcelookup.containers</code>. This interface
34  * has been replaced by
35  * <code>org.eclipse.debug.core.sourcelookup.ISourceContainer</code>.
36  */

37 public interface IJavaSourceLocation extends IAdaptable {
38     
39     /**
40      * Returns an object representing the source code
41      * for a type with the specified name, or <code>null</code>
42      * if none could be found. The name is
43      * a fully qualified type name, and may contain the '$'
44      * character when referring to inner types. For example,
45      * <code>java.lang.String</code>. The source element
46      * returned is implementation specific - for example, a
47      * resource, a local file, a zip file entry, etc.
48      *
49      * @param name fully qualified name of the type for which
50      * source is being searched for
51      * @return source element
52      * @exception CoreException if an exception occurs while searching
53      * for the specified source element
54      */

55     public Object JavaDoc findSourceElement(String JavaDoc name) throws CoreException;
56     
57     /**
58      * Returns a memento for this source location from which this
59      * source location can be reconstructed.
60      *
61      * @return a memento for this source location
62      * @exception CoreException if unable to create a memento
63      */

64     public String JavaDoc getMemento() throws CoreException;
65     
66     /**
67      * Initializes this source location from the given memento.
68      *
69      * @param memento a memento generated by this source location
70      * @exception CoreException if unable to initialize this source
71      * location
72      */

73     public void initializeFrom(String JavaDoc memento) throws CoreException;
74
75 }
76
Popular Tags