(no subject) [message #715135] |
Fri, 12 August 2011 13:36 |
Carel Bast 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: [EMF Compare] Tailored EMF compare GUI [message #716705 is a reply to message #716108] |
Thu, 18 August 2011 07:30 |
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03574 seconds