IWorkbenchWindow currentWindow = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
if (currentWindow == null) {
return;
}
WorkbenchWindow internalWindow = (WorkbenchWindow) currentWindow;
Point windowLocation = internalWindow.getShell().getLocation();
ProgressRegion progressRegion = internalWindow.getProgressRegion();
if (progressRegion == null) {
return;
}
Rectangle startPosition = progressRegion.getControl().getBounds();
startPosition.x += windowLocation.x;
startPosition.y += windowLocation.y;
RectangleAnimation animation = new RectangleAnimation(internalWindow
.getShell(), startPosition, endPosition);
animation.schedule();
}