"out of sync" API
Is there a public API to detect that a workspace\component is out of sync ?
I need this functionality in order to to make a decision to block some operations in RTC in such scenario.
Thanks :-)
Related info I found from debugging the SDK:
The class com.ibm.team.filesystem.rcp.core.internal.changes.outofsync.OutOfSyncCache contains this info. However, it is internal. I see that it is using com.ibm.team.filesystem.client.operations.IVerifyInSyncOperation to get this information. This class requires a job for running (in our case, it is com.ibm.team.filesystem.rcp.core.internal.changes.outofsync.OutOfSyncCache.OutOfSyncUpdateJob). I am hoping there is a public API which retrieves the information from a cache in the client instead of launching a job to get this information.
One answer
IVerifyInSyncOperation is the correct way to identify if the workspace or components or files are in sync (it's essentially the UI-layer API). This is indeed a long running operation (long-op) as it does a variety of things such as locking the workspace/component, getting the list of shares loaded on disk from the provided components/workspaces, etc. There is no quick easy 'UI thread' look-up to get that information. There should be nothing preventing you from calling this operation however (as with normal Eclipse UI development, just make sure you don't call this operation on the main UI thread).