How to build a pure e4 RCP Text Editor

不羁岁月 提交于 2019-12-24 07:47:08

问题


I am using the latest Eclipse 4.7 Eclipse. I am trying to build a language sensitive editor for a pure e4 RCP application. I have modeled my editor after the example XML Text Editor template project (generated from File->New->Plug-in project). I have modified it and extended it to support my custom language (loosely based on specialized XML tags/elements/attributes). I can run this plugin on its own from the default product “org.eclipse.platform.ide” and it works just fine. But I am trying to include this plug-in into my own pure e4 RCP application and I am having a challenge in figuring out how to present my custom editor.

I try to follow the tutorial from Vogella found here: http://www.vogella.com/tutorials/EclipseEditors/article.html#add-simple-content-assist

I even purchased the Vogella book.

But that example looks nothing like the standard XML Text Editor example. From the tutorial, it mentions that to launch the editor programmatically, it implies that you need to create your own implementation of IEditorInput – but how does this relate to how the example XML Text Editor provides input for the editor through extending the FileDocuementProvider?

Perhaps the XML Text Editor example is the old 3.X way of doing things and I need to refactor my editor. I can do this – but then are there pure e4 RCP Text Editor examples similar in functionality to the XML Text Editor example? I really do need the syntax highlighting, validation, support markers, etc. found in the XML Editor example. Where can I go to learn how to do this?

来源:https://stackoverflow.com/questions/44728445/how-to-build-a-pure-e4-rcp-text-editor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!