Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Compare] using separate model resource sets for left/right/ancestor
[Compare] using separate model resource sets for left/right/ancestor [message #106156] Fri, 04 January 2008 17:16 Go to next message
Hajo Eichler is currently offline Hajo EichlerFriend
Messages: 25
Registered: July 2009
Junior Member
Dear Cédric,

to provide an implementation for resolving proxy objects, we need separate EMF
resource sets for all sides (left, right and ancestor) in a difference analysis.
(see bugzilla request 214358 https://bugs.eclipse.org/bugs/show_bug.cgi?id=214358)

I just want to ask, if there is any reason why all model resources are currently
put in the same resource set?

When there is no reason, we could provide the patch for this issue, if you want.

Best regards,
Hajo
Re: [Compare] using separate model resource sets for left/right/ancestor [message #106644 is a reply to message #106156] Wed, 09 January 2008 10:05 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Hajo,

There is a reason why all the model resources are currently put in the same
resource set, this reason made sense in the "local comparison" scenario but
are no more relevant for SVN/CVS model comparison. A bit of explanation.

As you know the first step of model comparison is about getting a match
model, this match model basically says "this A element in model version 1
is the same as this A' element in model version 2"
That said it has references on both version 1 and version 2 models and
that's exactly the point of the ResourceSet, handling references on other
models and loading new Resources if needed. That's in this specific feature
you want to hook, loading new resources from the repository manager (SVN or
CVS) if needed. The only question is : do we want to share the other
referenced model with both versions, we used to want that for local
comparison but we can't do that for remote.

Let's consider this use case using two main models and another common model
defining "types" for instance.
typemodel
model1
model2

We are in "local mode". Both model1 and model2 have references on the
typemodel, we load everythin in the same ResourceSet and then we have only
one "typemodel" loaded and both model1 and model2 references the same
typemodel.

Now let's consider we are in remote mode, we have got
SVN :
typemodel1
model1

LOCAL:
typemodel2
model2

We have two versions of the typemodel, here we don't want to share it, we
want to match/compare them because typemodel1 and typemodel2 probably have
differences.

Right now when comparing (matching then differencing) two models we are only
comparing the main models (model1 and model2) but not the possible other
model loaded in the ResourceSet, that mean if typemodel is not in the same
ResourceSet, then all the references from model1 to typemodel and model2 to
typemodel will get detected as changed.

I see now that as you said this can makes the "resolving SVN proxies " quite
tricky given the current codebase, basically we should match/diff every
resources loaded by both model versions. (and that makes 3 when having an
ancestor model).

>When there is no reason, we could provide the patch for this issue, if you
>want.

We are really open to this patch and thanks for pointing this issue, this
patch could be quite heavy as :
- you have to match all the resources in both resourceset and agregate
that in the match model
- then check that the deducted diff model is right.

Cheers,

Cédric





that's more or less the reasons

Hajo Eichler wrote:

> Dear Cédric,
>
> to provide an implementation for resolving proxy objects, we need separate
> EMF resource sets for all sides (left, right and ancestor) in a difference
> analysis. (see bugzilla request 214358
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214358)
>
> I just want to ask, if there is any reason why all model resources are
> currently put in the same resource set?
>
> When there is no reason, we could provide the patch for this issue, if you
> want.
>
> Best regards,
> Hajo


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Re: [Compare] using separate model resource sets for left/right/ancestor [message #613972 is a reply to message #106156] Wed, 09 January 2008 10:05 Go to previous message
Cedric Brun is currently offline Cedric BrunFriend
Messages: 431
Registered: July 2009
Senior Member
Hi Hajo,

There is a reason why all the model resources are currently put in the same
resource set, this reason made sense in the "local comparison" scenario but
are no more relevant for SVN/CVS model comparison. A bit of explanation.

As you know the first step of model comparison is about getting a match
model, this match model basically says "this A element in model version 1
is the same as this A' element in model version 2"
That said it has references on both version 1 and version 2 models and
that's exactly the point of the ResourceSet, handling references on other
models and loading new Resources if needed. That's in this specific feature
you want to hook, loading new resources from the repository manager (SVN or
CVS) if needed. The only question is : do we want to share the other
referenced model with both versions, we used to want that for local
comparison but we can't do that for remote.

Let's consider this use case using two main models and another common model
defining "types" for instance.
typemodel
model1
model2

We are in "local mode". Both model1 and model2 have references on the
typemodel, we load everythin in the same ResourceSet and then we have only
one "typemodel" loaded and both model1 and model2 references the same
typemodel.

Now let's consider we are in remote mode, we have got
SVN :
typemodel1
model1

LOCAL:
typemodel2
model2

We have two versions of the typemodel, here we don't want to share it, we
want to match/compare them because typemodel1 and typemodel2 probably have
differences.

Right now when comparing (matching then differencing) two models we are only
comparing the main models (model1 and model2) but not the possible other
model loaded in the ResourceSet, that mean if typemodel is not in the same
ResourceSet, then all the references from model1 to typemodel and model2 to
typemodel will get detected as changed.

I see now that as you said this can makes the "resolving SVN proxies " quite
tricky given the current codebase, basically we should match/diff every
resources loaded by both model versions. (and that makes 3 when having an
ancestor model).

>When there is no reason, we could provide the patch for this issue, if you
>want.

We are really open to this patch and thanks for pointing this issue, this
patch could be quite heavy as :
- you have to match all the resources in both resourceset and agregate
that in the match model
- then check that the deducted diff model is right.

Cheers,

Cédric





that's more or less the reasons

Hajo Eichler wrote:

> Dear Cédric,
>
> to provide an implementation for resolving proxy objects, we need separate
> EMF resource sets for all sides (left, right and ancestor) in a difference
> analysis. (see bugzilla request 214358
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=214358)
>
> I just want to ask, if there is any reason why all model resources are
> currently put in the same resource set?
>
> When there is no reason, we could provide the patch for this issue, if you
> want.
>
> Best regards,
> Hajo


http://cedric.brun.io news and articles on eclipse and eclipse modeling.
Previous Topic:[CDO][0.8.0] Give more informations to StoreWriter
Next Topic:[EMF] Generate RAP instead of RCP
Goto Forum:
  


Current Time: Thu Apr 25 06:18:05 GMT 2024

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

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

Back to the top