I am writing an eclipse plug-in to update some projects in my workspace. After the update, there may be conflicts. I want to show a dialog to the user if there are some conflicts in the updated project(s).
To update, I use the UpdateOperation
, then I do a IResource.refreshLocal() on the updated project. To look for conflicts I use FileUtility.checkForResourcesPresenceRecursive(resources, IStateFilter.SF_CONFLICTING)
. Also tryed with IStateFilter.SF_CONTENT_CONFLICTING
and IStateFilter.SF_TREE_CONFLICTING
. Normally they return false
.
When I run in debug mode, the first two return true
. That brings me to think that there is some event that gets fired after the refresh and with the loss of time in debug mode, Subversive gets to know about it. Am I right ? What event is this ? It is not IResourceChangeEvent
. Tryed to listen for POST_CHANGED
with no luck.
Do you have a hint for me ? Thank you.
It was easier than I expected. The
UpdateOperation
(and also theCommitOperation
and theMergeOperation
) class extendsAbstractConflictDetectionOperation
that offers thehasUnresolvedConflicts()
method. That does the trick ;)