Eclipse Platform
Release 3.1

org.eclipse.debug.core.sourcelookup.containers
Class AbstractSourceContainer

java.lang.Object
  extended byorg.eclipse.core.runtime.PlatformObject
      extended byorg.eclipse.debug.core.sourcelookup.containers.AbstractSourceContainer
All Implemented Interfaces:
IAdaptable, ISourceContainer
Direct Known Subclasses:
ArchiveSourceContainer, CompositeSourceContainer, ExternalArchiveSourceContainer

public abstract class AbstractSourceContainer
extends PlatformObject
implements ISourceContainer

Common function for source containers.

Clients implementing source containers should subclass this class.

Since:
3.0

Field Summary
static Object[] EMPTY
           
 
Constructor Summary
AbstractSourceContainer()
           
 
Method Summary
protected  void abort(String message, Throwable exception)
          Throws an exception with the given message and underlying exception.
 void dispose()
          Disposes this source container.
protected  ISourceLookupDirector getDirector()
          Returns the source lookup director this source container registered in, or null if none.
 ISourceContainer[] getSourceContainers()
          Returns the source containers this container is composed of.
protected  ISourceContainerType getSourceContainerType(String id)
          Returns the source container type identified by the given id, or null if none.
 void init(ISourceLookupDirector director)
          Notifiation this source container has been added to the given source lookup director.
 boolean isComposite()
          Returns whether this container is a composite container.
protected  boolean isFindDuplicates()
          Returns whether this container's source lookup director is configured to search for duplicate source elements.
 
Methods inherited from class org.eclipse.core.runtime.PlatformObject
getAdapter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.debug.core.sourcelookup.ISourceContainer
findSourceElements, getName, getType
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Field Detail

EMPTY

public static final Object[] EMPTY
Constructor Detail

AbstractSourceContainer

public AbstractSourceContainer()
Method Detail

abort

protected void abort(String message,
                     Throwable exception)
              throws CoreException
Throws an exception with the given message and underlying exception.

Parameters:
message - error message
exception - underlying exception, or null
Throws:
CoreException

dispose

public void dispose()
Description copied from interface: ISourceContainer
Disposes this source container. This method is called when the source director associated with this source container is disposed.

Specified by:
dispose in interface ISourceContainer

getSourceContainers

public ISourceContainer[] getSourceContainers()
                                       throws CoreException
Description copied from interface: ISourceContainer
Returns 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:
getSourceContainers in interface ISourceContainer
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: ISourceContainer
Returns 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:
isComposite in interface ISourceContainer
Returns:
whether this container is a composite container

init

public void init(ISourceLookupDirector director)
Description copied from interface: ISourceContainer
Notifiation this source container has been added to the given source lookup director.

Specified by:
init in interface ISourceContainer
Parameters:
director - the director this container has been added to

getDirector

protected ISourceLookupDirector getDirector()
Returns the source lookup director this source container registered in, or null if none.

Returns:
the source lookup director this source container registered in, or null if none

isFindDuplicates

protected boolean isFindDuplicates()
Returns whether this container's source lookup director is configured to search for duplicate source elements.

Returns:
whether this container's source lookup director is configured to search for duplicate source elements

getSourceContainerType

protected ISourceContainerType getSourceContainerType(String id)
Returns the source container type identified by the given id, or null if none.

Parameters:
id - source container type identifier
Returns:
source container type or null

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.