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, isFindDuplicatesgetAdapterclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getTypegetAdapterpublic boolean isComposite()
ISourceContainerisComposite in interface ISourceContainerisComposite in class AbstractSourceContainerpublic Object[] findSourceElements(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).
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
CoreException - if unable to create the containerspublic ISourceContainer[] getSourceContainers() throws CoreException
ISourceContainergetSourceContainers in interface ISourceContainergetSourceContainers in class AbstractSourceContainerCoreException - if unable to retrieve source containerspublic void dispose()
ISourceContainerdispose in interface ISourceContainerdispose in class AbstractSourceContainerGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.