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


> As I wrote before three stages are needed
> a) identify the most restrictive output meta-model EPackage
> b) convert the EPackage to its content-type
> c) create the resource by content type
Why? Repetition is no argument.

> Calling c) by itself with null or unspecifoed content type is useless 
> since it requires telepathy to know the required content-type.
This is not correct. The user will happily provide the desired content-type as much as he gives the desired filename and foldername.
Furthermore the docs clearly state on UNSPECIFIED_CONTENT_TYPE
"A constant used to indicate that a content type needs to be computed."

> A transformation tool such as QVTo knows the output meta-model type, so 
> it knows the EPackage so it can know the content-type.
Do you understand the point that a meta-model can be happily connected to many Eclipse content-types? I even gave examples to make that point crystal clear.

As I already line out in the forum discussion, probably other solutions for content-type computation on resource creation would have been thinkable, e.g. allowing a query segment in the URI, but as it stands the current platform has an existing computation algorithm which uses ContentDescribers at first and when this fails resorts to filename and extension associations as the user himself might have maintained under Preferences > General > Content Types.

As a good citizen in the Eclipse-vers QVTo should respect and enable the existing computations of the platform and not make it dysfunctional, IMHO.
Actually they are not that difficult.

I'll file a bug now hoping that other commiters get the point.



Uwe Ritzmann              Uwe.Ritzmann@xxxxxx

NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren:

Back to the top