RCP:ISourceLocator翻译

简介: org.eclipse.debug.core.model.ISourceLocator   A source locator locates source elements for stack frames.
org.eclipse.debug.core.model.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.

 

资源定位器用于为stack frames找到源码元素。加载器会指定一个用于为debug session提供定位源的资源定位器,如果加载器没有提供,则元素不会显示。对源查找的抽象化,将允许客户端隐藏源码定位的具体实现和表达(换言之,调用者只需要知道接口)。

 

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.

 

一般来说,debug model的实现会同时伴随着launch configuration类型、授权以及源定位的实现,这些工作是一个整体。资源定位器的实现需要知道如何为一个stack frame定位它的源元素。例如,一个java stack frame会定义制定源文件名的API,一个java source locator将会使用该信息去在工作空间里定位相关的文件。

 

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.

 

源由debug UI插件显示。debug UI使用source locator来为stack frame提供一个对象来表示源,然后使用一个debug model表达来决定编辑器和编辑器输入用于展示实际的源。

 

See Also:
org.eclipse.debug.core.ILaunch
org.eclipse.debug.core.model.IStackFrame
org.eclipse.debug.core.model.IPersistableSourceLocator
目录
相关文章
|
5月前
|
网络协议 Python
149 python网络编程 - TFTP下载案例
149 python网络编程 - TFTP下载案例
26 0
|
安全 Linux Python
[脚本工具] Python 局域网Hosts实现DDNS / Github网速增强
[脚本工具] Python 局域网Hosts实现DDNS / Github网速增强
316 0
[脚本工具] Python 局域网Hosts实现DDNS / Github网速增强
|
存储 NoSQL 前端开发
MIT 6.828 操作系统工程 2018 fall xv6 lab1 笔记 and 中文注释源代码阅读
MIT 6.828 操作系统工程 2018 fall xv6 lab1 笔记 and 中文注释源代码阅读 mit 6.828 lab 代码和笔记,以及中文注释源代码已放置在github中: https://github.com/yunwei37/xv6-labs
1799 0
|
Android开发 Java API
将Eclipse插件转换为RCP应用程序(上)
有不少朋友问到如何把一个已有的Eclipse插件转换为RCP应用程序,其实这个过程并不复杂,因为RCP应用也是基于插件的结构,可以说RCP 就是精简后的Eclipse平台,只是我们要对这个平台做一些定制工作。
1806 0
|
Android开发
将Eclipse插件转换为RCP应用程序(下)
在上一篇里我们为一个普通的Eclipse插件添加了Application扩展,剩下来的工作就很简单了,甚至不需要再编写一行代码。在 Eclipse 3.1里,把具有Application的插件包装成RCP并输出的过程是通过建立产品配置文件(Product Configuration)来完成的。
1356 0
|
Windows 数据格式 XML