org.eclipse.cdt.debug.core.sourcelookup
Interface ICSourceLocation

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
All Known Subinterfaces:
IDirectorySourceLocation, IProjectSourceLocation
All Known Implementing Classes:
CDirectorySourceLocation, CProjectSourceLocation

public interface ICSourceLocation
extends org.eclipse.core.runtime.IAdaptable

A source location defines the location of a repository of source code. A source location is capable of retrieving source elements.

For example, a source location could be a project, zip/archive file, or a directory in the file system.

Since:
Sep 23, 2002

Method Summary
 void dispose()
           
 java.lang.Object findSourceElement(java.lang.String name)
          Returns an object representing the source code for a file with the specified name, or null if none could be found.
 java.lang.String getMemento()
          Returns a memento for this source location from which this source location can be reconstructed.
 void initializeFrom(java.lang.String memento)
          Initializes this source location from the given memento.
 boolean searchForDuplicateFiles()
          Returns whether to search for all source elements, or just the first match.
 void setSearchForDuplicateFiles(boolean search)
          Sets the value of the 'search for duplicate source files' flag.
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

findSourceElement

java.lang.Object findSourceElement(java.lang.String name)
                                   throws org.eclipse.core.runtime.CoreException
Returns an object representing the source code for a file with the specified name, or null if none could be found. The source element returned is implementation specific - for example, a resource, a local file, a zip file entry, etc.

Parameters:
name - the name of the object for which source is being searched for
Returns:
source element
Throws:
org.eclipse.core.runtime.CoreException - if an exception occurs while searching for the specified source element

getMemento

java.lang.String getMemento()
                            throws org.eclipse.core.runtime.CoreException
Returns a memento for this source location from which this source location can be reconstructed.

Returns:
a memento for this source location
Throws:
org.eclipse.core.runtime.CoreException - if unable to create a memento

initializeFrom

void initializeFrom(java.lang.String memento)
                    throws org.eclipse.core.runtime.CoreException
Initializes this source location from the given memento.

Parameters:
memento - a memento generated by this source location
Throws:
org.eclipse.core.runtime.CoreException - if unable to initialize this source location

searchForDuplicateFiles

boolean searchForDuplicateFiles()
Returns whether to search for all source elements, or just the first match.

Returns:
whether to search for all source elements, or just the first match

setSearchForDuplicateFiles

void setSearchForDuplicateFiles(boolean search)
Sets the value of the 'search for duplicate source files' flag.

Parameters:
search - - a value to set

dispose

void dispose()