Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Copying a whole folder
Copying a whole folder [message #870529] Tue, 08 May 2012 14:43 Go to next message
Roberto Jimenez is currently offline Roberto JimenezFriend
Messages: 17
Registered: March 2012
Junior Member
Hello, I need to generated a folder, in the src-gen where its generated the code from dsl files. I explain:

I have this folder in the computer:


and inside it more folders and files.

And in the dsl project I have something like that:


I want to generate the folder res inside src-gen. Is it posible???


And in the other answer I didnt understand nothing:

What do I have to do????

You have to configure an OutputConfiguration for folder /res by providing an customized IOutputConfiguration, bind it in the runtime module of your DSL project and generate at least one file to this output configuration. The IFileSystemAccess has a method which takes the output configuration name as a second argument.


I dont know what it means.

Thanks a lot for the help.
Re: Copying a whole folder [message #870575 is a reply to message #870529] Tue, 08 May 2012 19:26 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13669
Registered: July 2009
Senior Member

what Karsten said: there is NO out of the box solution for that. one possible hook is a custom IFileSystemAccess.
another possibility is a custom org.eclipse.xtext.builder.IXtextBuilderParticipant.

You would subclass org.eclipse.xtext.builder.BuilderParticipant and override handleChangedContents.
Here you have access to the IFileSystemAccess as well.
Since you do not want to generate to the src-gen folder but to the res folder you would need a
own OutputConfiguration for that folder. => Bind a own OutputConfigurationProvider

Never the less you have think about a solution for getting the stuff and copying it yourself
=> Maybe you should do the copy the resources task not with the builder but rather with a classic action/handler or wizard.

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:Referencing generated code from other DSL files.
Next Topic:xtext generator unittest with xtend
Goto Forum:

Current Time: Sat Dec 05 00:41:21 GMT 2020

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

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

Back to the top