|
Re: Showing remote changes on the left [message #1746630 is a reply to message #1746517] |
Wed, 02 November 2016 09:34 |
|
Hi,
That is not configurable through normal means as we just show the left and right (as defined by the EMFCompareConfiguration) on their respective sides. You might switch the side from there, but I don't know how much of an impact that might have on all the other assumptions that are made throughout the UI and core of EMF Compare. Your best bet would be to really switch the sides completely by using the "remote" as left and local as right when you actually call for the comparison in your case I think.
Laurent Goubet
Obeo
|
|
|
Re: Showing remote changes on the left [message #1746721 is a reply to message #1746630] |
Thu, 03 November 2016 16:56 |
Vlad Acretoaie Messages: 95 Registered: April 2014 |
Member |
|
|
Hi Laurent,
Thank you for the suggestion. That is also what I tried, but for some reason it's not working as I would expect.
Specifically, I tried to implement my own GitResourceVariantTreeProvider by extending DirCacheResourceVariantTreeProvider. Here's what my extension looks like:
public class MyResourceVariantTreeProvider extends DirCacheResourceVariantTreeProvider {
public MyResourceVariantTreeProvider(Repository repository, boolean useWorkspace) throws IOException {
super(repository, useWorkspace);
}
@Override
public IResourceVariantTree getRemoteTree() {
return super.getSourceTree();
}
@Override
public IResourceVariantTree getSourceTree() {
return super.getRemoteTree();
}
}
However, when I replace DirCacheResourceVariantTreeProvider with my implementation, the Compare Editor always shows my conflicts as pseudo-conflicts, listing the remote changes on both the left and the right side. I am using MyResourceVariantTreeProvider to identify conflicts in CompareEditorInput.prepareInput. Do you think this is a viable approach in principle?
Cheers,
Vlad
|
|
|
Re: Showing remote changes on the left [message #1746915 is a reply to message #1746721] |
Mon, 07 November 2016 16:21 |
|
Hi,
To be honest, I don't think it's a viable approach in general since you can't really control when you'll be switching the sides and when you will not. For example, in this particular case, I'm pretty sure we're using the actual workspace version (the IResource instances) for the left side, regardless of what "getSourceTree" sends. You'd have to be comparing two branches together (or two remote revisions) to avoid that.
What I was suggesting earlier is to actually send EMFCompare the data you want it to compare for each side instead of relying on the default team actions (Compare With > Each Other) since that is the only way I think viable if your goal is to completely switch the sides since that's the only way you'd be completely in control of what's happening behind the scene.
Laurent Goubet
Obeo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03623 seconds