Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Calling a custom compiler(How do I implement custom calls to my DSL compiler?)
Calling a custom compiler [message #1057934] Thu, 09 May 2013 20:57 Go to next message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
My DSL already has an external compiler ready to work. I would like to be able to call the compiler from Eclipse in "Run as..." with the proper arguments.

How can I accomplish that? Is there some binding in Xtext?
Re: Calling a custom compiler [message #1058072 is a reply to message #1057934] Fri, 10 May 2013 19:28 Go to previous messageGo to next message
Erick Fonseca is currently offline Erick FonsecaFriend
Messages: 68
Registered: December 2011
Member
I just found that I can easily create a custom call as an external call (under the run menu).

However, I'd like to include in the call things like imported files. E.g., if my DSL file has "import mylib", I'd like to include a command line flag like "-i mylib.dsl". How can I integrate that with external tools?
Re: Calling a custom compiler [message #1058093 is a reply to message #1058072] Sat, 11 May 2013 00:37 Go to previous message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2500
Registered: July 2009
Senior Member
On 2013-10-05 21:28, Erick Fonseca wrote:
> I just found that I can easily create a custom call as an external call
> (under the run menu).
>
> However, I'd like to include in the call things like imported files.
> E.g., if my DSL file has "import mylib", I'd like to include a command
> line flag like "-i mylib.dsl". How can I integrate that with external
> tools?

You could write an internal builder that is triggered on resource
changes (when a file is saved). It then runs the external builder (say
when in an error free state...)

Does your compiler have ANT integration? If so, you could perhaps
integrate it via the ANT support in Eclipse (I have not done this, so I
don't know if it is easy, but maybe worth exploring if you know ANT or
if already supported in some way for your compiler).

Just 2c from me...
- henrik
Previous Topic: emulate return functions and objects in xbase???
Next Topic:Developing custom xtext editor
Goto Forum:
  


Current Time: Thu Nov 27 22:18:43 GMT 2014

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

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