在 Eclipse“文件比较”中显示标记看法

发布于 2024-09-10 19:11:04 字数 123 浏览 1 评论 0原文

我通过在比较视图的弹出(上下文)菜单上激活的处理程序向标准 Eclipse“比较视图”添加了一些功能。该处理程序所做的事情之一是在选择位置添加一个标记。但是,比较视图中不显示标记。如何增强比较视图以显示标记?我必须建立自己的观点吗?

I've added some functionality to the standard Eclipse "compare view" via a handler which is activated on the Compare view's popup (context) menu. One of the things that this handler does is add a marker at the selection location. However, markers are not shown in the compare view. How can I enhance the compare view to show markers? Do I have to build my own view?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撕心裂肺的伤痛 2024-09-17 19:11:04

比较编辑器与标准编辑器确实不同,每个功能都必须为其重新实现。您必须自己编写代码(据我所知),但您可以查看原始编辑器的实现以获取提示。

在 Eclipse 中,AbstractDecolatedTextEditor 实现标记显示功能(它是 TextEditor 类的后代)。在使用比较编辑器的情况下,此功能难以实现的原因是,比较编辑器一次打开两个资源,因此很难将每个标记放入正确的位置(我认为这就是为什么它没有被普遍实现的原因)。

The compare editor is really different from the standard editors, every functionality has to be reimplemented for it. You have to code it yourself (as far as I know), but you can look at the implementation of the original editor for hints.

In case of Eclipse, AbstractDecoratedTextEditor implements the marker display functionality (that is a descendant of the TextEditor class). What makes this functionality hard to implement in case of Compare editors is the fact, that the compare editor opens two resources at once, so it is harder to put every marker into its correct place (I think that's why it is not implemented generically).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文