Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Compare] New metamodel API & Detecting changes to specific model elements
[EMF Compare] New metamodel API & Detecting changes to specific model elements [message #136859] Fri, 29 May 2009 19:11 Go to next message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
Hello,

I would like to upgrade some code from the Metamodel API used in 0.8.0
to the new one used in 0.9.0 (being new to EMF Compare).

The goal of the code is to detect if specific model (xml-schema)
elements have changed, so the current logic is to search for a path to
the relevant elements in the DiffModel.

I'm wondering if this is the recommended way and how does the API change
affect the algorithm (we are only impacted by the -now gone-
AddModelElement and RemoveModelElement classes).

Thanks!
--
Abel Muiño
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #136980 is a reply to message #136859] Thu, 04 June 2009 15:18 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070109060703050104000607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Abel,

We broke a good part of the diffmodel between the 0.8 and 0.9, mostly to
try and make it a little less complex and convoluted than it was. The
most impacting changes are listed on bug 233451 :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451

Don't hesitate to let us know if this isn't enough information.

Laurent Goubet
Obeo

Abel Mui–o Vizcaino a écrit :
> Hello,
>
> I would like to upgrade some code from the Metamodel API used in 0.8.0
> to the new one used in 0.9.0 (being new to EMF Compare).
>
> The goal of the code is to detect if specific model (xml-schema)
> elements have changed, so the current logic is to search for a path to
> the relevant elements in the DiffModel.
>
> I'm wondering if this is the recommended way and how does the API change
> affect the algorithm (we are only impacted by the -now gone-
> AddModelElement and RemoveModelElement classes).
>
> Thanks!
> --
> Abel Muiño


--------------070109060703050104000607
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
--------------070109060703050104000607--
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #137576 is a reply to message #136980] Wed, 24 June 2009 20:47 Go to previous messageGo to next message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
Sorry to come back to this so late...

With the information on the bugzilla you have pointed me, I was able to
replace every check for AddModelElement to ModelElementChangeLeftTarget
and every check for RemoveModelElement to ModelElementChangeRightTarget.

Is this right?
Since before the API change, AddModelElement extended
ModelElementChange_Right_Target and now I must use _Left_, I find that
the code which was previously using AddModelElement#getRighElement()
does not build now.

Can you advice on what should I use instead? (getLeftElement()?
getRightParent?) Has this impact on the logic that was implemented in
our plugin before the change?

(Sorry for so many questions, but I am completly new to EMF compare and
I am trying to evolve an existing codebase)

Thanks!
--
Abel Muiño

laurent Goubet wrote:
> Hi Abel,
>
> We broke a good part of the diffmodel between the 0.8 and 0.9, mostly to
> try and make it a little less complex and convoluted than it was. The
> most impacting changes are listed on bug 233451 :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451
>
> Don't hesitate to let us know if this isn't enough information.
>
> Laurent Goubet
> Obeo
>
> Abel Mui–o Vizcaino a écrit :
>> Hello,
>>
>> I would like to upgrade some code from the Metamodel API used in 0.8.0
>> to the new one used in 0.9.0 (being new to EMF Compare).
>>
>> The goal of the code is to detect if specific model (xml-schema)
>> elements have changed, so the current logic is to search for a path to
>> the relevant elements in the DiffModel.
>>
>> I'm wondering if this is the recommended way and how does the API
>> change affect the algorithm (we are only impacted by the -now gone-
>> AddModelElement and RemoveModelElement classes).
>>
>> Thanks!
>> --
>> Abel Muiño
>
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #137665 is a reply to message #137576] Thu, 25 June 2009 09:10 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010705070302050607040807
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Abel,

I can't say for sure since I don't know how old your existing
application is. My best bet is that it's been written before we fixed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=232277 . We had inverted
the "left" and "right" models within EMF Compare (intentionally at first
.... before we found out that wasn't a good thing :p). As we've set back
both side to what they should be, most "left" references are now the
"right" and vice-versa.

Hope this helps.

Laurent Goubet
Obeo

Abel Mui–o Vizcaino a écrit :
> Sorry to come back to this so late...
>
> With the information on the bugzilla you have pointed me, I was able to
> replace every check for AddModelElement to ModelElementChangeLeftTarget
> and every check for RemoveModelElement to ModelElementChangeRightTarget.
>
> Is this right?
> Since before the API change, AddModelElement extended
> ModelElementChange_Right_Target and now I must use _Left_, I find that
> the code which was previously using AddModelElement#getRighElement()
> does not build now.
>
> Can you advice on what should I use instead? (getLeftElement()?
> getRightParent?) Has this impact on the logic that was implemented in
> our plugin before the change?
>
> (Sorry for so many questions, but I am completly new to EMF compare and
> I am trying to evolve an existing codebase)
>
> Thanks!
> --
> Abel Muiño
>
> laurent Goubet wrote:
>> Hi Abel,
>>
>> We broke a good part of the diffmodel between the 0.8 and 0.9, mostly
>> to try and make it a little less complex and convoluted than it was.
>> The most impacting changes are listed on bug 233451 :
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451
>>
>> Don't hesitate to let us know if this isn't enough information.
>>
>> Laurent Goubet
>> Obeo
>>
>> Abel Mui–o Vizcaino a écrit :
>>> Hello,
>>>
>>> I would like to upgrade some code from the Metamodel API used in
>>> 0.8.0 to the new one used in 0.9.0 (being new to EMF Compare).
>>>
>>> The goal of the code is to detect if specific model (xml-schema)
>>> elements have changed, so the current logic is to search for a path
>>> to the relevant elements in the DiffModel.
>>>
>>> I'm wondering if this is the recommended way and how does the API
>>> change affect the algorithm (we are only impacted by the -now gone-
>>> AddModelElement and RemoveModelElement classes).
>>>
>>> Thanks!
>>> --
>>> Abel Muiño
>>


--------------010705070302050607040807
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
--------------010705070302050607040807--
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #137677 is a reply to message #137665] Thu, 25 June 2009 16:05 Go to previous message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
That was it,
We were using 0.8.1, so I reversed the methods and our unit tests are
all green again.

Thanks a lot!

laurent Goubet wrote:
> Hi Abel,
>
> I can't say for sure since I don't know how old your existing
> application is. My best bet is that it's been written before we fixed
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=232277 . We had inverted
> the "left" and "right" models within EMF Compare (intentionally at first
> ... before we found out that wasn't a good thing :p). As we've set back
> both side to what they should be, most "left" references are now the
> "right" and vice-versa.
>
> Hope this helps.
>
> Laurent Goubet
> Obeo
>
> Abel Mui–o Vizcaino a écrit :
>> Sorry to come back to this so late...
>>
>> With the information on the bugzilla you have pointed me, I was able
>> to replace every check for AddModelElement to
>> ModelElementChangeLeftTarget and every check for RemoveModelElement to
>> ModelElementChangeRightTarget.
>>
>> Is this right?
>> Since before the API change, AddModelElement extended
>> ModelElementChange_Right_Target and now I must use _Left_, I find that
>> the code which was previously using AddModelElement#getRighElement()
>> does not build now.
>>
>> Can you advice on what should I use instead? (getLeftElement()?
>> getRightParent?) Has this impact on the logic that was implemented in
>> our plugin before the change?
>>
>> (Sorry for so many questions, but I am completly new to EMF compare
>> and I am trying to evolve an existing codebase)
>>
>> Thanks!
>> --
>> Abel Muiño
>>
>> laurent Goubet wrote:
>>> Hi Abel,
>>>
>>> We broke a good part of the diffmodel between the 0.8 and 0.9, mostly
>>> to try and make it a little less complex and convoluted than it was.
>>> The most impacting changes are listed on bug 233451 :
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451
>>>
>>> Don't hesitate to let us know if this isn't enough information.
>>>
>>> Laurent Goubet
>>> Obeo
>>>
>>> Abel Mui–o Vizcaino a écrit :
>>>> Hello,
>>>>
>>>> I would like to upgrade some code from the Metamodel API used in
>>>> 0.8.0 to the new one used in 0.9.0 (being new to EMF Compare).
>>>>
>>>> The goal of the code is to detect if specific model (xml-schema)
>>>> elements have changed, so the current logic is to search for a path
>>>> to the relevant elements in the DiffModel.
>>>>
>>>> I'm wondering if this is the recommended way and how does the API
>>>> change affect the algorithm (we are only impacted by the -now gone-
>>>> AddModelElement and RemoveModelElement classes).
>>>>
>>>> Thanks!
>>>> --
>>>> Abel Muiño
>>>
>
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #620997 is a reply to message #136859] Thu, 04 June 2009 15:18 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------070109060703050104000607
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Abel,

We broke a good part of the diffmodel between the 0.8 and 0.9, mostly to
try and make it a little less complex and convoluted than it was. The
most impacting changes are listed on bug 233451 :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451

Don't hesitate to let us know if this isn't enough information.

Laurent Goubet
Obeo

Abel Mui–o Vizcaino a écrit :
> Hello,
>
> I would like to upgrade some code from the Metamodel API used in 0.8.0
> to the new one used in 0.9.0 (being new to EMF Compare).
>
> The goal of the code is to detect if specific model (xml-schema)
> elements have changed, so the current logic is to search for a path to
> the relevant elements in the DiffModel.
>
> I'm wondering if this is the recommended way and how does the API change
> affect the algorithm (we are only impacted by the -now gone-
> AddModelElement and RemoveModelElement classes).
>
> Thanks!
> --
> Abel Muiño


--------------070109060703050104000607
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
--------------070109060703050104000607--
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #621049 is a reply to message #136980] Wed, 24 June 2009 20:47 Go to previous message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
Sorry to come back to this so late...

With the information on the bugzilla you have pointed me, I was able to
replace every check for AddModelElement to ModelElementChangeLeftTarget
and every check for RemoveModelElement to ModelElementChangeRightTarget.

Is this right?
Since before the API change, AddModelElement extended
ModelElementChange_Right_Target and now I must use _Left_, I find that
the code which was previously using AddModelElement#getRighElement()
does not build now.

Can you advice on what should I use instead? (getLeftElement()?
getRightParent?) Has this impact on the logic that was implemented in
our plugin before the change?

(Sorry for so many questions, but I am completly new to EMF compare and
I am trying to evolve an existing codebase)

Thanks!
--
Abel Muiño

laurent Goubet wrote:
> Hi Abel,
>
> We broke a good part of the diffmodel between the 0.8 and 0.9, mostly to
> try and make it a little less complex and convoluted than it was. The
> most impacting changes are listed on bug 233451 :
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451
>
> Don't hesitate to let us know if this isn't enough information.
>
> Laurent Goubet
> Obeo
>
> Abel Mui–o Vizcaino a écrit :
>> Hello,
>>
>> I would like to upgrade some code from the Metamodel API used in 0.8.0
>> to the new one used in 0.9.0 (being new to EMF Compare).
>>
>> The goal of the code is to detect if specific model (xml-schema)
>> elements have changed, so the current logic is to search for a path to
>> the relevant elements in the DiffModel.
>>
>> I'm wondering if this is the recommended way and how does the API
>> change affect the algorithm (we are only impacted by the -now gone-
>> AddModelElement and RemoveModelElement classes).
>>
>> Thanks!
>> --
>> Abel Muiño
>
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #621056 is a reply to message #137576] Thu, 25 June 2009 09:10 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------010705070302050607040807
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hi Abel,

I can't say for sure since I don't know how old your existing
application is. My best bet is that it's been written before we fixed
https://bugs.eclipse.org/bugs/show_bug.cgi?id=232277 . We had inverted
the "left" and "right" models within EMF Compare (intentionally at first
.... before we found out that wasn't a good thing :p). As we've set back
both side to what they should be, most "left" references are now the
"right" and vice-versa.

Hope this helps.

Laurent Goubet
Obeo

Abel Mui–o Vizcaino a écrit :
> Sorry to come back to this so late...
>
> With the information on the bugzilla you have pointed me, I was able to
> replace every check for AddModelElement to ModelElementChangeLeftTarget
> and every check for RemoveModelElement to ModelElementChangeRightTarget.
>
> Is this right?
> Since before the API change, AddModelElement extended
> ModelElementChange_Right_Target and now I must use _Left_, I find that
> the code which was previously using AddModelElement#getRighElement()
> does not build now.
>
> Can you advice on what should I use instead? (getLeftElement()?
> getRightParent?) Has this impact on the logic that was implemented in
> our plugin before the change?
>
> (Sorry for so many questions, but I am completly new to EMF compare and
> I am trying to evolve an existing codebase)
>
> Thanks!
> --
> Abel Muiño
>
> laurent Goubet wrote:
>> Hi Abel,
>>
>> We broke a good part of the diffmodel between the 0.8 and 0.9, mostly
>> to try and make it a little less complex and convoluted than it was.
>> The most impacting changes are listed on bug 233451 :
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451
>>
>> Don't hesitate to let us know if this isn't enough information.
>>
>> Laurent Goubet
>> Obeo
>>
>> Abel Mui–o Vizcaino a écrit :
>>> Hello,
>>>
>>> I would like to upgrade some code from the Metamodel API used in
>>> 0.8.0 to the new one used in 0.9.0 (being new to EMF Compare).
>>>
>>> The goal of the code is to detect if specific model (xml-schema)
>>> elements have changed, so the current logic is to search for a path
>>> to the relevant elements in the DiffModel.
>>>
>>> I'm wondering if this is the recommended way and how does the API
>>> change affect the algorithm (we are only impacted by the -now gone-
>>> AddModelElement and RemoveModelElement classes).
>>>
>>> Thanks!
>>> --
>>> Abel Muiño
>>


--------------010705070302050607040807
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
--------------010705070302050607040807--
Re: [EMF Compare] New metamodel API & Detecting changes to specific model elements [message #621057 is a reply to message #137665] Thu, 25 June 2009 16:05 Go to previous message
Abel Mui is currently offline Abel MuiFriend
Messages: 247
Registered: July 2009
Senior Member
That was it,
We were using 0.8.1, so I reversed the methods and our unit tests are
all green again.

Thanks a lot!

laurent Goubet wrote:
> Hi Abel,
>
> I can't say for sure since I don't know how old your existing
> application is. My best bet is that it's been written before we fixed
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=232277 . We had inverted
> the "left" and "right" models within EMF Compare (intentionally at first
> ... before we found out that wasn't a good thing :p). As we've set back
> both side to what they should be, most "left" references are now the
> "right" and vice-versa.
>
> Hope this helps.
>
> Laurent Goubet
> Obeo
>
> Abel Mui–o Vizcaino a écrit :
>> Sorry to come back to this so late...
>>
>> With the information on the bugzilla you have pointed me, I was able
>> to replace every check for AddModelElement to
>> ModelElementChangeLeftTarget and every check for RemoveModelElement to
>> ModelElementChangeRightTarget.
>>
>> Is this right?
>> Since before the API change, AddModelElement extended
>> ModelElementChange_Right_Target and now I must use _Left_, I find that
>> the code which was previously using AddModelElement#getRighElement()
>> does not build now.
>>
>> Can you advice on what should I use instead? (getLeftElement()?
>> getRightParent?) Has this impact on the logic that was implemented in
>> our plugin before the change?
>>
>> (Sorry for so many questions, but I am completly new to EMF compare
>> and I am trying to evolve an existing codebase)
>>
>> Thanks!
>> --
>> Abel Muiño
>>
>> laurent Goubet wrote:
>>> Hi Abel,
>>>
>>> We broke a good part of the diffmodel between the 0.8 and 0.9, mostly
>>> to try and make it a little less complex and convoluted than it was.
>>> The most impacting changes are listed on bug 233451 :
>>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233451
>>>
>>> Don't hesitate to let us know if this isn't enough information.
>>>
>>> Laurent Goubet
>>> Obeo
>>>
>>> Abel Mui–o Vizcaino a écrit :
>>>> Hello,
>>>>
>>>> I would like to upgrade some code from the Metamodel API used in
>>>> 0.8.0 to the new one used in 0.9.0 (being new to EMF Compare).
>>>>
>>>> The goal of the code is to detect if specific model (xml-schema)
>>>> elements have changed, so the current logic is to search for a path
>>>> to the relevant elements in the DiffModel.
>>>>
>>>> I'm wondering if this is the recommended way and how does the API
>>>> change affect the algorithm (we are only impacted by the -now gone-
>>>> AddModelElement and RemoveModelElement classes).
>>>>
>>>> Thanks!
>>>> --
>>>> Abel Muiño
>>>
>
Previous Topic:EMFT - Ecore Tools - Build Announcements
Next Topic:Weak comparison - can't match nodes, when nested
Goto Forum:
  


Current Time: Mon Dec 02 17:53:15 GMT 2024

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

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

Back to the top