Class JavaSourceLocator

java.lang.Object
org.eclipse.jdt.launching.sourcelookup.JavaSourceLocator
All Implemented Interfaces:
IPersistableSourceLocator, ISourceLocator

@Deprecated public class JavaSourceLocator extends Object implements IPersistableSourceLocator
Deprecated.
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.
Locates source for a Java debug session by searching a configurable set of source locations.

This class may be instantiated.

Since:
2.0
See Also:
Restriction:
This class is not intended to be sub-classed by clients.
  • Field Details

    • ID_JAVA_SOURCE_LOCATOR

      @Deprecated public static final String ID_JAVA_SOURCE_LOCATOR
      Deprecated.
      Identifier for the 'Java Source Locator' extension (value "org.eclipse.jdt.launching.javaSourceLocator").
  • Constructor Details

    • JavaSourceLocator

      @Deprecated public JavaSourceLocator()
      Deprecated.
      Constructs a new empty JavaSourceLocator.
    • JavaSourceLocator

      @Deprecated public JavaSourceLocator(IJavaProject[] projects, boolean includeRequired) throws CoreException
      Deprecated.
      Constructs a new Java 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
      Throws:
      CoreException - if a new locator fails to be created
    • JavaSourceLocator

      @Deprecated public JavaSourceLocator(IJavaSourceLocation[] locations)
      Deprecated.
      Constructs a new JavaSourceLocator that searches the specified set of source locations for source elements.
      Parameters:
      locations - the source locations to search for source, in the order they should be searched
    • JavaSourceLocator

      @Deprecated public JavaSourceLocator(IJavaProject project) throws CoreException
      Deprecated.
      Constructs a new JavaSourceLocator that searches the default set of source locations for the given Java project.
      Parameters:
      project - Java project
      Throws:
      CoreException - if an exception occurs reading the classpath of the given or any required project
  • Method Details