XText in a RCP product
Asked Answered
I

1

6

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 workspaces 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...

Inconsistent answered 19/9, 2011 at 8:23 Comment(2)
Please, clarify your question. In this form it is really hard to understand, what is your problem. Please, state the problem and your previous attempts to solve it, so we could help you in a more detailed manner.Arlaarlan
Thanks for the clarification. The included issue has comments stating that it is not supported to run Xtext editors outside of IDE elements because the heavy use of the Eclipse Resources API. Sadly, you either add the required dependency and configuration nightmare to support this, or you manually take out the builder option for the Xtext 2.0 editor.Arlaarlan
S
2

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).

Sihonn answered 21/11, 2012 at 10:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.