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.sourcelookup;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.core.runtime.IAdaptable;
14:
15: /**
16: * A repository of source code. A source location is capable of retrieving
17: * source elements.
18: * <p>
19: * For example, a source location could be a project, zip/archive
20: * file, or a directory in the file system.
21: * </p>
22: * <p>
23: * This interface is may be implemented by clients.
24: * </p>
25: * @since 2.0
26: * @deprecated In 3.0, the debug platform provides source lookup facilities that
27: * should be used in place of the Java source lookup support provided in 2.0.
28: * The new facilities provide a source lookup director that coordinates source
29: * lookup among a set of participants, searching a set of source containers.
30: * See the following packages: <code>org.eclipse.debug.core.sourcelookup</code>
31: * and <code>org.eclipse.debug.core.sourcelookup.containers</code>. This interface
32: * has been replaced by
33: * <code>org.eclipse.debug.core.sourcelookup.ISourceContainer</code>.
34: */
35: public interface IJavaSourceLocation extends IAdaptable {
36:
37: /**
38: * Returns an object representing the source code
39: * for a type with the specified name, or <code>null</code>
40: * if none could be found. The name is
41: * a fully qualified type name, and may contain the '$'
42: * character when referring to inner types. For example,
43: * <code>java.lang.String</code>. The source element
44: * returned is implementation specific - for example, a
45: * resource, a local file, a zip file entry, etc.
46: *
47: * @param name fully qualified name of the type for which
48: * source is being searched for
49: * @return source element
50: * @exception CoreException if an exception occurs while searching
51: * for the specified source element
52: */
53: public Object findSourceElement(String name) throws CoreException;
54:
55: /**
56: * Returns a memento for this source location from which this
57: * source location can be reconstructed.
58: *
59: * @return a memento for this source location
60: * @exception CoreException if unable to create a memento
61: */
62: public String getMemento() throws CoreException;
63:
64: /**
65: * Initializes this source location from the given memento.
66: *
67: * @param memento a memento generated by this source location
68: * @exception CoreException if unable to initialize this source
69: * location
70: */
71: public void initializeFrom(String memento) throws CoreException;
72:
73: }
|