Eclipse 源代码中使用的编辑器库
我正在寻找创建一个编辑器,并且想知道 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Eclipse 是基于SWT,而不是基于Swing。
至于自定义编辑器,您可以使用 XText< 来查看基于 eclipse-GMF-EMF 的编辑器/a>
替代文本 http://www.eclipse.org/Xtext/images/screenshot-标题.png
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
alt text http://www.eclipse.org/Xtext/images/screenshot-title.png
实际上,我认为您想考虑开发一个 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.