Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mmt-dev] EmfUtil: content-type computation

Hi Ed,

-------- Original-Nachricht --------
> Datum: Mon, 18 Jun 2012 11:21:35 +0100
> Von: Ed Willink <ed@xxxxxxxxxxxxx>
> An: MMT project developer discussions <mmt-dev@xxxxxxxxxxx>
> Betreff: Re: [mmt-dev] EmfUtil: content-type computation

> Hi
> [...]
> EmfUtil.createResource(uri,outResourceSet) appears to try to be help by 
> providing some rescue heuristics in case resourceSet.createResource(URI) 
> returns null.
And I assume that these heuristics would be no longer necessary if ResourceSetImpl.createResource(uri,contentType) would be used.

> Rather than rescue heuristics it is better to tackle the original 
> problem, which as discussed on the EMF thread is to use an EPackage to 
> content-type mapping to enable createResource(URI, content-type) to 
> create an EPackage-relevant resource.

What would this mapping offer as advantage over the existing three mappings: platformToFactory, contentTypeToFactory and extensionToFactory.

An EPackage can be mapped to extensions or content-types by anyone who feels like implementing a content_parser or extension_parser producing your metamodel and registering it.
EPackage to Eclipse content-type is generally 1:n.

What would be the added value of an eContentTypeToFactoryMap?

> The deduction of an EPackage from an outResourceSet is not necessarily 
> trivial so the lack of content-type support is probably earlier where 
> the meta-model EPackage is known.

My apologies, but I am not getting the point of your proposal.


Uwe Ritzmann              Uwe.Ritzmann@xxxxxx

Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro!

Back to the top