Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » (no subject)
(no subject) [message #715135] Fri, 12 August 2011 13:36 Go to next message
Carel Bast is currently offline Carel BastFriend
Messages: 16
Registered: November 2009
Junior Member
Hi,

We are trying to create a Compare option in our EMF based application,
that stores its model in a CDO Repository.

This CDO repository only has a few resources.
These resources are typically big, they won't fit in a PC's memory.
I want to do a compare of two sub-trees in this huge model.
I managed to create a custom MatchScopeProvider, that only returns the
elements in scope.
The root(s) of the resource however are NOT in scope.
The MatchService will leave the Roots empty because of this.
This results in CompareEditor with empty left and right data.
If I add the src and tgt to the roots, still the complete resource is
shown in the left and right pane of the editor.

Question:

Is there a possibility to ONLY show the src and tgt EObject (and their
children) in the editor panes??

More generally: How the ignore the concept of eResource in EMFCompare?

My current code looks something like this:

<Code>
IMatchScopeProvider scopeProvider = new MyScopeProvider(src, tgt);
options.put(MatchOptions.OPTION_MATCH_SCOPE_PROVIDER, scopeProvider);
MatchModel match = MatchService.doContentMatch(src, tgt, options);
// match.getLeftRoots().add(src);
// match.getRightRoots().add(tgt);

DiffModel diff = DiffService.doDiff(match, false);

ComparisonResourceSnapshot snapshot =
DiffFactory.eINSTANCE.createComparisonResourceSnapshot();
snapshot.setMatch(match);
snapshot.setDiff(diff);

ModelCompareEditorInput input = new ModelCompareEditorInput(snapshot);
CompareUI.openCompareDialog(input);
</Code>

Thanks for you input,

-- Carel Bast
Re: (no subject) [message #716004 is a reply to message #715135] Tue, 16 August 2011 08:03 Go to previous messageGo to next message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Carel,

I have fixed a number of bugs really recently with many aspects of the comparison. The "roots" not set in the match model are part of these fixes. I am not sure that I fixed the UI for it though. Could you update to the latest nightly (http://download.eclipse.org/modeling/emf/compare/updates/nightly/master/) and check whether this fixes your issues?

If it does not fix the problem, please raise a bug against EMF Compare (https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMF&component=Compare) with the information from this thread.

Laurent Goubet
Obeo
Re: [EMF Compare] Tailored EMF compare GUI [message #716108 is a reply to message #716004] Tue, 16 August 2011 13:10 Go to previous messageGo to next message
Carel Bast is currently offline Carel BastFriend
Messages: 16
Registered: November 2009
Junior Member
Hi Laurent,

Thanks for your answer!

I was already using the latest version of EMFCompare.
But I am afraid I can not find the correct way to adapt the GUI.
Could you point me to an example on how to tailor the UI to defined my
own root in the left/right panes and on selecting my own LabelProvider etc?

Thanks,

-- Carel


On 16-8-2011 10:03, Laurent Goubet wrote:
> Hi Carel,
>
> I have fixed a number of bugs really recently with many aspects of the
> comparison. The "roots" not set in the match model are part of these
> fixes. I am not sure that I fixed the UI for it though. Could you update
> to the latest nightly
> (http://download.eclipse.org/modeling/emf/compare/updates/nightly/master/)
> and check whether this fixes your issues?
>
> If it does not fix the problem, please raise a bug against EMF Compare
> (https://bugs.eclipse.org/bugs/enter_bug.cgi?product=EMF&component=Compare)
> with the information from this thread.
>
> Laurent Goubet
> Obeo
Re: [EMF Compare] Tailored EMF compare GUI [message #716705 is a reply to message #716108] Thu, 18 August 2011 07:30 Go to previous message
Laurent Goubet is currently offline Laurent GoubetFriend
Messages: 1902
Registered: July 2009
Senior Member
Hi Carel,

Unfortunately, the EMF Compare UI is not yet customizable. Allowing users/clients of the API to override the LabelProvider, ContentProvider and action handlers is something we plan for the next version, but is not yet possible with 1.2.

Sorry for the inconvenience.

Laurent
Previous Topic:Xcore, xbase and EObject literals
Next Topic:Re: Xcore, xbase and EObject literals
Goto Forum:
  


Current Time: Thu Apr 25 01:13:16 GMT 2024

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

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

Back to the top