开发者

XText in a RCP product

we want to provide the users of our RCP product with a textual editor for our model. Accordingly, we created an EMF model and a XText grammar. The problem is that our RCP app does not the Eclipse IDE's project structure (i.e., we do not have any workspa开发者_如何学运维ces or builders), hence we have some troubles in making the XText editor work...

does anybody have some suggestions?

[EDIT to clarify my question]

I have some plugins with the EMF model & XText stuff. If I run those plugins in a "standard" eclipse product, I am able to create and edit textual instances of my model (like in the default XText demo).

However, I need to go a step further: those plugins are required in a RCP product I'm working on. This product does NOT leverage the project management of eclipse. Accordingly, my RCP cannot add the XText nature to its projects, hence the default XText editor are not properly working.

When I searched for solutions, I only found links dated 2009 (which is before XText 2.0). Additionally, there is a bug opened on this issue ( https://bugs.eclipse.org/bugs/show_bug.cgi?id=289212 ) but the last comment was made roughly one year ago...


As of April 2012, XText does now support this via IURIEditorInput support. A comment [1] to that effect on the bug mentioned in the question reads as follows.

Xtext now supports IURIEditorInput. Solutions for linking have navigation is currently under investigation. You'll have to explicitly enable validation for files that do not reside in a workspace, though. Editor-like text fields can already be obtained by means of EmbeddedEditorFactory.newEditor(IEditedResourceProvider).withParent(Composite)

[1]: Link to comment 21 made by Sebastian Zarnekow (2012-04-02 11:11:25 EDT).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜