|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jdt.launching.sourcelookup.JavaSourceLocator
Locates source for a Java debug session by searching a configurable set of source locations.
This class may be instantiated; it is not intended to be subclassed.
ISourceLocator
Field Summary | |
static String |
ID_JAVA_SOURCE_LOCATOR
Identifier for the 'Java Source Locator' extension (value "org.eclipse.jdt.launching.javaSourceLocator" ). |
Constructor Summary | |
JavaSourceLocator()
Constructs a new empty JavaSourceLocator. |
|
JavaSourceLocator(IJavaProject project)
Constructs a new JavaSourceLocator that searches the default set of source locations for the given Java project. |
|
JavaSourceLocator(IJavaProject[] projects,
boolean includeRequired)
Constructs a new Java source locator that looks in the specified project for source, and required projects, if includeRequired is true . |
|
JavaSourceLocator(IJavaSourceLocation[] locations)
Constructs a new JavaSourceLocator that searches the specified set of source locations for source elements. |
Method Summary | |
protected static void |
collectRequiredProjects(IJavaProject proj,
ArrayList res)
Adds all projects required by proj to the list
res |
static IJavaSourceLocation[] |
getDefaultSourceLocations(IJavaProject project)
Returns a default collection of source locations for the given Java project. |
String |
getMemento()
|
Object |
getSourceElement(IStackFrame stackFrame)
|
IJavaSourceLocation[] |
getSourceLocations()
Returns the locations that this source locator is currently searching, in the order that they are searched. |
void |
initializeDefaults(ILaunchConfiguration configuration)
|
void |
initializeFromMemento(String memento)
|
void |
setSourceLocations(IJavaSourceLocation[] locations)
Sets the locations that will be searched, in the order to be searched. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ID_JAVA_SOURCE_LOCATOR
"org.eclipse.jdt.launching.javaSourceLocator"
).
Constructor Detail |
public JavaSourceLocator()
public JavaSourceLocator(IJavaProject[] projects, boolean includeRequired) throws JavaModelException
includeRequired
is true
.
projects
- the projects in which to look for sourceincludeRequired
- whether to look in required projects
as wellpublic 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 project
CoreException
- if an exception occurs reading
the classpath of the given or any required projectMethod Detail |
public void setSourceLocations(IJavaSourceLocation[] locations)
locations
- the locations that will be searched, in the order
to be searchedpublic IJavaSourceLocation[] getSourceLocations()
public Object getSourceElement(IStackFrame stackFrame)
getSourceElement
in interface ISourceLocator
ISourceLocator.getSourceElement(IStackFrame)
protected static void collectRequiredProjects(IJavaProject proj, ArrayList res) throws JavaModelException
proj
to the list
res
proj
- the project for which to compute required
projectsres
- the list to add all required projects too
JavaModelException
public static IJavaSourceLocation[] getDefaultSourceLocations(IJavaProject project) throws CoreException
project
- Java project
CoreException
- if an exception occurs reading
the classpath of the given or any required projectpublic String getMemento() throws CoreException
getMemento
in interface IPersistableSourceLocator
CoreException
IPersistableSourceLocator.getMemento()
public void initializeDefaults(ILaunchConfiguration configuration) throws CoreException
initializeDefaults
in interface IPersistableSourceLocator
CoreException
IPersistableSourceLocator.initializeDefaults(ILaunchConfiguration)
public void initializeFromMemento(String memento) throws CoreException
initializeFromMemento
in interface IPersistableSourceLocator
CoreException
IPersistableSourceLocator.initializeFromMemento(String)
|
Eclipse JDT 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |