Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Editor integration(Discussing various ways of how to integrate an Xtext Editor)
Xtext Editor integration [message #638417] Thu, 11 November 2010 09:23 Go to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
Hello Everyone,

I am currently looking for a way of how to integrate an Xtext editor. What i am interested in is how to place the Xtext Editor into a Multi-Page-Editor or into an Editor based on Forms. All examples i found were quite heavy and far over the top.

Cheers

Phil
Re: Xtext Editor integration [message #638463 is a reply to message #638417] Thu, 11 November 2010 12:00 Go to previous messageGo to next message
Darie Moldovan is currently offline Darie MoldovanFriend
Messages: 67
Registered: November 2010
Location: Darmstadt, Germany
Member
Hi Phil,

I'm also interested in developing such a plugin for Eclipse, but I'm still at the beginning, where I ask myself fundamental Xtext questions Cool

Did you take a look at the Xtext GMF integration example, which comes with the latest distribution of xtext? I just saw it while creating a new project, but I didn't test it.

Cheers
Re: Xtext Editor integration [message #638701 is a reply to message #638417] Fri, 12 November 2010 09:32 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Phil,

what do you mean by "far over the top". The examples that I'm aware of
simply try to solve the common problems when embedding an editor. At
least using Xtext editors in a multi page editor should be straight forward.

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

Am 11.11.10 10:23, schrieb Phil M. Fischer:
> Hello Everyone,
>
> I am currently looking for a way of how to integrate an Xtext editor.
> What i am interested in is how to place the Xtext Editor into a
> Multi-Page-Editor or into an Editor based on Forms. All examples i found
> were quite heavy and far over the top.
>
> Cheers
>
> Phil
Re: Xtext Editor integration [message #638726 is a reply to message #638701] Fri, 12 November 2010 11:16 Go to previous messageGo to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
HI Sebastian, Hi Darie,

what i mean with "Far over the top" is that iam looking for a quick and easy way to integrate. The example i found is not an official one. A guy managed to perfectly embedd a XtextEditor to forms and MPE and so on. This was achieved by using a wrapper for the Xtext generated editor. I am afraid since xtext seems to be quite an agile project, that it becomes expensive to maintain such a wrapper. What dou you think? Confused

So back to what i am looking for: Looking to the example of the MPE in Eclipse, an editorInstance is created with "new TextEditor" and placed to the MPE by "addPage(...,...)".

Something like "XTextEditor editor = new MySpecificXtextEditor()" would be great. Is there something like this?

Do you know examples that you can suggest to me? Darie mentioned a GMF-Xtext example but i cannot find that one.

@Darie: Which example do you mean in particular?

Thanks

Phil
Re: Xtext Editor integration [message #638729 is a reply to message #638726] Fri, 12 November 2010 11:33 Go to previous messageGo to next message
Darie Moldovan is currently offline Darie MoldovanFriend
Messages: 67
Registered: November 2010
Location: Darmstadt, Germany
Member
Hi Phil,

I meant the example, which you can compile and run - in Eclipse, navigate to File -> New... -> Other -> Examples -> Xtext Examples -> Xtext GMF Integration Example. I don't know if this would help you, I never tried that example, I just saw it the other day in the New project window of my Eclipse installation Cool

Back to your initial question - it's a very good point, Xtext is based on automation, therefore I would also expect the developers to have thought of a simple method to integrate an Xtext editor into a multipageEditor. By the way, could you please post here the link you found? Later (maybe at the beginning of the next year), I will also have to create a multi page editor with the help of xtext.

Regarding the implementation - I also looked for a class which extends TextEditor, but didn't find it. Confused

If you find something interesting, please post the links here. Thanks!

Viele Grüße
Re: Xtext Editor integration [message #639069 is a reply to message #638417] Mon, 15 November 2010 08:19 Go to previous messageGo to next message
Philipp M. Fischer is currently offline Philipp M. FischerFriend
Messages: 67
Registered: November 2010
Location: Germany
Member
Hi Darie,

have a look to the topic about "xtext + Emf Edidtor". It is the same example that i found in the WWW.

Cheers

Phil
Re: Xtext Editor integration [message #639214 is a reply to message #638417] Mon, 15 November 2010 15:57 Go to previous message
Christian Saad is currently offline Christian SaadFriend
Messages: 39
Registered: July 2009
Member
I moved most of the EMF<->Xtext synchronization stuff into a single class. It's still a bit messy implementation-wise and the commandstacks don't get synchronized. If you're interested you can take a look at

http://code.google.com/p/model-analysis-framework/source/bro wse/trunk/MAF-ATTRMM-EDITOR/src/de/uniAugsburg/MAF/editor/pa ges/xtext/SyncHelper.java

Also, there is a synchronization between the Xtext editor & the EMF outline.
Previous Topic:Content assist / scoping issue
Next Topic:Problems in UI tests
Goto Forum:
  


Current Time: Tue Apr 30 11:42:11 GMT 2024

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

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

Back to the top