1
/*******************************************************************************
2
* Copyright (c) 2000, 2006 QNX Software Systems 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
9
* QNX Software Systems - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.debug.core.sourcelookup;
13
import org.eclipse.core.runtime.CoreException;
14
import org.eclipse.core.runtime.IAdaptable;
18
* A source location defines the location of a repository
19
* of source code. A source location is capable of retrieving
22
* For example, a source location could be a project, zip/archive
23
* file, or a directory in the file system.
28
public interface ICSourceLocation extends IAdaptable
31
* Returns an object representing the source code
32
* for a file with the specified name, or <code>null</code>
33
* if none could be found. The source element
34
* returned is implementation specific - for example, a
35
* resource, a local file, a zip file entry, etc.
37
* @param name the name of the object for which source is being searched for
39
* @return source element
40
* @exception CoreException if an exception occurs while searching for the specified source element
42
Object findSourceElement( String name ) throws CoreException;
45
* Returns a memento for this source location from which this
46
* source location can be reconstructed.
48
* @return a memento for this source location
49
* @exception CoreException if unable to create a memento
51
String getMemento() throws CoreException;
54
* Initializes this source location from the given memento.
56
* @param memento a memento generated by this source location
57
* @exception CoreException if unable to initialize this source
60
void initializeFrom( String memento ) throws CoreException;
63
* Returns whether to search for all source elements, or just the first match.
65
* @return whether to search for all source elements, or just the first match
67
boolean searchForDuplicateFiles();
70
* Sets the value of the 'search for duplicate source files' flag.
72
* @param search - a value to set
74
void setSearchForDuplicateFiles( boolean search );