public abstract class CompositeSourceContainer extends AbstractSourceContainer
Clients implementing composite source containers should subclass this class.
EMPTY
Constructor and Description |
---|
CompositeSourceContainer() |
Modifier and Type | Method and Description |
---|---|
protected abstract ISourceContainer[] |
createSourceContainers()
Creates the source containers in this composite container.
|
void |
dispose()
Disposes this source container.
|
Object[] |
findSourceElements(String name)
Returns a collection of source elements in this container corresponding to the
given name.
|
protected Object[] |
findSourceElements(String name,
ISourceContainer[] containers)
Returns a collection of source elements in the given containers corresponding to
the given name.
|
ISourceContainer[] |
getSourceContainers()
Returns the source containers this container is composed of.
|
boolean |
isComposite()
Returns whether this container is a composite container.
|
abort, getDirector, getSourceContainerType, init, isFindDuplicates, warn
getAdapter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, getType
getAdapter
public boolean isComposite()
ISourceContainer
isComposite
in interface ISourceContainer
isComposite
in class AbstractSourceContainer
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 elementsprotected Object[] findSourceElements(String name, ISourceContainer[] containers) throws CoreException
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 forcontainers
- the containers to searchCoreException
- if an exception occurs while searching for source elementsprotected abstract ISourceContainer[] createSourceContainers() throws CoreException
ISourceContainer
sCoreException
- if unable to create the containerspublic ISourceContainer[] getSourceContainers() throws CoreException
ISourceContainer
getSourceContainers
in interface ISourceContainer
getSourceContainers
in class AbstractSourceContainer
CoreException
- if unable to retrieve source containerspublic void dispose()
ISourceContainer
dispose
in interface ISourceContainer
dispose
in class AbstractSourceContainer
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.