문제

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.

도움이 되었습니까?

해결책

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.

다른 팁

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! ;-)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top