Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Creating two xtext files for two file extensions(Creating two xtext files for two file extensions)
Creating two xtext files for two file extensions [message #1800725] Mon, 07 January 2019 07:15 Go to next message
Eclipse UserFriend
Hi all,

I have successfully set up a xtext project for one file extension.
Now I want to extend my DSL language for a second file extension.
That second language should extend my first DSL and allow some additional features.

I would like to know whether anyone could advise me in setting up that correctly.
My aim is to set-up all languages in one trojects. Is this a suitable approach or should I set-up two Independent trojects for those languages?
I would prefer setting up the languages in the same project.

My current problem is the following:
I created a second xtext and a second mwe2 file in the same project.
The second xtext file used the first DSL as grammar and an import of the url.

If I generate the Xtext artifacts of the second language I get an error saying "Failed to execute EMF generator .... Could not find GenModel for EPackage "
So, how to set-up that second language extending the first one?

Thanks for all your patience!

Best regards,
Martin
Re: Creating two xtext files for two file extensions [message #1800750 is a reply to message #1800725] Mon, 07 January 2019 14:14 Go to previous messageGo to next message
Eclipse UserFriend
Have a look at the sample workflow here

https://www.eclipse.org/forums/index.php/t/1096805/
Re: Creating two xtext files for two file extensions [message #1800816 is a reply to message #1800750] Tue, 08 January 2019 10:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi Christian,

thanks for that link.
I am able to use two languages now.

Just a summary:
I can specify two language entries in the mwe2 file and have to specify the referencedResource Attribute in the first DSL correctly as stated in https://www.eclipse.org/forums/index.php/t/1096805/ .
Once the workflow has been exectued I need to copy the content of plugin.xml_gen to plugin.xml of my projects as the extension points of the second language haven't automatically been merged.

Just an observation:
I cannot use "Run as " -> Generate Xtext artifcats on the second xtext file.
I have to run the mwe2 file if I want to create the artifacts, but that's ok for me.

Best regards,
Martin
Re: Creating two xtext files for two file extensions [message #1800817 is a reply to message #1800816] Tue, 08 January 2019 11:23 Go to previous message
Eclipse UserFriend
the xtext and the mwe files are connected by naming convention. thus it does not work.
Previous Topic:Couldn't resolve reference to PanelType 'NavigationBar'
Next Topic:What is the effect of disabling XtextSpellingReconcileStrategy and XtextDocumentReconcileStrategy on
Goto Forum:
  


Current Time: Sat Jun 14 01:59:44 EDT 2025

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

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

Back to the top