Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Unique file extension?(Should the file extension always be unique?)
Unique file extension? [message #662035] Tue, 29 March 2011 00:54 Go to next message
Lisa Zhou is currently offline Lisa ZhouFriend
Messages: 5
Registered: March 2011
Junior Member
Is it possible to create two different xtext projects with the same file extension?
Re: Unique file extension? [message #662040 is a reply to message #662035] Tue, 29 March 2011 01:39 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Even if you naturally can create several projects with different
grammars all using the same extension, you can not have more than one
installed at the same time - the system would not know which parser to
pick when presented with a URI pointing to a file.

What is it you want to do?

- henrik

On 3/29/11 2:54 AM, Lisa Zhou wrote:
> Is it possible to create two different xtext projects with the same file
> extension?
Re: Unique file extension? [message #662042 is a reply to message #662040] Tue, 29 March 2011 02:42 Go to previous messageGo to next message
Lisa Zhou is currently offline Lisa ZhouFriend
Messages: 5
Registered: March 2011
Junior Member
Thank you very much~
Re: Unique file extension? [message #662049 is a reply to message #662042] Tue, 29 March 2011 05:50 Go to previous messageGo to next message
Lisa Zhou is currently offline Lisa ZhouFriend
Messages: 5
Registered: March 2011
Junior Member
According to the project requirements, the clients highly recommend to launch these two different metamodels with the same extension file at the same time.
It there any alternative?
Thank you~
Re: Unique file extension? [message #662055 is a reply to message #662049] Tue, 29 March 2011 06:46 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
You could try messing around with ContentTypes, but that makes the
builder super slow (it has to look into *every* file) (and I'm actually
not sure if it works at all :-)).

So really the best thing you can do is to convince your client that it
is not a good idea to do so.

Sven

Am 3/29/11 7:50 AM, schrieb Lisa Zhou:
> According to the project requirements, the clients highly recommend to
> launch these two different metamodels with the same extension file at
> the same time. It there any alternative?
> Thank you~


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Unique file extension? [message #662056 is a reply to message #662055] Tue, 29 March 2011 06:56 Go to previous messageGo to next message
Lisa Zhou is currently offline Lisa ZhouFriend
Messages: 5
Registered: March 2011
Junior Member
I see. I'll try. Thank you so much~
Re: Unique file extension? [message #662067 is a reply to message #662055] Tue, 29 March 2011 07:00 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Content types can be very inefficient because the platform makes one
decision then the tooling makes another processing files twice.

For XML files it can make sense, since the namespace rapidly identifies
the file type.

For text files you will have to parse sufficient of the file to decide
on the text dialect.

Regards

Ed Willink

On 29/03/2011 07:46, Sven Efftinge wrote:
> You could try messing around with ContentTypes, but that makes the
> builder super slow (it has to look into *every* file) (and I'm actually
> not sure if it works at all :-)).
>
> So really the best thing you can do is to convince your client that it
> is not a good idea to do so.
>
> Sven
>
> Am 3/29/11 7:50 AM, schrieb Lisa Zhou:
>> According to the project requirements, the clients highly recommend to
>> launch these two different metamodels with the same extension file at
>> the same time. It there any alternative?
>> Thank you~
>
Previous Topic:[solved] syntax for id/../../id2
Next Topic:Migration Xtext 1.0 -> 2.0
Goto Forum:
  


Current Time: Thu Mar 28 15:24:31 GMT 2024

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

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

Back to the top