public abstract class AbstractSourceLookupParticipant extends Object implements ISourceLookupParticipant
Clients implementing source lookup participants should subclass this class.
Constructor and Description |
---|
AbstractSourceLookupParticipant() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes this source lookup participant.
|
Object[] |
findSourceElements(Object object)
Returns a collection of source elements corresponding to the given debug
artifact (for example, a stack frame or breakpoint).
|
protected ISourceContainer |
getDelegateContainer(ISourceContainer container)
Returns the source container to search in place of the given source
container, or
null if the given source container is not
to be searched. |
protected ISourceLookupDirector |
getDirector()
Returns the source lookup director this participant is registered with
or
null if none. |
protected ISourceContainer[] |
getSourceContainers()
Returns the source containers currently registered with this participant's
source lookup director.
|
void |
init(ISourceLookupDirector director)
Notification this participant has been added to the specified
source lookup director.
|
boolean |
isFindDuplicates()
Returns whether this participant's source lookup director is configured
to search for duplicate source elements.
|
void |
sourceContainersChanged(ISourceLookupDirector director)
Notification that the source lookup containers in the given source
lookup director have changed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSourceName
protected static final Object[] EMPTY
public void init(ISourceLookupDirector director)
ISourceLookupParticipant
init
in interface ISourceLookupParticipant
director
- the source lookup director that this participant
has been added topublic void dispose()
ISourceLookupParticipant
dispose
in interface ISourceLookupParticipant
public Object[] findSourceElements(Object object) throws CoreException
ISourceLookupParticipant
isFindDuplicates()
.
When false
the returned collection should contain at most one
source element.
If the given debug artifact is not recognized by this participant, an empty collection is returned. Otherwise, this participant generates a source name from the given artifact and performs a search for associated source elements in its source containers.
findSourceElements
in interface ISourceLookupParticipant
object
- the debug artifact for which source needs to be found (e.g., stack frame)CoreException
- if an exception occurs while searching for sourceprotected ISourceContainer getDelegateContainer(ISourceContainer container)
null
if the given source container is not
to be searched. The default implementation does not translate source
containers. Subclasses should override if required.container
- the source container about to be searched (proxy)null
if the source container should not be searchedprotected ISourceLookupDirector getDirector()
null
if none.null
if nonepublic boolean isFindDuplicates()
protected ISourceContainer[] getSourceContainers()
public void sourceContainersChanged(ISourceLookupDirector director)
ISourceLookupParticipant
sourceContainersChanged
in interface ISourceLookupParticipant
director
- source lookup director that is directing this
participant
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.