| Re: [subversive-dev] How to invoke Lock operation before Commit operation using de Commit UI extension point |
|
Hello, All resources that will be committed are passed down through the function input parameters. So, you don't need to collect them from the resources tree. Instead you should extract from the passed resources set only the files that could be locked. You can do it like this: if (result == Window.OK) { IResource []resources = (IResource [])allFilesToCommit.toArray(new IResource[allFilesToCommit.size()]); resources = FileUtility.getResourcesRecursive(resources, IStateFilter.SF_READY_TO_LOCK, IResource.DEPTH_ZERO); LockOperation op = new LockOperation(resources, "lock message text", false); UIMonitorUtility.doTaskBusyDefault(op); result = op.getStatus().getSeverity() == IStatus.OK ? Window.OK : Window.CANCEL; } Best regards, Alexander. 08.08.2011 16:48, rodrigo luiz duarte пишет: Hello Alexander, |