Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Two file extension for one Xtext project(It is possible to have two file extension for the same Xtext project?)
Two file extension for one Xtext project [message #646465] Fri, 24 December 2010 13:01 Go to next message
Jake is currently offline JakeFriend
Messages: 21
Registered: November 2010
Junior Member
It is possible to have two file extension for the same Xtext project?

[Updated on: Sat, 25 December 2010 17:38]

Report message to a moderator

Re: Two file extension for one Xtext project [message #646506 is a reply to message #646465] Sat, 25 December 2010 21:49 Go to previous messageGo to next message
Meinte Boersma is currently offline Meinte BoersmaFriend
Messages: 434
Registered: July 2009
Location: Leiden, Netherlands
Senior Member
Yes, configure it either in the wizard or in the .mwe2 file as a comma-separated list.

Re: Two file extension for one Xtext project [message #655514 is a reply to message #646506] Mon, 21 February 2011 14:21 Go to previous messageGo to next message
Wade Cooper is currently offline Wade CooperFriend
Messages: 9
Registered: February 2011
Junior Member
What is the approach for including a comma-separated list in the .mwe2 file to accept two extensions, specifically two case-sensitive versions (e.g., .mydsl and .MYDSL)?

I've tried a few different approaches but can't get the 2nd extension to work. In fact, when I change the .mwe2 file to include only the 2nd extension (MYDSL) and not the 1st extension (mydsl), re-run the .mwe2 workflow, and launch the UI, it appears to make no change.

e.g., changing from

var file.extensions = "mydsl"

to

var file.extensions = "MYDSL"

and re-running the MWE2 workflow will still only open files of type .mydsl, and throw an IllegalStateException for MYDSL.

Any thoughts on how to get the UI to recognize a 2nd case-sensitive extension in an existing project?

Thanks.


Re: Two file extension for one Xtext project [message #655540 is a reply to message #655514] Mon, 21 February 2011 16:33 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

note that you will have to merge the plugin.xml and plugin.xml_gen manually after regenerating.

Use F3 on the "setter" for the file extension in order to see, how it is handled in the actual code. If a comma separated list is used,
var file.extensions="mydsl,MYDSL" should probably work.

Alex
Re: Two file extension for one Xtext project [message #655828 is a reply to message #646465] Tue, 22 February 2011 18:26 Go to previous message
Wade Cooper is currently offline Wade CooperFriend
Messages: 9
Registered: February 2011
Junior Member
Thanks Alex. Copying the UI's plugin.xml_gen extension_parser text into the plugin.xml fixed the problem.

Previous Topic:MWE2 Errors with XText 2.0 (using UIElements ecore model)
Next Topic:ebnf2 is not supported for CrossReference
Goto Forum:
  


Current Time: Thu Apr 18 15:47:08 GMT 2024

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

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

Back to the top