ComparisonEditorInput vs. ComparisonScopeEditorInput [message #1743919] |
Tue, 20 September 2016 15:40 |
Conor O'Mahony Messages: 27 Registered: August 2016 |
Junior Member |
|
|
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
|
|
|
Re: ComparisonEditorInput vs. ComparisonScopeEditorInput [message #1743967 is a reply to message #1743919] |
Wed, 21 September 2016 07:42 |
|
Hi,
I cannot test this for now, but we seem to be properly using the compare configuration's "editable" state (see SaveComparisonModelAction.isEnabled()). My guess would be that we somehow change the configuration at one point to make it editable, but it indeed doesn't seem like the intended behavior. Please raise a bug on this (possibly with a test project to reproduce if you have a sample you can share).
Laurent Goubet
Obeo
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03646 seconds