Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext/EMF resource file handlers
Xtext/EMF resource file handlers [message #1194713] Mon, 18 November 2013 17:00 Go to next message
Tom Mealey is currently offline Tom MealeyFriend
Messages: 7
Registered: October 2013
Junior Member
Hi all,

I have an Xtext project in which I am trying to add a "#include" mechanism that allows the user to include a file (with any file extension) to be parsed for instances of my own Ecore object. The approach I took is similar to the one I found in this post: http://www.eclipse.org/forums/index.php/t/526180/

However, since I would like to be able to handle any type of file without concern for the file extension, I added an extension points to org.eclipse.emf.ecore.protocol_parser and org.eclipse.xtext.protocol_resourceServiceProvider with protocolName="file", rather than the extension version of those two as in the above post.

My question is can I safely make these extensions to the file protocol, or in doing so am I overriding other important EMF/Xtext resource handlers?

Cheers,
Tom
Re: Xtext/EMF resource file handlers [message #1213373 is a reply to message #1194713] Wed, 27 November 2013 07:59 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
If you have a reference to these arbitrary files, how do you know how to parse them and turn them into an EMF model?
The much cleaner way would be to register every single file type you want to support similar to the description in that other thread.
Previous Topic:delete generated files/directories
Next Topic:How to synchronize the EObject underneath the Xtext editor with another editor?
Goto Forum:
  


Current Time: Thu Apr 25 10:12:23 GMT 2024

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

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

Back to the top