Question

I am building a plugin for eclipse that provides a graphical editor.

In this editor, I want to bind some data between an XText model and the SWT widgets. How can I do this while updating the XTextDocument automatically?

Are there existing tools that help with this, or do code generation for this?

By now, I have created with window builder plugin JFace Automatic Databinding with controller class. it seem that whenever I change the text field which the xtext data model (JString) is bind to, the binding put null/new instance of JString into the JString instance. so the document isn't familiar with the new JString instance and it is not updated with the new data.

Was it helpful?

Solution

I extended AbstractObservableValue to work with simple xtext models as string boolean and numbers. which help me to bind between swt model and my xtext model.

OTHER TIPS

Dana, FYI I've done some work on this front in https://github.com/vorburger/xtext-sandbox/tree/master/XtextDocumentBinding (demo video on http://www.youtube.com/watch?v=7RThXRyo3ik).. basically working, except for lists - patches & pull requests most welcome! ;-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top