KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > core > model > IPersistableSourceLocator


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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.model;
12
13
14 import org.eclipse.core.runtime.CoreException;
15 import org.eclipse.debug.core.ILaunchConfiguration;
16
17 /**
18  * A source locator that can be persisted and restored,
19  * to be used with a specific launch configuration.
20  * The debug plug-in defines a source locator extension
21  * point for persistable source locators.
22  * <p>
23  * A source locator extension is defined in <code>plugin.xml</code>.
24  * Following is an example definition of a source locator extension.
25  * <pre>
26  * &lt;extension point="org.eclipse.debug.core.sourceLocators"&gt;
27  * &lt;sourceLocator
28  * id="com.example.ExampleIdentifier"
29  * class="com.example.ExampleSourceLocator"
30  * name="Example Source Locator"&gt;
31  * &lt;/sourceLocator&gt;
32  * &lt;/extension&gt;
33  * </pre>
34  * The attributes are specified as follows:
35  * <ul>
36  * <li><code>id</code> specifies a unique identifier for this source locator.</li>
37  * <li><code>class</code> specifies the fully qualified name of the Java class
38  * that implements <code>IPersistableSourceLocator</code>.</li>
39  * <li><code>name</code> a human readable name, describing the type of
40  * this source locator.</li>
41  * </ul>
42  * </p>
43  * <p>
44  * Clients may implement this interface.
45  * </p>
46  * @see org.eclipse.debug.core.ILaunch
47  * @see IStackFrame
48  * @since 2.0
49  */

50 public interface IPersistableSourceLocator extends ISourceLocator {
51     
52     /**
53      * Returns a memento that can be used to reconstruct
54      * this source locator
55      *
56      * @return a memento that can be used to reconstruct
57      * this source locator
58      * @exception CoreException if unable to construct a memento
59      */

60     public String JavaDoc getMemento() throws CoreException;
61     
62     /**
63      * Initializes this source locator based on the given
64      * memento.
65      *
66      * @param memento a memento to initialize this source locator
67      * @exception CoreException on failure to initialize
68      */

69     public void initializeFromMemento(String JavaDoc memento) throws CoreException;
70     
71     /**
72      * Initializes this source locator to perform default
73      * source lookup for the given launch configuration.
74      *
75      * @param configuration launch configuration this source locator
76      * will be performing source lookup for
77      * @exception CoreException on failure to initialize
78      */

79     public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException;
80
81 }
82
83
84
Popular Tags