Class JavaUISourceLocator

All Implemented Interfaces:
IPersistableSourceLocator, ISourceLocator

@Deprecated public class JavaUISourceLocator extends Object implements IPersistableSourceLocator
In 3.0, the debug platform provides source lookup facilities that should be used in place of the Java source lookup support provided in 2.0. The new facilities provide a source lookup director that coordinates source lookup among a set of participants, searching a set of source containers. See the following packages: 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:
  • sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
  • sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"
The source locator id attribute specifies to use the Java source lookup director for launch configurations of the associated type, and the source path computer id attribute specifies the class to use when computing a default source lookup path for a launch configuration. The path computer referenced/provided (by the above id), computes a default source lookup path based on the support provided in the 2.0 release - i.e. a configuration's 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.
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 sub-classed by clients.
  • Field Details


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

      public static final String ATTR_FIND_ALL_SOURCE_ELEMENTS
      Launch configuration attribute indicating that this source locator should locate all source elements that correspond to a stack frame, rather than the first match. Default value is false.
  • Constructor Details

    • JavaUISourceLocator

      public JavaUISourceLocator()
      Constructs an empty source locator.
    • JavaUISourceLocator

      public JavaUISourceLocator(IJavaProject[] projects, boolean includeRequired) throws CoreException
      Constructs a new source locator that looks in the specified project for source, and required projects, if includeRequired is true.
      projects - the projects in which to look for source
      includeRequired - whether to look in required projects as well
      CoreException - if the underlying JavaSourceLocator fails to be created
    • 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.
      project - Java project
      CoreException - if unable to read the project's build path
  • Method Details