IProgressMonitor newMonitor = startMainMonitor(getMonitor(),operation.getLabel(), 100);
// Check whether operation was canceled and do some steps.
- isCanceled(newMonitor, 10);
+ workedChecked(newMonitor, 10);
try {
IStatus status = getOperationHistory().execute(operation, newMonitor,
WorkspaceUndoUtil.getUIInfoAdapter(getShell()));
// Check whether operation was canceled and do some steps.
- isCanceled(newMonitor, 30);
+ workedChecked(newMonitor, 30);
String statusString = status.equals(Status.OK_STATUS) ? "completed" : "cancelled";
setStatusLine(operation.getLabel() + " " + statusString + ".");
* @param newMonitor
* @return
*/
- public static void isCanceled(IProgressMonitor newMonitor, int steps) {
+ public static void workedChecked(IProgressMonitor newMonitor, int steps) {
// In case the progress monitor was canceled throw an exception.
if (newMonitor.isCanceled()) {
throw new OperationCanceledException();