Eclipse 源代码中使用的编辑器库

发布于 2024-08-15 09:40:48 字数 103 浏览 2 评论 0原文

我正在寻找创建一个编辑器,并且想知道 Eclipse 是否使用一个 Swing 库作为其主编辑器。这可能是非常基本的东西,但我正在寻找当您按句号时出现的下拉菜单。字符串成为符号而不仅仅是文本。

I am looking to create an editor and I was wondering if there was a Swing library which Eclipse uses for its main editor. It may be something quite basic, but I am looking for the drop down menus which come when you press full stop. Strings become symbols rather than just text.

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

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

发布评论

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

评论(2

倦话 2024-08-22 09:40:49

Eclipse 是基于SWT,而不是基于Swing。

至于自定义编辑器,您可以使用 XText< 来查看基于 eclipse-GMF-EMF 的编辑器/a>

Xtext 是用于开发文本域特定语言 (DSL) 的框架。
只需使用 Xtext 的简单 EBNF 语法语言描述您自己的 DSL,生成器就会创建一个解析器、一个 AST 元模型(在 EMF 中实现)以及一个功能齐全的 Eclipse 文本编辑器

替代文本 http://www.eclipse.org/Xtext/images/screenshot-标题.png

该框架与 Eclipse Modeling 的技术集成,例如 EMF、GMF、M2T 和 EMFT 的一部分。
使用 Xtext 进行开发针对短周转进行了优化,因此向现有 DSL 添加新功能只需几分钟。仍然可以实现复杂的编程语言。

Eclipse is rather SWT-based than Swing-based.

As for a custom editor, you could look into an eclipse-GMF-EMF-based editor with XText

Xtext is a framework for development of textual domain specific languages (DSLs).
Just describe your very own DSL using Xtext's simple EBNF grammar language and the generator will create a parser, an AST-meta model (implemented in EMF) as well as a full-featured Eclipse text editor from that.

alt text http://www.eclipse.org/Xtext/images/screenshot-title.png

The Framework integrates with technology from Eclipse Modeling such as EMF, GMF, M2T and parts of EMFT.
Development with Xtext is optimized for short turn-arounds, so that adding new features to an existing DSL is a matter of minutes. Still sophisticated programming languages can be implemented.

森末i 2024-08-22 09:40:49

实际上,我认为您想考虑开发一个 Eclipse RCP 应用程序,其中涉及使用 SWT、JFace 和 Eclipse 平台的其他部分。 Platform Text 组件中有多层编辑器支持,这是 Eclipse JDT 编辑器的基础。建模内容(GMF、EMF 等)可能比您想要的要多得多。 org.eclipse.ui.texteditor 中的 AbstractTextEditor 类是一个很好的起点。 RCP 为您提供了很多其他东西来帮助您管理正在编辑的对象,但您不一定需要使用它。

Eclipse 角落(在 eclipse.org 上)可能有关于如何执行此操作的文章,但我现在记不起具体的文章了。我总是只看代码。

Actually I think you want to consider developing an Eclipse RCP application which involves using SWT, JFace and other parts of the Eclipse platform. There are many layers of editor support which are in the Platform Text component, this is what the Eclipse JDT editors are based on. The modelling stuff (GMF, EMF, etc) is probably much more than what you want. The AbstractTextEditor class in org.eclipse.ui.texteditor is a good place to start. RCP gets you a lot of other stuff as far as helping you to manage the objects you are editing, but you don't necessarily need to use this.

There are likely Eclipse corner (on eclipse.org) articles on how to do this, but the specific one escapes me now. I always just look at the code.

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