Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Using some Xtext features in a SWT Widget
Using some Xtext features in a SWT Widget [message #686012] Tue, 21 June 2011 11:31 Go to next message
Daniel Trierweiler is currently offline Daniel TrierweilerFriend
Messages: 67
Registered: June 2011
Member
Hey guys!

I've got the idea of a SWT Table/Grid Widget which can use some of the features provided by the Xtext Editor. The most needed features would be the code completion, the linking and the validation.
So, my actual question... is it possible to use those features outside of the Xtext Editor?

Thanks a lot Smile

Daniel
Re: Using some Xtext features in a SWT Widget [message #689664 is a reply to message #686012] Tue, 28 June 2011 06:27 Go to previous messageGo to next message
Daniel Trierweiler is currently offline Daniel TrierweilerFriend
Messages: 67
Registered: June 2011
Member
Hey again!

I've found an interesting approach in the Eclipse Magazin 3.11 "TMF meets GMF" where Xtext is used in a temporary displayed editbox via an adjusted TextCellEditor (named XTextCellEditor).
But I'm not really sure how this could be done with an SWT Widget, especially if this widget has no CellEditor or something like that. (like the Xviewer of the Nebula Project or NatTable).
Any input on this is highly welcome Smile

Daniel
Re: Using some Xtext features in a SWT Widget [message #691842 is a reply to message #689664] Sat, 02 July 2011 14:41 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1770
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 06/28/2011 08:27 AM, Daniel Trierweiler wrote:
> Eclipse Magazin 3.11 "TMF meets GMF"

is this available online?

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: Using some Xtext features in a SWT Widget [message #692068 is a reply to message #689664] Sun, 03 July 2011 11:26 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Jan did that in the GMF example wich we had to drop in Xtext 2.0 due to
problems with GMF. But you could look at the Xtext 1.0 version of it.
Also note that the template proposals text widget in the preference page
is based on an Xtext editor. You should be able to find some hints there
as well. Finally there is a project called xtext-forms over at
eclipselabs
http://code.google.com/a/eclipselabs.org/p/xtext-forms-integration/

Also AFAIK such an Xtext integration is used in papyrus.

Sven

Am 6/28/11 8:27 AM, schrieb Daniel Trierweiler:
> Hey again!
>
> I've found an interesting approach in the Eclipse Magazin 3.11 "TMF
> meets GMF" where Xtext is used in a temporary displayed editbox via an
> adjusted TextCellEditor (named XTextCellEditor).
> But I'm not really sure how this could be done with an SWT Widget,
> especially if this widget has no CellEditor or something like that.
> (like the Xviewer of the Nebula Project or NatTable).
> Any input on this is highly welcome :)
>
> Daniel


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Using some Xtext features in a SWT Widget [message #692273 is a reply to message #692068] Mon, 04 July 2011 05:56 Go to previous messageGo to next message
Daniel Trierweiler is currently offline Daniel TrierweilerFriend
Messages: 67
Registered: June 2011
Member
Hey guys.

The article isn't available online, only for subscribers of eclipse magazine.
Thanks for your answer Sven. I already looked into the forms example, but this just won't solve the problem, as I need the features of Xtext over the whole table. This means I have to map the model's tree to the table and still provide the correct content assist (e.g. one row for each EObject with the EAttributes listed). If I do it like in the forms example, then I'll have a full Xtext Editor for each cell, which will definitely not solve the problem.
I will have a look at papyrus, thanks for the hint Smile

Daniel
Re: Using some Xtext features in a SWT Widget [message #692277 is a reply to message #692273] Mon, 04 July 2011 06:04 Go to previous messageGo to next message
Daniel Trierweiler is currently offline Daniel TrierweilerFriend
Messages: 67
Registered: June 2011
Member
Actually I already described the problem a bit further here:

http://www.eclipse.org/forums/index.php/t/217008/
Re: Using some Xtext features in a SWT Widget [message #692337 is a reply to message #692277] Mon, 04 July 2011 08:58 Go to previous message
Andreas Muelder is currently offline Andreas MuelderFriend
Messages: 73
Registered: July 2011
Member
Hi,

the article is not available online, but I wrote a small blog post on this topic.
(muelder.blogspot.com)

The CellEditor is part of the YAKINDU Statechart tools project now, you can find it at the google code eclipse labs.

Andreas


Previous Topic:How to run the code generator from another eclipse instance
Next Topic:Integrating Xbase with EMF and own language
Goto Forum:
  


Current Time: Wed Sep 30 00:42:44 GMT 2020

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

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

Back to the top