|Disable stage changes prompt [message #1775082]
||Tue, 24 October 2017 12:09
| Luis Mata
Registered: October 2017
We updated our EMFCompare version and we noticed that, in the conflict resolution, a new dialog is shown.
When conflicts are resolved and the CompareEditorInput okPressed() is called, a prompt is presented asking the user to stage the changes.
I found that this was a change in this commit.
But my question is how can we control it?
In our case, we have custom behaviours for staging and committing, which makes this dialog unnecessary, even unwanted.
I was expecting that some sort of flag would allow me to choose if I want to have this staging confirmation or not, but I could not find it, nor anything similar. :-(
Is there any way of preventing this prompt to be shown, and accept a default value?
Any information would be much appreciated!
|Re: Disable stage changes prompt [message #1775085 is a reply to message #1775082]
||Tue, 24 October 2017 12:55
|| Philip Langer
Registered: March 2015
Location: Vienna, Austria
as soon as you install the bundle org.eclipse.emf.compare.egit.ui in your IDE/application/product, the org.eclipse.emf.compare.egit.ui.internal.mergeresolution.PostMergeStager will register itself as a IMergeResolutionListener and invoke the behavior as you describe (see extension point org.eclipse.emf.compare.ide.ui.mergeResolutionListener). There is unfortunately no preference right now to control it.
However, especially if you run a custom product, you can get rid of this dialog by excluding the bundle org.eclipse.emf.compare.egit.ui and optionally register your own IMergeResolutionListener implementation that implements your desired behavior instead. If you need the bundle org.eclipse.emf.compare.egit.ui in your product, you can still get rid of the editor by obtaining the registry that tracks all the IMergeResolutionListeners and remove the PostMergeStager from your custom plug-in. You can access the registry via EMFCompareIDEUIPlugin.getDefault().getMergeResolutionListenerRegistry() (see also org.eclipse.emf.compare.ide.ui.internal.mergeresolution.MergeResolutionListenerRegistry.removeProvider(String)).
If none of the above works for you, it shouldn't be a lot of effort to add a preferences page to EMF Compare which allows users to enable or disable registered IMergeResolutionListeners -- similar to the EMF Compare engine or item providers selection preferences. Please let us know if you are interested in contributing such a preference. Also, feel free to open a bug report on that issue. Thanks!
I hope this helps!
Get professional Eclipse developer support:
Powered by FUDForum
. Page generated in 0.02082 seconds