Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF/Xtext resource handling
EMF/Xtext resource handling [message #1199302] Wed, 20 November 2013 19:48 Go to next message
Tom Mealey is currently offline Tom MealeyFriend
Messages: 7
Registered: October 2013
Junior Member
Hi all,

I posed this already in the Xtext forum but did not get any responses, so I figured I would try here. I apologize if this is outside of the realm of this forum!

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: EMF/Xtext resource handling [message #1200551 is a reply to message #1199302] Thu, 21 November 2013 09:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30351
Registered: July 2009
Senior Member
Tom,

Comments below.

On 20/11/2013 8:48 PM, Tom Mealey wrote:
> Hi all,
>
> I posed this already in the Xtext forum but did not get any responses,
> so I figured I would try here. I apologize if this is outside of the
> realm of this forum!
>
> 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,
Handle how? It's often important that you use a model's registered
resource factory in order to read the model's instances...
> 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.
Hmmm.
>
> 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?
That's really an Xtext question, but it sound suspicious to me. Perhaps
you should be specializing the resource set create and special the
resource sets local resource factory registry.
>
> Cheers,
> Tom
Previous Topic:Best Practices - associate UI to EObject creation
Next Topic:Compare two arraylist of EMF objects
Goto Forum:
  


Current Time: Sun Aug 18 21:19:59 GMT 2019

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

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

Back to the top