Embeded single line editor [message #1746347] |
Thu, 27 October 2016 11:45  |
|
Hi,
We are already rather successfully using the embedded editor in our application. For a new use case it would be great to have a single line text field with an Xtext grammar.
In principle it is working however the look and feal is rather awkward. The main issue is that the withParent method is creating the sourceviewar with scrollbars enabled per default. The respective code is:
final XtextSourceViewer viewer = this.sourceViewerFactory.createSourceViewer(
parent,
annotationRuler,
null, // overviewRuler
false, // showAnnotationOverview
SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
For my use-case it would be better if I could set the style to SWT.BORDER | SWT.SINGLE.
Therefore my question would be can I somehow overwrite or provide my own seourceViewerFactory which would take car of this?
Or is there an other option how to better handle this?
Thanks in advance,
Alois
|
|
|
|
|
|
Re: Embeded single line editor [message #1746352 is a reply to message #1746350] |
Thu, 27 October 2016 12:31   |
|
Jep I got this. I meant the XTextSourceViewerFactory. But it looks like that the default implementation gets injected. so I could inherit from this and provide my own. SO my last dumb question would be how I do the binding. I played a bit with xxxUIModule class but was not very lucky. Could you be so kind and point me to some docs or to give me a hint for the names to be used there?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01879 seconds