Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » EMF Compare and LazyLinkingResource proxy URLs
EMF Compare and LazyLinkingResource proxy URLs [message #1821511] Thu, 13 February 2020 19:34 Go to next message
Paul Gaspardo is currently offline Paul GaspardoFriend
Messages: 2
Registered: February 2019
Junior Member
I'm working with an Xtext DSL and exploring the possibility of using the EMF Compare RCP UI for model-based Git history diffs to augment the standard text-based diffing.

One behavior I've noticed is that changes in non-containment references are not being detected by EMF Compare. For example, using this State Machine example, if I invert the state transitions to turn

state active
	drawerOpened => waitingForLight
	lightOn		 => waitingForDrawer
end


into

state active
	drawerOpened => waitingForDrawer
	lightOn		 => waitingForLight
end


Then EMF Compare doesn't detect this change.

I believe this is because of the way the proxy URLs used by LazyLinkingResource work - instead of referring to the target EObject they refer to their own position in the source for later decoding, and since that doesn't change they are the same as far as EMF Compare is concerned.

Is there a general way to handle this? I've have some success with a custom IEqualityHelper.

(Note in the example above the reference is within the same file, but in our case we do deal with multiple files)
Re: EMF Compare and LazyLinkingResource proxy URLs [message #1821699 is a reply to message #1821511] Tue, 18 February 2020 20:08 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 164
Registered: July 2009
Location: Canada
Senior Member
Hi Paul,

From what I remember, EMF Compare detects changes made to the reference (non-containment). Ps testAttributeDatatypeChangedFromClazzTypeToClazzType() - https://bit.ly/2uZQ0jV

All customizations to the EMF Compare framework - https://bit.ly/2P2AR8o

You might like to use the EMF Compare forum for queries specific to EMF Compare - https://bit.ly/2uVzoK5.

I hope this helps.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: EMF Compare and LazyLinkingResource proxy URLs [message #1821772 is a reply to message #1821699] Wed, 19 February 2020 22:34 Go to previous messageGo to next message
Paul Gaspardo is currently offline Paul GaspardoFriend
Messages: 2
Registered: February 2019
Junior Member
Hi Neeraj,

Thanks for the links.

Although I could be misunderstanding, but it looks like in that example EMF Compare on its own is not detecting the non-containment reference change. It's able to do so thanks to the handling of ClassType in the ID computation function passed to the custom IdentityEObjectMatcher (simply accessing type.name is sufficient), but with that removed EMF Compare doesn't detect that ClassType.type was changed without otherwise resolving the proxy references before performing the comparison.

But that does give some ideas to look into, thank you.
Re: EMF Compare and LazyLinkingResource proxy URLs [message #1821959 is a reply to message #1821772] Mon, 24 February 2020 14:04 Go to previous message
Lutz Wrage is currently offline Lutz WrageFriend
Messages: 167
Registered: July 2009
Senior Member
I'd highly appreciate if could share your solution if you find one. I ran into the same issue and never solved it.
Previous Topic:"importURI" and qualified names
Next Topic:Dark theme support for Xtext editor
Goto Forum:
  


Current Time: Sun Oct 25 20:28:50 GMT 2020

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

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

Back to the top