Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.launching.sourcelookup
Class JavaSourceLocator

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

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.

public class JavaSourceLocator
extends Object
implements IPersistableSourceLocator

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:
ISourceLocator
Restriction:
This class is not intended to be subclassed by clients.

Field Summary
static  String ID_JAVA_SOURCE_LOCATOR
          Deprecated. Identifier for the 'Java Source Locator' extension (value "org.eclipse.jdt.launching.javaSourceLocator").
 
Constructor Summary
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.
 
Method Summary
protected static void collectRequiredProjects ( IJavaProject proj, ArrayList 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.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID_JAVA_SOURCE_LOCATOR

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

Constructor Detail

JavaSourceLocator

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


JavaSourceLocator

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

JavaSourceLocator

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

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 Detail

setSourceLocations

public void setSourceLocations(
IJavaSourceLocation[] locations)
Deprecated. 
Sets the locations that will be searched, in the order to be searched.

Parameters:
locations - the locations that will be searched, in the order to be searched

getSourceLocations

public 
IJavaSourceLocation[] getSourceLocations()
Deprecated. 
Returns the locations that this source locator is currently searching, in the order that they are searched.

Returns:
the locations that this source locator is currently searching, in the order that they are searched

getSourceElements

public 
Object[] getSourceElements(
IStackFrame stackFrame)
Deprecated. 
Returns all source elements that correspond to the type associated with the given stack frame, or null if none.

Parameters:
stackFrame - stack frame
Returns:
all source elements that correspond to the type associated with the given stack frame, or null if none
Since:
2.1

getSourceElement

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

collectRequiredProjects

protected static void collectRequiredProjects(
IJavaProject proj,
                                              
ArrayList res)
                                       throws 
JavaModelException
Deprecated. 
Adds all projects required by proj to the list res

Parameters:
proj - the project for which to compute required projects
res - the list to add all required projects too
Throws:
JavaModelException

getDefaultSourceLocations

public static 
IJavaSourceLocation[] getDefaultSourceLocations(
IJavaProject project)
                                                       throws 
CoreException
Deprecated. 
Returns a default collection of source locations for the given Java project. Default source locations consist of the given project and all of its required projects .

Parameters:
project - Java project
Returns:
a collection of source locations for all required projects
Throws:
CoreException - if an exception occurs reading computing the default locations

getMemento

public 
String getMemento()
                  throws 
CoreException
Deprecated. 
Specified by:
getMemento in interface IPersistableSourceLocator
Throws:
CoreException

initializeDefaults

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

initializeFromMemento

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

Eclipse JDT
Release 3.5

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire