Bug 59956 [R21PRES] perspective switcher
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/IDEWorkbenchAdvisor.java
if (!refresh)
			return;
			
		
		for (int i = 0; i < commandLineArgs.length; i++)
			if (commandLineArgs[i].equalsIgnoreCase("-refresh")) 
				return;
				
		IWorkbenchWindow window = getWorkbenchConfigurer().getWorkbench().getActiveWorkbenchWindow();
		Shell shell = window == null ? null : window.getShell();
		ProgressMonitorDialog dlg = new ProgressMonitorJobsDialog(shell);
		final CoreException ex[] = new CoreException[1];
		try {
			dlg.run(true, true, new IRunnableWithProgress() {
				public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
					try {
						IContainer root = ResourcesPlugin.getWorkspace().getRoot();
						root.refreshLocal(IResource.DEPTH_INFINITE, monitor);
					} catch (CoreException e) {
						ex[0] = e;
					}
				}
			});
			if (ex[0] != null) {
				ErrorDialog.openError(
					shell, 
					IDEWorkbenchMessages.getString("Workspace.problemsTitle"),  
					IDEWorkbenchMessages.getString("Workspace.problemMessage"),  
					ex[0].getStatus());
			}