ComparisonEditorInput vs. ComparisonScopeEditorInput [message #1743919] |
Tue, 20 September 2016 11:40  |
Eclipse User |
|
|
|
Hi,
By following the Developer Guide I can open the Compare UI, using either ComparisonScopeEditorInput or ComparisonEditorInput.
I also have a Configuration, where I set left and right editable properties to false
EMFCompareConfiguration configuration = new EMFCompareConfiguration(new CompareConfiguration());
configuration.setLeftEditable(false);
configuration.setRightEditable(false);
When I use ComparisonEditorInput and a precomputed comparison, this works fine and the view launches with the merge buttons disabled.
IComparisonScope scope = new DefaultComparisonScope(leftObject, rightObject, null);
Comparison comparison = EMFCompare.builder().setMatchEngineFactoryRegistry(registry).build().compare(scope);
AbstractEMFCompareEditorInput input = new ComparisonEditorInput(configuration, comparison, editingDomain, adapterFactory);
CompareUI.openCompareEditor(input);
However when I use ComparisonScopeEditorInput, with the same Configuration, and pass the EMF Compare object and scope to it, the merge buttons are not removed and remain visible
IComparisonScope scope = new DefaultComparisonScope(leftObject, rightObject, null);
EMFCompare compare = EMFCompare.builder().setMatchEngineFactoryRegistry(registry).build();
AbstractEMFCompareEditorInput input = new ComparisonScopeEditorInput(configuration, editingDomain, adapterFactory, compare, scope);
CompareUI.openCompareEditor(input);
I presume this is not intended behaviour, or is there a problem with my usage of ComparisonScopeEditorInput? EMF Compare version is 3.2
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.45656 seconds