Embeded single line editor [message #1746347] |
Thu, 27 October 2016 07:45  |
Eclipse User |
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03687 seconds