Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 7b8a1664820b3276ced90d508582785a4a0b1fb9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*******************************************************************************
 * Copyright (c) 2000, 2006 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.debug.core.sourcelookup;

import org.eclipse.core.runtime.CoreException;

/**
 * A source container type delegate represents a kind of container of source code.
 * For example, a source container type may be a project or a directory. A specific
 * project or directory is represented by an instance of a source container type,
 * which is called a source container (<code>ISourceContainer</code>).
 * <p>
 * A source container type delegate is contributed via the
 * <code>sourceContainerTypes</code> extension point.
 * </p>
 * <p>
 * Clients may implement this interface.
 * </p>
 * @see org.eclipse.debug.core.sourcelookup.ISourceContainer
 * @see org.eclipse.debug.core.sourcelookup.ISourceContainerType
 * @since 3.0
 */
public interface ISourceContainerTypeDelegate {

	/**
	 * Creates and returns a new source container of this type
	 * corresponding to the given memento.
	 *
	 * @param memento a memento for a source container of this source container type
	 * @return a source container corresponding to the given memento
	 * @exception CoreException if unable to construct a source container based
	 *  on the given memento
	 */
	public ISourceContainer createSourceContainer(String memento) throws CoreException;

	/**
	 * Constructs and returns a memento for the given source container. A memento
	 * can be used to reconstruct a source container.
	 *
	 * @param container The container for which a memento should be created. The
	 *  container must of this source container type.
	 * @return a memento for the source container
	 * @exception CoreException if unable to create a memento
	 */
	public String getMemento(ISourceContainer container) throws CoreException;

}

Back to the top