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 Platform
Release 3.5

org.eclipse.debug.core.model
Interface ISourceLocator

All Known Subinterfaces:
IPersistableSourceLocator, IPersistableSourceLocator2, ISourceLookupDirector
All Known Implementing Classes:
AbstractSourceLookupDirector

public interface ISourceLocator

A source locator locates source elements for stack frames. A launch (optionally) specifies a source locator which is used to locate source for that debug session. If a launch does not provide a source locator, source cannot be displayed. Abstraction of source lookup allows clients to hide implementation details of source location and representation.

Generally, an implementor of a debug model will also implement launch configuration types, delegates, and source locators that work together as a whole. That is, the implementation of a source locator will have knowledge of how to locate a source element for a stack frame. For example, a Java stack frame could define API which specifies a source file name. A Java source locator would use this information to locate the associated file in the workspace.

Source is displayed by the debug UI plug-in. The debug UI uses a source locator to resolve an object representing the source for a stack frame, and then uses a debug model presentation to determine the editor and editor input to use to display the actual source in an editor.

Clients may implement this interface.

See Also:
ILaunch, IStackFrame, IPersistableSourceLocator

Method Summary
  Object getSourceElement ( IStackFrame stackFrame)
          Returns a source element that corresponds to the given stack frame, or null if a source element could not be located.
 

Method Detail

getSourceElement

Object getSourceElement(
IStackFrame stackFrame)
Returns a source element that corresponds to the given stack frame, or null if a source element could not be located. The object returned by this method will be used by the debug UI plug-in to display source. The debug UI uses the debug model presentation associated with the given stack frame's debug model to translate a source object into an {editor input, editor id} pair in which to display source.

For example, a java source locator could return an object representing a compilation unit or class file. The java debug model presentation would then be responsible for providing an editor input and editor id for each compilation unit and class file such that the debug UI could display source.

Parameters:
stackFrame - the stack frame for which to locate source
Returns:
an object representing a source element.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


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