| Re: [subversive-dev] How to invoke Lock operation before Commit operation using de Commit UI extension point |
|
Hello, That won't work because lock action performs real operation asynchronously. In order to avoid LockDialog and to check operation execution status you'll need to do something like this: int result = Window.CANCEL;
filesToCommit
= allFilesToCommit;
CustomCommitDialog
dialog = new CustomCommitDialog(shell,
commentPanel);
dialog.setAllFilesToCommit(allFilesToCommit);
result
= dialog.open();
if
(result == Window.OK) {
LockOperation op = new LockOperation(resources, "lock message
text", false /*true in order to force locks*/);
UIMonitorUtility.doTaskBusyDefault(op);
result
= op.getSeverity() == IStatus.OK ? Window.OK : Window.CANCEL;
}
return
result;
Best regards, Alexander. 04.08.2011 23:28, rodrigo luiz duarte пишет: Hello Alexander, |