public class DirectorySourceContainer extends CompositeSourceContainer
findSourceElements(...) are instances
of LocalFileStorage.
Clients may instantiate this class.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE_ID
Unique identifier for the directory source container type
(value
org.eclipse.debug.core.containerType.directory). |
EMPTY| Constructor and Description |
|---|
DirectorySourceContainer(java.io.File dir,
boolean subfolders)
Constructs an external folder container for the
directory identified by the given file.
|
DirectorySourceContainer(IPath dirPath,
boolean subfolders)
Constructs an external folder container for the
directory identified by the given path.
|
| Modifier and Type | Method and Description |
|---|---|
protected ISourceContainer[] |
createSourceContainers()
Creates the source containers in this composite container.
|
boolean |
equals(java.lang.Object obj) |
java.lang.Object[] |
findSourceElements(java.lang.String name)
Returns a collection of source elements in this container corresponding to the
given name.
|
java.io.File |
getDirectory()
Returns the root directory in the local file system associated
with this source container.
|
java.lang.String |
getName()
The name of this source container that can be used for presentation purposes.
|
ISourceContainerType |
getType()
Returns this container's type.
|
int |
hashCode() |
boolean |
isComposite()
Returns whether this container is a composite container.
|
dispose, findSourceElements, getSourceContainersabort, getDirector, getSourceContainerType, init, isFindDuplicates, warngetAdapterclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetAdapterpublic static final java.lang.String TYPE_ID
org.eclipse.debug.core.containerType.directory).public DirectorySourceContainer(IPath dirPath, boolean subfolders)
dirPath - path to a directory in the local file systemsubfolders - whether folders within the root directory
should be searched for source elementspublic DirectorySourceContainer(java.io.File dir,
boolean subfolders)
dir - a directory in the local file systemsubfolders - whether folders within the root directory
should be searched for source elementspublic java.lang.String getName()
ISourceContainerpublic java.io.File getDirectory()
public ISourceContainerType getType()
ISourceContainerpublic java.lang.Object[] findSourceElements(java.lang.String name)
throws CoreException
ISourceContainerisFindDuplicates().
When false the returned collection should contain at most one
source element. If this is a composite container, the containers contained
by this container are also searched.
The format of the given name is implementation specific but generally conforms to the format of a file name. If a source container does not recognize the name format provided, an empty collection should be returned. A source container may or may not require names to be fully qualified (i.e. be qualified with directory names).
findSourceElements in interface ISourceContainerfindSourceElements in class CompositeSourceContainername - the name of the source element to search forCoreException - if an exception occurs while searching for source elementspublic boolean isComposite()
ISourceContainerisComposite in interface ISourceContainerisComposite in class CompositeSourceContainerpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected ISourceContainer[] createSourceContainers() throws CoreException
CompositeSourceContainercreateSourceContainers in class CompositeSourceContainerISourceContainersCoreException - if unable to create the containers
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.