Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Convert xtext code to JavaScript
Convert xtext code to JavaScript [message #1737328] Thu, 07 July 2016 10:53 Go to next message
Marko Markovic is currently offline Marko MarkovicFriend
Messages: 35
Registered: August 2014
Member
Hi,
I have xtext code (like Java, I used xbase) and I want to translate it to JavaScript. Which is the easiest way?
I'm already generated java code.
Is it easier to create JavaScript code directly from xtext code or from already existing Java code?

Thank you.
Re: Convert xtext code to JavaScript [message #1737329 is a reply to message #1737328] Thu, 07 July 2016 10:55 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13714
Registered: July 2009
Senior Member
since there is no out of the box solution i think translating the java code to js would be easier if there is a tool that does this.

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Convert xtext code to JavaScript [message #1737330 is a reply to message #1737329] Thu, 07 July 2016 10:56 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13714
Registered: July 2009
Senior Member
p.s.: what is the reason to go to java script?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Convert xtext code to JavaScript [message #1737456 is a reply to message #1737330] Fri, 08 July 2016 11:57 Go to previous messageGo to next message
Marko Markovic is currently offline Marko MarkovicFriend
Messages: 35
Registered: August 2014
Member
Thank you Christian,

The idea is to my DSL runs on various platforms.. Java, JavaScript.. I will try with GWT.
Re: Convert xtext code to JavaScript [message #1737457 is a reply to message #1737456] Fri, 08 July 2016 12:10 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13714
Registered: July 2009
Senior Member
Sounds more like a use case for xtext web support

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Convert xtext code to JavaScript [message #1737459 is a reply to message #1737457] Fri, 08 July 2016 12:31 Go to previous messageGo to next message
Marko Markovic is currently offline Marko MarkovicFriend
Messages: 35
Registered: August 2014
Member
I understood that it is only the Web editor for writing DSL? I want to convert my DSL to JavaScript. My DSL is java like.
Re: Convert xtext code to JavaScript [message #1737462 is a reply to message #1737459] Fri, 08 July 2016 12:39 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13714
Registered: July 2009
Senior Member
Marko Markovic <forums-noreply@xxxxxxxx> wrote:
> I understood that it is only the Web editor for writing DSL? I want to
> convert my DSL to JavaScript. My DSL is java like.
>

I guess this won't work


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Convert xtext code to JavaScript [message #1737463 is a reply to message #1737459] Fri, 08 July 2016 12:41 Go to previous message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 13714
Registered: July 2009
Senior Member
Marko Markovic <forums-noreply@xxxxxxxx> wrote:
> I understood that it is only the Web editor for writing DSL? I want to
> convert my DSL to JavaScript. My DSL is java like.
>

Depending on what you do in yourdsl it may work. Make sure you use the gwt
version of xbase


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Cyclic linking detected when building in maven
Next Topic:Best Solution for when ISemanticModification quickfix results in an InvalidConcreteSyntaxException
Goto Forum:
  


Current Time: Thu Jan 21 08:47:17 GMT 2021

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

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

Back to the top