KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2000, 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.core.runtime.CoreException;
14
15 /**
16  * A source container type delegate represents a kind of container of source code.
17  * For example, a source container type may be a project or a directory. A specific
18  * project or directory is represented by an instance of a source container type,
19  * which is called a source container (<code>ISourceContainer</code>).
20  * <p>
21  * A source container type delegate is contributed via the
22  * <code>sourceContainerTypes</code> extension point.
23  * </p>
24  * <p>
25  * Clients may implement this interface.
26  * </p>
27  * @see org.eclipse.debug.core.sourcelookup.ISourceContainer
28  * @see org.eclipse.debug.core.sourcelookup.ISourceContainerType
29  * @since 3.0
30  */

31 public interface ISourceContainerTypeDelegate {
32
33     /**
34      * Creates and returns a new source container of this type
35      * corresponding to the given memento.
36      *
37      * @param memento a memento for a source container of this source container type
38      * @return a source container corresponding to the given memento
39      * @exception CoreException if unable to construct a source container based
40      * on the given memento
41      */

42     public ISourceContainer createSourceContainer(String JavaDoc memento) throws CoreException;
43     
44     /**
45      * Constructs and returns a memento for the given source container. A memento
46      * can be used to reconstruct a source container.
47      *
48      * @param container The container for which a memento should be created. The
49      * container must of this source container type.
50      * @return a memento for the source container
51      * @exception CoreException if unable to create a memento
52      */

53     public String JavaDoc getMemento(ISourceContainer container) throws CoreException;
54     
55 }
56
Popular Tags