Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Compare] How to compare ecore models, content types
[Compare] How to compare ecore models, content types [message #109254] Tue, 29 January 2008 18:42 Go to next message
Aleksander Bandelj is currently offline Aleksander BandeljFriend
Messages: 98
Registered: July 2009
Member
Compare uses diff and merge viewers for ModelContentType, which is bound
to ecore filename extension. But this filename extension seems to be
already taken by EMF for XML content type. So XML/text compare is being
used for ecore models.

I tried to change priority to high in org.eclipse.emf.compare.ui, but it
didn't help:

<extension
point="org.eclipse.core.runtime.contentTypes">
<content-type
file-extensions="emfdiff,uml,ecore"
id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
name="%modelContentTypeName"
priority="normal">
</content-type>
</extension>

This one from org.eclipse.emf.ecore.xmi always takes precendence

<extension
point="org.eclipse.core.runtime.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.xml"
file-extensions="ecore,xmi"
id="org.eclipse.emf.ecore"
name="%_UI_Ecore_content_type"
priority="normal">
<describer

class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
<parameter
name="namespace"
value="http://www.eclipse.org/emf/2002/Ecore">
</parameter>
<parameter
name="kind"
value="xmi">
</parameter>
</describer>
</content-type>
</extension>

This is with recent EMF download I200801152000
< http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>

-a
Re: [Compare] How to compare ecore models, content types [message #109281 is a reply to message #109254] Tue, 29 January 2008 18:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Aleksander,

You raise an important issue. It's a bit problematic for us in EMF
itself to define content types when others downstream might already have
done so. :-(


Aleksander Bandelj wrote:
> Compare uses diff and merge viewers for ModelContentType, which is
> bound to ecore filename extension. But this filename extension seems
> to be already taken by EMF for XML content type. So XML/text compare
> is being used for ecore models.
>
> I tried to change priority to high in org.eclipse.emf.compare.ui, but
> it didn't help:
>
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> file-extensions="emfdiff,uml,ecore"
> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
> name="%modelContentTypeName"
> priority="normal">
> </content-type>
> </extension>
>
> This one from org.eclipse.emf.ecore.xmi always takes precendence
>
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> base-type="org.eclipse.core.runtime.xml"
> file-extensions="ecore,xmi"
> id="org.eclipse.emf.ecore"
> name="%_UI_Ecore_content_type"
> priority="normal">
> <describer
>
> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>
> <parameter
> name="namespace"
> value="http://www.eclipse.org/emf/2002/Ecore">
> </parameter>
> <parameter
> name="kind"
> value="xmi">
> </parameter>
> </describer>
> </content-type>
> </extension>
>
> This is with recent EMF download I200801152000
> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>
>
> -a
Re: [Compare] How to compare ecore models, content types [message #109470 is a reply to message #109281] Wed, 30 January 2008 09:14 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030708090709060508090408
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Aleksander, Ed;

Important issue indeed, we were using this contenttype to define "model
files" which should be handled by EMF Compare when comparing. I already
tried to raise a content types issue (though my problem was slighlty
different that the priority) on the platform newsgroup ... with
absolutely no answers apart from Ed's.

Ed, I just downloaded the latest eclipse 3.4 M4 and EMF 2.4 to try and
find a workaround ... and there is one. Would it be possible for you to
modify your content type "Ecore File" in a content type "EMF files"
(this would be the only change on your side). Afterwards it is easy for
downstream plug-ins to alter their own content-type to use yours as
"base-type" and inherit its properties.

I could define this way my content-type
<extension
point="org.eclipse.core.runtime.contentTypes">
<content-type
base-type="org.eclipse.emf.ecore"
file-extensions="emfdiff,uml"
id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
name="%modelContentTypeName"
priority="normal">
</content-type>
</extension>
and use it successfully with ecore but also uml and emfdiff which you
obviously didn't describe in your content-type.

Ed : I'm looking forward to your input on such redefinitions, mainly :
"is there a possibility that redefining a content-type with yours as
base-type will break an existing content-type binding?". This should
probably be moved to the EMF newsgroup.

Aleksander : for the time being, I have commited this modification to
EMF Compare's content-type and we are building ATM to allow the use of
EMF Compare with the latest EMF builds. This is subject to later change
according to Ed's input.

Laurent Goubet
Obeo

Ed Merks a écrit :
> Aleksander,
>
> You raise an important issue. It's a bit problematic for us in EMF
> itself to define content types when others downstream might already have
> done so. :-(
>
>
> Aleksander Bandelj wrote:
>> Compare uses diff and merge viewers for ModelContentType, which is
>> bound to ecore filename extension. But this filename extension seems
>> to be already taken by EMF for XML content type. So XML/text compare
>> is being used for ecore models.
>>
>> I tried to change priority to high in org.eclipse.emf.compare.ui, but
>> it didn't help:
>>
>> <extension
>> point="org.eclipse.core.runtime.contentTypes">
>> <content-type
>> file-extensions="emfdiff,uml,ecore"
>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>> name="%modelContentTypeName"
>> priority="normal">
>> </content-type>
>> </extension>
>>
>> This one from org.eclipse.emf.ecore.xmi always takes precendence
>>
>> <extension
>> point="org.eclipse.core.runtime.contentTypes">
>> <content-type
>> base-type="org.eclipse.core.runtime.xml"
>> file-extensions="ecore,xmi"
>> id="org.eclipse.emf.ecore"
>> name="%_UI_Ecore_content_type"
>> priority="normal">
>> <describer
>>
>> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>>
>> <parameter
>> name="namespace"
>> value="http://www.eclipse.org/emf/2002/Ecore">
>> </parameter>
>> <parameter
>> name="kind"
>> value="xmi">
>> </parameter>
>> </describer>
>> </content-type>
>> </extension>
>>
>> This is with recent EMF download I200801152000
>> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>>
>>
>> -a


--------------030708090709060508090408
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------030708090709060508090408--
Re: [Compare] How to compare ecore models, content types [message #109516 is a reply to message #109470] Wed, 30 January 2008 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Laurent,

I think you are suggesting that I define a base content type from which
Ecore File is derived or that Ecore File itself is that base type, but
I'm not entirely clear on the suggestion. The Ecore content type isn't
a general thing meant to be a base for other models; it's really meant
to cover only serializations of Ecore itself, not to be a base type for
UML or any other model's content type. It seems likely that each model
should define its own content type and that downstream clients could
simply reuse those existing definitions. The intent, for example, is
that I'll also define a content type for EMOF serializations of Ecore
and that this would apply for .emof and .xmi; similarly I imagine UML
ought to define content types for .uml and for .xmi. And that you'd
only define a content type for emfdiff.

I'm not sure how to handle the fact that WTP likely defines a content
type for "xsd" when the XSD model itself ought to do that; I think they
might also have a content type for xmi. Same kinds of issues are likely
to come up with xml. (I found the content type support to be
disappointingly confusing and inflexible; lack of reusable base classes
for example, seemed exceedingly less than helpful.) That's why
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104005 is still open; I
was hoping Marcelo and Dave would get done the book soon to help with
cross team issues like this.

I've only got a few more days before I'm going for two weeks (and M5,
the version that will be used during EclipseCon is in the meantime), so
best we try to get this cleared up as soon as possible. Note that I
hang out on IRC's #eclipse-modeling (as does Cedric) and if you (or
other committers) want to hook up via skype or MSN, send me a note for
details.


laurent Goubet wrote:
> Aleksander, Ed;
>
> Important issue indeed, we were using this contenttype to define
> "model files" which should be handled by EMF Compare when comparing. I
> already tried to raise a content types issue (though my problem was
> slighlty different that the priority) on the platform newsgroup ...
> with absolutely no answers apart from Ed's.
>
> Ed, I just downloaded the latest eclipse 3.4 M4 and EMF 2.4 to try and
> find a workaround ... and there is one. Would it be possible for you
> to modify your content type "Ecore File" in a content type "EMF files"
> (this would be the only change on your side). Afterwards it is easy
> for downstream plug-ins to alter their own content-type to use yours
> as "base-type" and inherit its properties.
>
> I could define this way my content-type
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> base-type="org.eclipse.emf.ecore"
> file-extensions="emfdiff,uml"
> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
> name="%modelContentTypeName"
> priority="normal">
> </content-type>
> </extension>
> and use it successfully with ecore but also uml and emfdiff which you
> obviously didn't describe in your content-type.
>
> Ed : I'm looking forward to your input on such redefinitions, mainly :
> "is there a possibility that redefining a content-type with yours as
> base-type will break an existing content-type binding?". This should
> probably be moved to the EMF newsgroup.
>
> Aleksander : for the time being, I have commited this modification to
> EMF Compare's content-type and we are building ATM to allow the use of
> EMF Compare with the latest EMF builds. This is subject to later
> change according to Ed's input.
>
> Laurent Goubet
> Obeo
>
> Ed Merks a écrit :
>> Aleksander,
>>
>> You raise an important issue. It's a bit problematic for us in EMF
>> itself to define content types when others downstream might already
>> have done so. :-(
>>
>>
>> Aleksander Bandelj wrote:
>>> Compare uses diff and merge viewers for ModelContentType, which is
>>> bound to ecore filename extension. But this filename extension seems
>>> to be already taken by EMF for XML content type. So XML/text compare
>>> is being used for ecore models.
>>>
>>> I tried to change priority to high in org.eclipse.emf.compare.ui,
>>> but it didn't help:
>>>
>>> <extension
>>> point="org.eclipse.core.runtime.contentTypes">
>>> <content-type
>>> file-extensions="emfdiff,uml,ecore"
>>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>>> name="%modelContentTypeName"
>>> priority="normal">
>>> </content-type>
>>> </extension>
>>>
>>> This one from org.eclipse.emf.ecore.xmi always takes precendence
>>>
>>> <extension
>>> point="org.eclipse.core.runtime.contentTypes">
>>> <content-type
>>> base-type="org.eclipse.core.runtime.xml"
>>> file-extensions="ecore,xmi"
>>> id="org.eclipse.emf.ecore"
>>> name="%_UI_Ecore_content_type"
>>> priority="normal">
>>> <describer
>>>
>>> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>>>
>>> <parameter
>>> name="namespace"
>>> value="http://www.eclipse.org/emf/2002/Ecore">
>>> </parameter>
>>> <parameter
>>> name="kind"
>>> value="xmi">
>>> </parameter>
>>> </describer>
>>> </content-type>
>>> </extension>
>>>
>>> This is with recent EMF download I200801152000
>>> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>>>
>>>
>>> -a
>
Re: [Compare] How to compare ecore models, content types [message #111548 is a reply to message #109516] Fri, 01 February 2008 12:18 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000800070509070902090401
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Ok, after our discussion on IRC I used the bug you mentionned
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=104005) to put my
thoughts about this issue.

Until we can think of a better way, we'll leave our "model" content-type
under the ecore one.

Laurent Goubet
Obeo

Ed Merks a écrit :
> Laurent,
>
> I think you are suggesting that I define a base content type from which
> Ecore File is derived or that Ecore File itself is that base type, but
> I'm not entirely clear on the suggestion. The Ecore content type isn't
> a general thing meant to be a base for other models; it's really meant
> to cover only serializations of Ecore itself, not to be a base type for
> UML or any other model's content type. It seems likely that each model
> should define its own content type and that downstream clients could
> simply reuse those existing definitions. The intent, for example, is
> that I'll also define a content type for EMOF serializations of Ecore
> and that this would apply for .emof and .xmi; similarly I imagine UML
> ought to define content types for .uml and for .xmi. And that you'd
> only define a content type for emfdiff.
>
> I'm not sure how to handle the fact that WTP likely defines a content
> type for "xsd" when the XSD model itself ought to do that; I think they
> might also have a content type for xmi. Same kinds of issues are likely
> to come up with xml. (I found the content type support to be
> disappointingly confusing and inflexible; lack of reusable base classes
> for example, seemed exceedingly less than helpful.) That's why
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=104005 is still open; I
> was hoping Marcelo and Dave would get done the book soon to help with
> cross team issues like this.
>
> I've only got a few more days before I'm going for two weeks (and M5,
> the version that will be used during EclipseCon is in the meantime), so
> best we try to get this cleared up as soon as possible. Note that I
> hang out on IRC's #eclipse-modeling (as does Cedric) and if you (or
> other committers) want to hook up via skype or MSN, send me a note for
> details.
>
>
> laurent Goubet wrote:
>> Aleksander, Ed;
>>
>> Important issue indeed, we were using this contenttype to define
>> "model files" which should be handled by EMF Compare when comparing. I
>> already tried to raise a content types issue (though my problem was
>> slighlty different that the priority) on the platform newsgroup ...
>> with absolutely no answers apart from Ed's.
>>
>> Ed, I just downloaded the latest eclipse 3.4 M4 and EMF 2.4 to try and
>> find a workaround ... and there is one. Would it be possible for you
>> to modify your content type "Ecore File" in a content type "EMF files"
>> (this would be the only change on your side). Afterwards it is easy
>> for downstream plug-ins to alter their own content-type to use yours
>> as "base-type" and inherit its properties.
>>
>> I could define this way my content-type
>> <extension
>> point="org.eclipse.core.runtime.contentTypes">
>> <content-type
>> base-type="org.eclipse.emf.ecore"
>> file-extensions="emfdiff,uml"
>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>> name="%modelContentTypeName"
>> priority="normal">
>> </content-type>
>> </extension>
>> and use it successfully with ecore but also uml and emfdiff which you
>> obviously didn't describe in your content-type.
>>
>> Ed : I'm looking forward to your input on such redefinitions, mainly :
>> "is there a possibility that redefining a content-type with yours as
>> base-type will break an existing content-type binding?". This should
>> probably be moved to the EMF newsgroup.
>>
>> Aleksander : for the time being, I have commited this modification to
>> EMF Compare's content-type and we are building ATM to allow the use of
>> EMF Compare with the latest EMF builds. This is subject to later
>> change according to Ed's input.
>>
>> Laurent Goubet
>> Obeo
>>
>> Ed Merks a écrit :
>>> Aleksander,
>>>
>>> You raise an important issue. It's a bit problematic for us in EMF
>>> itself to define content types when others downstream might already
>>> have done so. :-(
>>>
>>>
>>> Aleksander Bandelj wrote:
>>>> Compare uses diff and merge viewers for ModelContentType, which is
>>>> bound to ecore filename extension. But this filename extension seems
>>>> to be already taken by EMF for XML content type. So XML/text compare
>>>> is being used for ecore models.
>>>>
>>>> I tried to change priority to high in org.eclipse.emf.compare.ui,
>>>> but it didn't help:
>>>>
>>>> <extension
>>>> point="org.eclipse.core.runtime.contentTypes">
>>>> <content-type
>>>> file-extensions="emfdiff,uml,ecore"
>>>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>>>> name="%modelContentTypeName"
>>>> priority="normal">
>>>> </content-type>
>>>> </extension>
>>>>
>>>> This one from org.eclipse.emf.ecore.xmi always takes precendence
>>>>
>>>> <extension
>>>> point="org.eclipse.core.runtime.contentTypes">
>>>> <content-type
>>>> base-type="org.eclipse.core.runtime.xml"
>>>> file-extensions="ecore,xmi"
>>>> id="org.eclipse.emf.ecore"
>>>> name="%_UI_Ecore_content_type"
>>>> priority="normal">
>>>> <describer
>>>>
>>>> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>>>>
>>>> <parameter
>>>> name="namespace"
>>>> value="http://www.eclipse.org/emf/2002/Ecore">
>>>> </parameter>
>>>> <parameter
>>>> name="kind"
>>>> value="xmi">
>>>> </parameter>
>>>> </describer>
>>>> </content-type>
>>>> </extension>
>>>>
>>>> This is with recent EMF download I200801152000
>>>> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>>>>
>>>>
>>>> -a
>>


--------------000800070509070902090401
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------000800070509070902090401--
Re: [Compare] How to compare ecore models, content types [message #614163 is a reply to message #109254] Tue, 29 January 2008 18:50 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31478
Registered: July 2009
Senior Member
Aleksander,

You raise an important issue. It's a bit problematic for us in EMF
itself to define content types when others downstream might already have
done so. :-(


Aleksander Bandelj wrote:
> Compare uses diff and merge viewers for ModelContentType, which is
> bound to ecore filename extension. But this filename extension seems
> to be already taken by EMF for XML content type. So XML/text compare
> is being used for ecore models.
>
> I tried to change priority to high in org.eclipse.emf.compare.ui, but
> it didn't help:
>
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> file-extensions="emfdiff,uml,ecore"
> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
> name="%modelContentTypeName"
> priority="normal">
> </content-type>
> </extension>
>
> This one from org.eclipse.emf.ecore.xmi always takes precendence
>
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> base-type="org.eclipse.core.runtime.xml"
> file-extensions="ecore,xmi"
> id="org.eclipse.emf.ecore"
> name="%_UI_Ecore_content_type"
> priority="normal">
> <describer
>
> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>
> <parameter
> name="namespace"
> value="http://www.eclipse.org/emf/2002/Ecore">
> </parameter>
> <parameter
> name="kind"
> value="xmi">
> </parameter>
> </describer>
> </content-type>
> </extension>
>
> This is with recent EMF download I200801152000
> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>
>
> -a


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Compare] How to compare ecore models, content types [message #614205 is a reply to message #109281] Wed, 30 January 2008 09:14 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030708090709060508090408
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Aleksander, Ed;

Important issue indeed, we were using this contenttype to define "model
files" which should be handled by EMF Compare when comparing. I already
tried to raise a content types issue (though my problem was slighlty
different that the priority) on the platform newsgroup ... with
absolutely no answers apart from Ed's.

Ed, I just downloaded the latest eclipse 3.4 M4 and EMF 2.4 to try and
find a workaround ... and there is one. Would it be possible for you to
modify your content type "Ecore File" in a content type "EMF files"
(this would be the only change on your side). Afterwards it is easy for
downstream plug-ins to alter their own content-type to use yours as
"base-type" and inherit its properties.

I could define this way my content-type
<extension
point="org.eclipse.core.runtime.contentTypes">
<content-type
base-type="org.eclipse.emf.ecore"
file-extensions="emfdiff,uml"
id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
name="%modelContentTypeName"
priority="normal">
</content-type>
</extension>
and use it successfully with ecore but also uml and emfdiff which you
obviously didn't describe in your content-type.

Ed : I'm looking forward to your input on such redefinitions, mainly :
"is there a possibility that redefining a content-type with yours as
base-type will break an existing content-type binding?". This should
probably be moved to the EMF newsgroup.

Aleksander : for the time being, I have commited this modification to
EMF Compare's content-type and we are building ATM to allow the use of
EMF Compare with the latest EMF builds. This is subject to later change
according to Ed's input.

Laurent Goubet
Obeo

Ed Merks a écrit :
> Aleksander,
>
> You raise an important issue. It's a bit problematic for us in EMF
> itself to define content types when others downstream might already have
> done so. :-(
>
>
> Aleksander Bandelj wrote:
>> Compare uses diff and merge viewers for ModelContentType, which is
>> bound to ecore filename extension. But this filename extension seems
>> to be already taken by EMF for XML content type. So XML/text compare
>> is being used for ecore models.
>>
>> I tried to change priority to high in org.eclipse.emf.compare.ui, but
>> it didn't help:
>>
>> <extension
>> point="org.eclipse.core.runtime.contentTypes">
>> <content-type
>> file-extensions="emfdiff,uml,ecore"
>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>> name="%modelContentTypeName"
>> priority="normal">
>> </content-type>
>> </extension>
>>
>> This one from org.eclipse.emf.ecore.xmi always takes precendence
>>
>> <extension
>> point="org.eclipse.core.runtime.contentTypes">
>> <content-type
>> base-type="org.eclipse.core.runtime.xml"
>> file-extensions="ecore,xmi"
>> id="org.eclipse.emf.ecore"
>> name="%_UI_Ecore_content_type"
>> priority="normal">
>> <describer
>>
>> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>>
>> <parameter
>> name="namespace"
>> value="http://www.eclipse.org/emf/2002/Ecore">
>> </parameter>
>> <parameter
>> name="kind"
>> value="xmi">
>> </parameter>
>> </describer>
>> </content-type>
>> </extension>
>>
>> This is with recent EMF download I200801152000
>> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>>
>>
>> -a


--------------030708090709060508090408
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------030708090709060508090408--
Re: [Compare] How to compare ecore models, content types [message #614221 is a reply to message #109470] Wed, 30 January 2008 10:18 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 31478
Registered: July 2009
Senior Member
Laurent,

I think you are suggesting that I define a base content type from which
Ecore File is derived or that Ecore File itself is that base type, but
I'm not entirely clear on the suggestion. The Ecore content type isn't
a general thing meant to be a base for other models; it's really meant
to cover only serializations of Ecore itself, not to be a base type for
UML or any other model's content type. It seems likely that each model
should define its own content type and that downstream clients could
simply reuse those existing definitions. The intent, for example, is
that I'll also define a content type for EMOF serializations of Ecore
and that this would apply for .emof and .xmi; similarly I imagine UML
ought to define content types for .uml and for .xmi. And that you'd
only define a content type for emfdiff.

I'm not sure how to handle the fact that WTP likely defines a content
type for "xsd" when the XSD model itself ought to do that; I think they
might also have a content type for xmi. Same kinds of issues are likely
to come up with xml. (I found the content type support to be
disappointingly confusing and inflexible; lack of reusable base classes
for example, seemed exceedingly less than helpful.) That's why
https://bugs.eclipse.org/bugs/show_bug.cgi?id=104005 is still open; I
was hoping Marcelo and Dave would get done the book soon to help with
cross team issues like this.

I've only got a few more days before I'm going for two weeks (and M5,
the version that will be used during EclipseCon is in the meantime), so
best we try to get this cleared up as soon as possible. Note that I
hang out on IRC's #eclipse-modeling (as does Cedric) and if you (or
other committers) want to hook up via skype or MSN, send me a note for
details.


laurent Goubet wrote:
> Aleksander, Ed;
>
> Important issue indeed, we were using this contenttype to define
> "model files" which should be handled by EMF Compare when comparing. I
> already tried to raise a content types issue (though my problem was
> slighlty different that the priority) on the platform newsgroup ...
> with absolutely no answers apart from Ed's.
>
> Ed, I just downloaded the latest eclipse 3.4 M4 and EMF 2.4 to try and
> find a workaround ... and there is one. Would it be possible for you
> to modify your content type "Ecore File" in a content type "EMF files"
> (this would be the only change on your side). Afterwards it is easy
> for downstream plug-ins to alter their own content-type to use yours
> as "base-type" and inherit its properties.
>
> I could define this way my content-type
> <extension
> point="org.eclipse.core.runtime.contentTypes">
> <content-type
> base-type="org.eclipse.emf.ecore"
> file-extensions="emfdiff,uml"
> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
> name="%modelContentTypeName"
> priority="normal">
> </content-type>
> </extension>
> and use it successfully with ecore but also uml and emfdiff which you
> obviously didn't describe in your content-type.
>
> Ed : I'm looking forward to your input on such redefinitions, mainly :
> "is there a possibility that redefining a content-type with yours as
> base-type will break an existing content-type binding?". This should
> probably be moved to the EMF newsgroup.
>
> Aleksander : for the time being, I have commited this modification to
> EMF Compare's content-type and we are building ATM to allow the use of
> EMF Compare with the latest EMF builds. This is subject to later
> change according to Ed's input.
>
> Laurent Goubet
> Obeo
>
> Ed Merks a écrit :
>> Aleksander,
>>
>> You raise an important issue. It's a bit problematic for us in EMF
>> itself to define content types when others downstream might already
>> have done so. :-(
>>
>>
>> Aleksander Bandelj wrote:
>>> Compare uses diff and merge viewers for ModelContentType, which is
>>> bound to ecore filename extension. But this filename extension seems
>>> to be already taken by EMF for XML content type. So XML/text compare
>>> is being used for ecore models.
>>>
>>> I tried to change priority to high in org.eclipse.emf.compare.ui,
>>> but it didn't help:
>>>
>>> <extension
>>> point="org.eclipse.core.runtime.contentTypes">
>>> <content-type
>>> file-extensions="emfdiff,uml,ecore"
>>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>>> name="%modelContentTypeName"
>>> priority="normal">
>>> </content-type>
>>> </extension>
>>>
>>> This one from org.eclipse.emf.ecore.xmi always takes precendence
>>>
>>> <extension
>>> point="org.eclipse.core.runtime.contentTypes">
>>> <content-type
>>> base-type="org.eclipse.core.runtime.xml"
>>> file-extensions="ecore,xmi"
>>> id="org.eclipse.emf.ecore"
>>> name="%_UI_Ecore_content_type"
>>> priority="normal">
>>> <describer
>>>
>>> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>>>
>>> <parameter
>>> name="namespace"
>>> value="http://www.eclipse.org/emf/2002/Ecore">
>>> </parameter>
>>> <parameter
>>> name="kind"
>>> value="xmi">
>>> </parameter>
>>> </describer>
>>> </content-type>
>>> </extension>
>>>
>>> This is with recent EMF download I200801152000
>>> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>>>
>>>
>>> -a
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: [Compare] How to compare ecore models, content types [message #615363 is a reply to message #109516] Fri, 01 February 2008 12:18 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1886
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------000800070509070902090401
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Ok, after our discussion on IRC I used the bug you mentionned
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=104005) to put my
thoughts about this issue.

Until we can think of a better way, we'll leave our "model" content-type
under the ecore one.

Laurent Goubet
Obeo

Ed Merks a écrit :
> Laurent,
>
> I think you are suggesting that I define a base content type from which
> Ecore File is derived or that Ecore File itself is that base type, but
> I'm not entirely clear on the suggestion. The Ecore content type isn't
> a general thing meant to be a base for other models; it's really meant
> to cover only serializations of Ecore itself, not to be a base type for
> UML or any other model's content type. It seems likely that each model
> should define its own content type and that downstream clients could
> simply reuse those existing definitions. The intent, for example, is
> that I'll also define a content type for EMOF serializations of Ecore
> and that this would apply for .emof and .xmi; similarly I imagine UML
> ought to define content types for .uml and for .xmi. And that you'd
> only define a content type for emfdiff.
>
> I'm not sure how to handle the fact that WTP likely defines a content
> type for "xsd" when the XSD model itself ought to do that; I think they
> might also have a content type for xmi. Same kinds of issues are likely
> to come up with xml. (I found the content type support to be
> disappointingly confusing and inflexible; lack of reusable base classes
> for example, seemed exceedingly less than helpful.) That's why
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=104005 is still open; I
> was hoping Marcelo and Dave would get done the book soon to help with
> cross team issues like this.
>
> I've only got a few more days before I'm going for two weeks (and M5,
> the version that will be used during EclipseCon is in the meantime), so
> best we try to get this cleared up as soon as possible. Note that I
> hang out on IRC's #eclipse-modeling (as does Cedric) and if you (or
> other committers) want to hook up via skype or MSN, send me a note for
> details.
>
>
> laurent Goubet wrote:
>> Aleksander, Ed;
>>
>> Important issue indeed, we were using this contenttype to define
>> "model files" which should be handled by EMF Compare when comparing. I
>> already tried to raise a content types issue (though my problem was
>> slighlty different that the priority) on the platform newsgroup ...
>> with absolutely no answers apart from Ed's.
>>
>> Ed, I just downloaded the latest eclipse 3.4 M4 and EMF 2.4 to try and
>> find a workaround ... and there is one. Would it be possible for you
>> to modify your content type "Ecore File" in a content type "EMF files"
>> (this would be the only change on your side). Afterwards it is easy
>> for downstream plug-ins to alter their own content-type to use yours
>> as "base-type" and inherit its properties.
>>
>> I could define this way my content-type
>> <extension
>> point="org.eclipse.core.runtime.contentTypes">
>> <content-type
>> base-type="org.eclipse.emf.ecore"
>> file-extensions="emfdiff,uml"
>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>> name="%modelContentTypeName"
>> priority="normal">
>> </content-type>
>> </extension>
>> and use it successfully with ecore but also uml and emfdiff which you
>> obviously didn't describe in your content-type.
>>
>> Ed : I'm looking forward to your input on such redefinitions, mainly :
>> "is there a possibility that redefining a content-type with yours as
>> base-type will break an existing content-type binding?". This should
>> probably be moved to the EMF newsgroup.
>>
>> Aleksander : for the time being, I have commited this modification to
>> EMF Compare's content-type and we are building ATM to allow the use of
>> EMF Compare with the latest EMF builds. This is subject to later
>> change according to Ed's input.
>>
>> Laurent Goubet
>> Obeo
>>
>> Ed Merks a écrit :
>>> Aleksander,
>>>
>>> You raise an important issue. It's a bit problematic for us in EMF
>>> itself to define content types when others downstream might already
>>> have done so. :-(
>>>
>>>
>>> Aleksander Bandelj wrote:
>>>> Compare uses diff and merge viewers for ModelContentType, which is
>>>> bound to ecore filename extension. But this filename extension seems
>>>> to be already taken by EMF for XML content type. So XML/text compare
>>>> is being used for ecore models.
>>>>
>>>> I tried to change priority to high in org.eclipse.emf.compare.ui,
>>>> but it didn't help:
>>>>
>>>> <extension
>>>> point="org.eclipse.core.runtime.contentTypes">
>>>> <content-type
>>>> file-extensions="emfdiff,uml,ecore"
>>>> id="org.eclipse.emf.compare.ui.contenttype.ModelContentType "
>>>> name="%modelContentTypeName"
>>>> priority="normal">
>>>> </content-type>
>>>> </extension>
>>>>
>>>> This one from org.eclipse.emf.ecore.xmi always takes precendence
>>>>
>>>> <extension
>>>> point="org.eclipse.core.runtime.contentTypes">
>>>> <content-type
>>>> base-type="org.eclipse.core.runtime.xml"
>>>> file-extensions="ecore,xmi"
>>>> id="org.eclipse.emf.ecore"
>>>> name="%_UI_Ecore_content_type"
>>>> priority="normal">
>>>> <describer
>>>>
>>>> class=" org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl$Des criber ">
>>>>
>>>> <parameter
>>>> name="namespace"
>>>> value="http://www.eclipse.org/emf/2002/Ecore">
>>>> </parameter>
>>>> <parameter
>>>> name="kind"
>>>> value="xmi">
>>>> </parameter>
>>>> </describer>
>>>> </content-type>
>>>> </extension>
>>>>
>>>> This is with recent EMF download I200801152000
>>>> < http://www.eclipse.org/modeling/emf/news/relnotes.php?projec t=emf&version=HEAD#I200801152000>
>>>>
>>>>
>>>> -a
>>


--------------000800070509070902090401
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"

YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyLyI+T2JlbzwvYT4NCmVtYWls O2ludGVybmV0
OmxhdXJlbnQuZ291YmV0QG9iZW8uZnINCnVybDpodHRwOi8vd3d3Lm9iZW8u ZnINCnZlcnNp
b246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------000800070509070902090401--
Previous Topic:Meaning of AddReferenceValue in EMF Compare
Next Topic:Re: TENEO JPA Annotation - create a view
Goto Forum:
  


Current Time: Thu Sep 24 06:19:17 GMT 2020

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

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

Back to the top