在独立应用程序中使用 JFace ProjectionViewer

发布于 2024-11-15 20:06:06 字数 531 浏览 0 评论 0原文

我一直在尝试使用 JFace ProjectionViewer 在独立的 Java 应用程序中实现折叠。我从这篇文章中得到了这个想法: http://www.eclipse.org/articles /Article-Folding-in-Eclipse-Text-Editors/folding.html 然而,本文提供的源代码适用于 Eclipse 插件,而不是独立的。

我遇到的具体问题是我无法让 VerticalRuler 做出响应并导致折叠/展开。

由于我得到了预期的结果,即标尺中的行号,当我从使用 VerticalRuler 更改为 LineNumberRuler 同时保持其他所有内容不变时,我认为我的问题特定于 ProjectionViewer、VerticalRuler、和注释。

我确切的问题是是否有人已经让它在独立代码中工作,如果是的话,如何实现?

I've been trying to use the JFace ProjectionViewer to implement folding in a standalone Java app. I got the idea from this article:
http://www.eclipse.org/articles/Article-Folding-in-Eclipse-Text-Editors/folding.html
However the source code provided with the article is for an Eclipse plug-in, not for a standalone.

The particular problem I'm having is that I can't get the VerticalRuler to respond and cause folding/unfolding.

Since I get the expected results, i.e. line numbers in the ruler, when I change from using a VerticalRuler to a LineNumberRuler while leaving everything else the same, I think my problem is specific to the implementation of the relationship among the ProjectionViewer, the VerticalRuler, and the Annotations.

My exact question is whether anyone has gotten this to work in a stand-alone code and, if so, how?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文