Skip to main content



      Home
Home » Modeling » TMF (Xtext) » EMF Compare and LazyLinkingResource proxy URLs
EMF Compare and LazyLinkingResource proxy URLs [message #1821511] Thu, 13 February 2020 14:34 Go to next message
Eclipse UserFriend
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 15:08 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: EMF Compare and LazyLinkingResource proxy URLs [message #1821772 is a reply to message #1821699] Wed, 19 February 2020 17:34 Go to previous messageGo to next message
Eclipse UserFriend
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 09:04 Go to previous message
Eclipse UserFriend
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: Mon Jul 14 12:31:40 EDT 2025

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

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

Back to the top