Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » xtext editor in gmf property tab
xtext editor in gmf property tab [message #653718] Thu, 10 February 2011 19:53 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 13
Registered: October 2010
Junior Member
Hello,

Is it possible to embed an xtext editor in a GMF custom property tab?

I have a model that containts elements each containing in turn an attribute of type EString. The elements are represented as nodes in the GMF editor. I would like to create an xtext editor to edit the content of an attribute in a property tab when a node that contains the attribute is selected. The xtext editor should use as an input the contents of an attribute and store the output back to that attribute.

Could someone provide an example, reference or any guidelines how to achieve this functionality?

Cheers,
Stanislav

Re: xtext editor in gmf property tab [message #653794 is a reply to message #653718] Fri, 11 February 2011 09:06 Go to previous message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
We did something similar in the GMF example: File->New->Example->Xtext
->Xtext GMF Integration. It is not property tab but a popup editor, so
we could reuse the XtextEditor, which is kind of heavy weight due to the
Eclipse text editor framework. There is extensive - though often ignored
;-) - documentation on that in the Xtext docs (Integration with EMF...)

An alternative is to enrich a StyledText widget with Xtext editing
capabilities, as we did in org.eclipse.xtext.ui.codetemplates.ui. We
have not found the time yet to extract / document that to be easily
consumable, so you have to do some code research yourself.


Am 10.02.11 20:53, schrieb Stanislav:
> Hello,
>
> Is it possible to embed an xtext editor in a GMF custom property tab?
>
> I have a model that containts elements each containing in turn an
> attribute of type EString. The elements are represented as nodes in the
> GMF editor. I would like to create an xtext editor to edit the content
> of an attribute in a property tab when a node that contains the
> attribute is selected. The xtext editor should use as an input the
> contents of an attribute and store the output back to that attribute.
>
> Could someone provide an example, reference or any guidelines how to
> achieve this functionality?
>
> Cheers,
> Stanislav
>
>


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Previous Topic:Developing without restart
Next Topic:Help with IF grammar
Goto Forum:
  


Current Time: Tue Apr 16 15:19:12 GMT 2024

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

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

Back to the top