Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Migrating mwe to mwe2 and the fragment file
Migrating mwe to mwe2 and the fragment file [message #1388663] Thu, 26 June 2014 19:40 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi to all,

I want to migrate my mwe workflow to mwe2.

I have several links to fragment files of the kind:

<language uri="foo.xtext">
<fragment file="/bla/StandardFragments.mwe"
</language>

How can I model this external fragment files?
Do you have a migration guide somewhere?

Thanks in advance
Cheers
Markus
Re: Migrating mwe to mwe2 and the fragment file [message #1388684 is a reply to message #1388663] Thu, 26 June 2014 20:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
HI,

the <bean file=""> pattern is not supported in mwe2. mut you can import / reference stuff like... (although i dont know anyone who actually does this)

second.mwe2
module a.b.c.DModule

org.eclipse.xtext.generator.serializer.SerializerFragment auto-inject {
	generateStub = false
}


main.mwe2
import a.b.c.DModule
...
fragment = @DModule {
    			
    		}

...


but why not simply inlining them?????


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Migrating mwe to mwe2 and the fragment file [message #1388752 is a reply to message #1388684] Thu, 26 June 2014 22:42 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Christian,

we have multiple plugins which are using the same fragments, so we defined the common fragments in a separate mwe file.


One more question... In the included file I define e.g.:

// <fragment class="org.eclipse.xtext.generator.resourceFactory.ResourceFactoryFragment"
// fileExtensions="${fileExtensions}"/>
fragment = ResourceFactoryFragment {
fileExtensions = auto-inject {} -> don't know if auto-inject is correct here
}

The property fileExtensions was set in the calling mwe script before, like
<fragment file="bla/StandardFragments.mwe" fileExtensions="xtextdoc"/>

Can I set fileExtensions to parameterize the call with mwe2, too?
How do I have to reconfigure the following line:
fragment = @ StandardFragments {}

Thanks for all your help
Cheers
Markus
Re: Migrating mwe to mwe2 and the fragment file [message #1388945 is a reply to message #1388752] Fri, 27 June 2014 05:52 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.xtext.doc%2Fcontents%2F118-mwe-in-depth.html&resultof=%22mwe2%22%20

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Making QualifiedNamed reference an EObject
Next Topic:Making QualifiedNamed reference an EObject
Goto Forum:
  


Current Time: Fri Apr 19 19:27:16 GMT 2024

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

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

Back to the top