DESCRIPTION

Provide a remote mapping context to ModelProviders

Allow model providers to use remote information when trying
to determine whether a file is a part of a logical model or
not. When a file has been deleted locally, or when a file
has been created on one of the remote sides, the local side
is not enough to compute a full model. ModelProviders will
need access to the remote file data to take these locally
unknown files into account.
Note that several model providers will provide mappings for a projet,
causing the label displayed in the Sync view to be sightly different,
hence the change in CompareActionsTest.

Change-Id: I956dfb13093781accca36142cd87cf01b479fe1a
Also-by: Gustavo Green xxx@xxx.xxx
Also-by: Karter Mora xxx@xxx.xxx
Also-by: Corbin Edwards xxx@xxx.xxx
Signed-off-by: Maleah Marks xxx@xxx.xxx


COMMENTS

author: Maleah Marks
date: 2016-08-05 13:09:56.000000000

Uploaded patch set 16.

-------------------------------------
author: Brenden Conley
date: 2016-08-05 13:37:09.000000000

Patch Set 16:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/8934/

-------------------------------------
author: Brenden Conley
date: 2016-08-05 14:04:52.000000000

Patch Set 16: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/8934/ : SUCCESS

-------------------------------------
author: Douglas Trujillo
date: 2016-08-09 23:30:26.000000000

Patch Set 16:

(2 comments)

* how can I test this ?
* how about adding a test ?

Line:632, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> how is this related to this change ?

Line:18, /COMMIT_MSG -> you didn't modify this test ...

-------------------------------------
author: Maleah Marks
date: 2016-08-10 14:52:00.000000000

Patch Set 16:

(2 comments)

Hello Mathias,
Many thanks for taking the time to review this!

I will add a test case so that the expected behavior is verified.

I tried to answer your question about the ResourceUtil change below, please tell me if you think the current approach is wrong. I'll then try and find another, as I propose in the answer below.

Best regards.

Line:632, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> I know, this looks weird.

The model descriptor provided in EGit UI will not behave as intended when it receives a remote mapping context.
Basically, it would break the test case where you select a project and compare it with another version: If there are changes in other projects, these changes would now appear in the comparison, which is not what we want.
But on the other hand, we do need a RemoteMappingContext in EMFCompare for example to check whether certain files that are not locally present must be included in the logical model. If locally I have only model.uml whereas remotely I have model.uml + submodel.uml, I need a RemoteMappingContext to discover it.

I couldn't find any simple way around that other than ignoring the EGit model provider here.

The only way around that I can think of would be to introduce in EGit an interface that ModelProviders could adapt to so that we could only provide a RemoteMappingContext to those ModelProviders that explicitely declare it. We could then make sure that the EMFModelProvider would adapt to this interface.
Do you think it'd be a better solution?

Line:18, /COMMIT_MSG -> You are right, this remains from a previous change set.
I'll fix this in the next patch set.

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-08-31 13:03:36.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

-------------------------------------
