Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XtextStyledTextCellEditor(Xtext Editor in JFace TableViewer)
icon5.gif  XtextStyledTextCellEditor [message #911796] Wed, 12 September 2012 10:40
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 16
Registered: March 2010
Junior Member

I would like to integrate my Xtext editor for my DSL into a JFace TableViewer.
I tried to do this with the XtextStyledTextCellEditor from Itemis' YAKINDU, but apart from this "TMF meets GMF"-presentation, I hardly found any documentation.

I already have an EditingSupport class that returns that editor (see below).

public class MyEditingSupport extends EditingSupport {

	private ColumnViewer viewer;

	public MyEditingSupport(ColumnViewer viewer) {
		this.viewer = viewer;

	protected CellEditor getCellEditor(Object element) {

		XtextStyledTextCellEditor xTextCellEditor = new XtextStyledTextCellEditor(SWT.SINGLE, MyDSLActivator
		xTextCellEditor.create((Composite) viewer.getControl());
		return xTextCellEditor;

	protected boolean canEdit(Object element) {
		return true;

	protected Object getValue(Object element) {
		return element.toString();

	protected void setValue(Object element, Object value) {
		viewer.update(element, null);


How do I implement the getValue method so that the generated DSL-String is shown so that the user can edit it using the Xtext editor?

Thanks for your help!
Previous Topic:Need assistance with formatting...
Next Topic:Problem markers don't get cleaned if project doesn't have xtext nature
Goto Forum:

Current Time: Sat Feb 29 10:23:18 GMT 2020

Powered by FUDForum. Page generated in 0.08449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top