Class AbstractSourceContainer
java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.debug.core.sourcelookup.containers.AbstractSourceContainer
- All Implemented Interfaces:
IAdaptable,ISourceContainer
- Direct Known Subclasses:
ArchiveSourceContainer,CompositeSourceContainer,ExternalArchiveSourceContainer
Common function for source containers.
Clients implementing source containers should subclass this class.
- Since:
- 3.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThrows an error exception with the given message and underlying exception.voiddispose()Disposes this source container.protected ISourceLookupDirectorReturns the source lookup director this source container registered in, ornullif none.Returns the source containers this container is composed of.protected ISourceContainerTypeReturns the source container type identified by the given id, ornullif none.voidinit(ISourceLookupDirector director) Notification this source container has been added to the given source lookup director.booleanReturns whether this container is a composite container.protected booleanReturns whether this container's source should search for duplicate source elements.protected voidThrows a warning exception with the given message and underlying exception.Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapterMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapterMethods inherited from interface org.eclipse.debug.core.sourcelookup.ISourceContainer
findSourceElements, getName, getType
-
Field Details
-
EMPTY
-
-
Constructor Details
-
AbstractSourceContainer
public AbstractSourceContainer()
-
-
Method Details
-
abort
Throws an error exception with the given message and underlying exception.- Parameters:
message- error messageexception- underlying exception, ornull- Throws:
CoreException- if a problem is encountered
-
warn
Throws a warning exception with the given message and underlying exception.- Parameters:
message- error messageexception- underlying exception, ornull- Throws:
CoreException- if a problem is encountered- Since:
- 3.3
-
dispose
public void dispose()Description copied from interface:ISourceContainerDisposes this source container. This method is called when the source director associated with this source container is disposed.- Specified by:
disposein interfaceISourceContainer
-
getSourceContainers
Description copied from interface:ISourceContainerReturns the source containers this container is composed of. An empty collection is returned if this container is not a composite container. For example, a workspace source container may be composed of project source containers.- Specified by:
getSourceContainersin interfaceISourceContainer- Returns:
- the source containers this container is composed of, possibly an empty collection
- Throws:
CoreException- if unable to retrieve source containers
-
isComposite
public boolean isComposite()Description copied from interface:ISourceContainerReturns whether this container is a composite container. A composite container is composed of other source containers. For example, a workspace source container may be composed of project source containers.- Specified by:
isCompositein interfaceISourceContainer- Returns:
- whether this container is a composite container
-
init
Description copied from interface:ISourceContainerNotification this source container has been added to the given source lookup director.- Specified by:
initin interfaceISourceContainer- Parameters:
director- the director this container has been added to
-
getDirector
Returns the source lookup director this source container registered in, ornullif none.- Returns:
- the source lookup director this source container registered
in, or
nullif none
-
isFindDuplicates
protected boolean isFindDuplicates()Returns whether this container's source should search for duplicate source elements. Since 3.5, the current participant is consulted to determine if duplicates should be found. Fall back to querying the source lookup director if the participant is not anAbstractSourceLookupParticipant.- Returns:
- whether to search for duplicate source elements
-
getSourceContainerType
Returns the source container type identified by the given id, ornullif none.- Parameters:
id- source container type identifier- Returns:
- source container type or
null
-