public interface ISourceLookupDirector extends IPersistableSourceLocator2
Clients may implement this interface. An abstract implementation
is provided by AbstractSourceLookupDirector
, which
clients should subclass.
Modifier and Type | Method and Description |
---|---|
void |
addParticipants(ISourceLookupParticipant[] participants)
Adds the given source lookup participants to this director.
|
void |
clearSourceElements(Object element)
Clears any source lookup results associated with the given
debug artifact, such that a subsequent lookup will force a new search
to be performed.
|
Object[] |
findSourceElements(Object object)
Returns a collection of source elements corresponding to the given debug
artifact (for example, a stack frame or breakpoint).
|
String |
getId()
Returns the identifier of this type of source locator.
|
ILaunchConfiguration |
getLaunchConfiguration()
Returns the launch configuration associated with this source
lookup director, or
null if none. |
ISourceLookupParticipant[] |
getParticipants()
Returns the source lookup participants currently registered with
this director, possibly an empty collection.
|
ISourceContainer[] |
getSourceContainers()
Returns the source containers currently registered with this
director, possibly an empty collection.
|
Object |
getSourceElement(Object element)
Returns a source element that corresponds to the given debug artifact, or
null if a source element could not be located. |
ISourcePathComputer |
getSourcePathComputer()
Returns the source path computer to use with this source lookup
director, possibly
null . |
void |
initializeParticipants()
Notifies this source lookup director that it should initialize
its set of source lookup participants.
|
boolean |
isFindDuplicates()
Returns whether to search exhaustively for all source elements
with the same name in all registered source containers, or
whether to stop searching when the first source element matching
the required name is found.
|
void |
removeParticipants(ISourceLookupParticipant[] participants)
Removes the given source lookup participants from this director.
|
void |
setFindDuplicates(boolean findDuplicates)
Sets whether to search exhaustively for all source elements
with the same name in all registered source containers, or
whether to stop searching when the first source element matching
the required name is found.
|
void |
setSourceContainers(ISourceContainer[] containers)
Sets the source containers this source lookup director
should search when looking for source, possibly an empty collection.
|
void |
setSourcePathComputer(ISourcePathComputer computer)
Sets the source path computer for this source lookup director.
|
boolean |
supportsSourceContainerType(ISourceContainerType type)
Returns whether this source director supports the given type
of source location.
|
dispose, initializeFromMemento
getMemento, initializeDefaults, initializeFromMemento
getSourceElement
ILaunchConfiguration getLaunchConfiguration()
null
if none.null
if noneISourceLookupParticipant[] getParticipants()
ISourceContainer[] getSourceContainers()
void setSourceContainers(ISourceContainer[] containers)
containers
- the source containers this source lookup director
should search when looking for source, possibly an empty collectionboolean isFindDuplicates()
void setFindDuplicates(boolean findDuplicates)
findDuplicates
- whether to search exhaustively for all source elements
with the same namevoid initializeParticipants()
boolean supportsSourceContainerType(ISourceContainerType type)
type
- source container typevoid clearSourceElements(Object element)
element
- debug artifact to clear source lookup results forvoid addParticipants(ISourceLookupParticipant[] participants)
participants
- participants to addvoid removeParticipants(ISourceLookupParticipant[] participants)
participants
- participants to removeString getId()
ISourcePathComputer getSourcePathComputer()
null
. By default, the source path
computer returned is the one associated with this director's launch
configuration's type. However, the source path computer can be specified
programmatically by calling setSourcePathComputer(...)
.null
void setSourcePathComputer(ISourcePathComputer computer)
null
is specified
the default source path computer will be used (i.e. the one associated
with this director's launch configuration's type).computer
- source path computer or null
Object[] findSourceElements(Object object) throws CoreException
isFindDuplicates()
.
When false
the returned collection should contain at most one
source element.object
- the debug artifact for which source needs to be found (e.g., stack frame)CoreException
- if an exception occurs while searching for sourceObject getSourceElement(Object element)
null
if a source element could not be located. This is a
generalization of getSourceElement(IStackFrame)
to allow
source to be found for other types of elements.element
- the debug artifact for which to locate source
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.