Eclipse JDT
2.0

org.eclipse.jdt.debug.ui
Class JavaUISourceLocator

java.lang.Object
  |
  +--org.eclipse.jdt.debug.ui.JavaUISourceLocator
All Implemented Interfaces:
IPersistableSourceLocator, ISourceLocator

public class JavaUISourceLocator
extends Object
implements IPersistableSourceLocator

A source locator that prompts the user to find source when source cannot be found on the current source lookup path.

This class is intended to be instantiated. This class is not intended to be subclassed.

Since:
2.0

Field Summary
static String ID_PROMPTING_JAVA_SOURCE_LOCATOR
          Identifier for the 'Prompting Java Source Locator' extension (value "org.eclipse.jdt.debug.ui.javaSourceLocator").
 
Constructor Summary
JavaUISourceLocator()
          Constructs an empty source locator.
JavaUISourceLocator(IJavaProject project)
          Constructs a source locator that searches for source in the given Java project, and all of its required projects, as specified by its build path or default source lookup settings.
JavaUISourceLocator(IJavaProject[] projects, boolean includeRequired)
          Constructs a new source locator that looks in the specified project for source, and required projects, if includeRequired is true.
 
Method Summary
 String getMemento()
           
 Object getSourceElement(IStackFrame stackFrame)
           
 IJavaSourceLocation[] getSourceLocations()
           
 void initializeDefaults(ILaunchConfiguration configuration)
           
 void initializeFromMemento(String memento)
           
 void setSourceLocations(IJavaSourceLocation[] locations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_PROMPTING_JAVA_SOURCE_LOCATOR

public static final String ID_PROMPTING_JAVA_SOURCE_LOCATOR
Identifier for the 'Prompting Java Source Locator' extension (value "org.eclipse.jdt.debug.ui.javaSourceLocator").

Constructor Detail

JavaUISourceLocator

public JavaUISourceLocator()
Constructs an empty source locator.


JavaUISourceLocator

public JavaUISourceLocator(IJavaProject[] projects,
                           boolean includeRequired)
                    throws JavaModelException
Constructs a new source locator that looks in the specified project for source, and required projects, if includeRequired is true.

Parameters:
projects - the projects in which to look for source
includeRequired - whether to look in required projects as well

JavaUISourceLocator

public JavaUISourceLocator(IJavaProject project)
                    throws CoreException
Constructs a source locator that searches for source in the given Java project, and all of its required projects, as specified by its build path or default source lookup settings.

Parameters:
project - Java project
Throws:
CoreException - if unable to read the project's build path
Method Detail

getSourceElement

public Object getSourceElement(IStackFrame stackFrame)
Specified by:
getSourceElement in interface ISourceLocator
See Also:
ISourceLocator.getSourceElement(IStackFrame)

getMemento

public String getMemento()
                  throws CoreException
Specified by:
getMemento in interface IPersistableSourceLocator
CoreException
See Also:
IPersistableSourceLocator.getMemento()

initializeDefaults

public void initializeDefaults(ILaunchConfiguration configuration)
                        throws CoreException
Specified by:
initializeDefaults in interface IPersistableSourceLocator
CoreException
See Also:
IPersistableSourceLocator.initializeDefaults(ILaunchConfiguration)

initializeFromMemento

public void initializeFromMemento(String memento)
                           throws CoreException
Specified by:
initializeFromMemento in interface IPersistableSourceLocator
CoreException
See Also:
IPersistableSourceLocator.initializeFromMemento(String)

getSourceLocations

public IJavaSourceLocation[] getSourceLocations()
See Also:
JavaSourceLocator.getSourceLocations()

setSourceLocations

public void setSourceLocations(IJavaSourceLocation[] locations)
See Also:
JavaSourceLocator.setSourceLocations(IJavaSourceLocation[])

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.