Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370528 - XtextResourceSet dependency
Summary: XtextResourceSet dependency
Status: RESOLVED WORKSFORME
Alias: None
Product: EMF
Classification: Modeling
Component: Core (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-03 03:11 EST by Ed Willink CLA
Modified: 2012-02-07 04:11 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2012-02-03 03:11:36 EST
While investigating a Sample Ecore issue I found I was using an XtextResourceSet and so tried to see how I had corrupted the Sample Ecore Editor.

I hadn't. There is now a dynamic test to use EcoreEditor

Class<?> xtextResourceSetClass = CommonPlugin.loadClass("org.eclipse.xtext", "org.eclipse.xtext.resource.XtextResourceSet");

This seems wrong to me. It gives the impression that EMF is favouring Xtext. I thought the Eclipse philosophy was to be extensible with neutral extension points.

XtextResourceSet represents a clear improvement when dealing with many resources. Perhaps it should be promoted to EMF as BigResourceSetImpl.

classpath: URIs are really useful, but inconvenient because they only work sometimes. It would be good to promote this functionality to EMF too and ensure that next time an additional scheme can be added via an extension point.
Comment 1 Ed Merks CLA 2012-02-03 04:30:45 EST
Is something actually broken or you just don't like the design and would like it to conform to your expectations?

These changes have to do with supporting Xcore models dynamically, i.e, we can have dynamic instances that refer to an Xcore-derived Ecore model.  The editor must be able to load such resources but that's not possible without an Xtext resource set.  Definitely EMF is "favoring" Xcore and whatever is needed to make it work. It's unfortunate that Xtext resources can't load in a normal resource set; one might complain about that design choice as well, especially given that much can be accomplished with adapters.  I'm not sure how XtextResourceSet is a big improvement. Only the specialized resolver/normalizer (for classpath URIs) is fundamental; the rest could have been done with an adapter.  And even the specialized URI converter could have bee added with a setURIConverter call.
Comment 2 Ed Merks CLA 2012-02-07 04:11:54 EST
I assume this isn't causing a problem that needs fixing but rather it's an observation about a design you consider less than ideal.