Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtend generation File attributes
Xtend generation File attributes [message #716540] Wed, 17 August 2011 16:24 Go to next message
x0  is currently offline x0 Friend
Messages: 1
Registered: August 2011
Junior Member
I am generating from one another DSL, and after getting the code.
I have to manually remove attribute Derived from-generated file.
Is there a way to generate files without Derived attributes, or generate from files with the attribute Derived?
Re: Xtend generation File attributes [message #716559 is a reply to message #716540] Wed, 17 August 2011 17:11 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13898
Registered: July 2009
Senior Member
Hi,

you have to patch Xtend2 Builder

~Christian


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: Xtend generation File attributes [message #716585 is a reply to message #716540] Wed, 17 August 2011 18:56 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
You need to subclass
org.eclipse.xtext.builder.EclipseResourceFileSystemAccess

and override "generateFile(String, String, CharSequence)"

unfortunately you'll have to copy most of that method but remove the
setDerived statement.

You'll also need to create a guice binding from
EclipseResourceFileSystemAccess to your new subtype in the ui module.

We'll come up with a more configurable alternative which makes this easier.

Sven

Am 8/17/11 6:24 PM, schrieb x0:
> I am generating from one another DSL, and after getting the code.
> I have to manually remove attribute Derived from-generated file.
> Is there a way to generate files without Derived attributes, or generate
> from files with the attribute Derived?
>


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Previous Topic:Cross-referencing only if object exists
Next Topic:How to get the name of an unresolved reference
Goto Forum:
  


Current Time: Fri Apr 23 14:43:43 GMT 2021

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

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

Back to the top