org.eclipse.debug.core.sourcelookup
and org.eclipse.debug.core.sourcelookup.containers
. This class
has been replaced by a Java source lookup director and Java source lookup
participant. To migrate to the new source lookup support clients should
add two new attributes to their launch configuration type extensions:ATTR_SOURCE_PATH_PROVIDER
attribute (if present), or a default source lookup path based on a configuration's
runtime classpath. This class has been replaced by the Java source lookup
director which is an internal class, but can be used via the
sourceLocatorId
attribute on a launch configuration type extension.@Deprecated public class JavaSourceLocator extends Object implements IPersistableSourceLocator
This class may be instantiated.
ISourceLocator
Modifier and Type | Field and Description |
---|---|
static String |
ID_JAVA_SOURCE_LOCATOR
Deprecated.
Identifier for the 'Java Source Locator' extension
(value
"org.eclipse.jdt.launching.javaSourceLocator" ). |
Constructor and Description |
---|
JavaSourceLocator()
Deprecated.
Constructs a new empty JavaSourceLocator.
|
JavaSourceLocator(IJavaProject project)
Deprecated.
Constructs a new JavaSourceLocator that searches the
default set of source locations for the given Java project.
|
JavaSourceLocator(IJavaProject[] projects,
boolean includeRequired)
Deprecated.
Constructs a new Java source locator that looks in the
specified project for source, and required projects, if
includeRequired is true . |
JavaSourceLocator(IJavaSourceLocation[] locations)
Deprecated.
Constructs a new JavaSourceLocator that searches the
specified set of source locations for source elements.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
collectRequiredProjects(IJavaProject proj,
ArrayList<IJavaProject> res)
Deprecated.
Adds all projects required by
proj to the list
res |
static IJavaSourceLocation[] |
getDefaultSourceLocations(IJavaProject project)
Deprecated.
Returns a default collection of source locations for
the given Java project.
|
String |
getMemento()
Deprecated.
|
Object |
getSourceElement(IStackFrame stackFrame)
Deprecated.
|
Object[] |
getSourceElements(IStackFrame stackFrame)
Deprecated.
Returns all source elements that correspond to the type associated with
the given stack frame, or
null if none. |
IJavaSourceLocation[] |
getSourceLocations()
Deprecated.
Returns the locations that this source locator is currently
searching, in the order that they are searched.
|
void |
initializeDefaults(ILaunchConfiguration configuration)
Deprecated.
|
void |
initializeFromMemento(String memento)
Deprecated.
|
void |
setSourceLocations(IJavaSourceLocation[] locations)
Deprecated.
Sets the locations that will be searched, in the order
to be searched.
|
public static final String ID_JAVA_SOURCE_LOCATOR
"org.eclipse.jdt.launching.javaSourceLocator"
).public JavaSourceLocator()
public JavaSourceLocator(IJavaProject[] projects, boolean includeRequired) throws CoreException
includeRequired
is true
.projects
- the projects in which to look for sourceincludeRequired
- whether to look in required projects
as wellCoreException
- if a new locator fails to be createdpublic JavaSourceLocator(IJavaSourceLocation[] locations)
locations
- the source locations to search for
source, in the order they should be searchedpublic JavaSourceLocator(IJavaProject project) throws CoreException
project
- Java projectCoreException
- if an exception occurs reading
the classpath of the given or any required projectpublic void setSourceLocations(IJavaSourceLocation[] locations)
locations
- the locations that will be searched, in the order
to be searchedpublic IJavaSourceLocation[] getSourceLocations()
public Object[] getSourceElements(IStackFrame stackFrame)
null
if none.stackFrame
- stack framenull
if nonepublic Object getSourceElement(IStackFrame stackFrame)
getSourceElement
in interface ISourceLocator
protected static void collectRequiredProjects(IJavaProject proj, ArrayList<IJavaProject> res) throws JavaModelException
proj
to the list
res
proj
- the project for which to compute required
projectsres
- the list to add all required projects tooJavaModelException
- if there is a problem with the backing Java modelpublic static IJavaSourceLocation[] getDefaultSourceLocations(IJavaProject project) throws CoreException
project
- Java projectCoreException
- if an exception occurs reading
computing the default locationspublic String getMemento() throws CoreException
getMemento
in interface IPersistableSourceLocator
CoreException
public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException
initializeDefaults
in interface IPersistableSourceLocator
CoreException
public void initializeFromMemento(String memento) throws CoreException
initializeFromMemento
in interface IPersistableSourceLocator
CoreException
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.