boolean _canRunInBackground = query.canRunInBackground();
if (_canRunInBackground) {
NewSearchUI.runQueryInBackground(query);
} else {
IWorkbench _workbench = PlatformUI.getWorkbench();
final IProgressService progressService = _workbench.getProgressService();
final IStatus status = NewSearchUI.runQueryInForeground(progressService, query);
boolean _matches = status.matches(((IStatus.ERROR + IStatus.INFO) + IStatus.WARNING));
if (_matches) {
ErrorDialog.openError(shell, "Search",
("Problems occurred while searching. " + "The affected files will be skipped."), status);