public class ArchiveSourceContainer extends AbstractSourceContainer
ZipEntryStorage
as source elements.
Clients may instantiate this class.
Modifier and Type | Field and Description |
---|---|
static String |
TYPE_ID
Unique identifier for the archive source container type
(value
org.eclipse.debug.core.containerType.archive ). |
EMPTY
Constructor and Description |
---|
ArchiveSourceContainer(IFile archive,
boolean detectRootPath)
Creates an archive source container on the given file.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this source container.
|
boolean |
equals(Object obj) |
Object[] |
findSourceElements(String name)
Returns a collection of source elements in this container corresponding to the
given name.
|
IFile |
getFile()
Returns the associated file in the workspace.
|
String |
getName()
The name of this source container that can be used for presentation purposes.
|
ISourceContainerType |
getType()
Returns this container's type.
|
int |
hashCode() |
void |
init(ISourceLookupDirector director)
Notification this source container has been added to the given
source lookup director.
|
boolean |
isDetectRoot()
Returns whether root paths are automatically detected in this
archive source container.
|
abort, getDirector, getSourceContainers, getSourceContainerType, isComposite, isFindDuplicates, warn
getAdapter
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getAdapter
public static final String TYPE_ID
org.eclipse.debug.core.containerType.archive
).public ArchiveSourceContainer(IFile archive, boolean detectRootPath)
archive
- archive in the workspacedetectRootPath
- whether a root path should be detected. When
true
, searching is performed relative to a root path
within the archive based on fully qualified file names. The root
path is automatically determined when the first successful search
is performed. For example, when searching for a file named
a/b/c.d
, and an entry in the archive named
r/a/b/c.d
exists, the root path is set to r
.
From that point on, searching is performed relative to r
.
When false
, searching is performed by
matching file names as suffixes to the entries in the archive.public String getName()
ISourceContainer
public IFile getFile()
public ISourceContainerType getType()
ISourceContainer
public Object[] findSourceElements(String name) throws CoreException
ISourceContainer
isFindDuplicates()
.
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).
name
- the name of the source element to search forCoreException
- if an exception occurs while searching for source elementspublic void init(ISourceLookupDirector director)
ISourceContainer
init
in interface ISourceContainer
init
in class AbstractSourceContainer
director
- the director this container has been added topublic void dispose()
ISourceContainer
dispose
in interface ISourceContainer
dispose
in class AbstractSourceContainer
public boolean isDetectRoot()
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.