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...
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With