Bug 31708 Make changes to RefreshAction to sync up code with workbench
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefreshAction.java
public void run(IProgressMonitor monitor) throws CoreException {
				monitor.beginTask(ActionMessages.getString("RefreshAction.progressMessage"), resources.length * 2); 
				monitor.subTask(""); 
				List javaElements= new ArrayList(5);
				for (int i= 0; i < resources.length; i++) {
					IResource resource= resources[i];
					resource.refreshLocal(IResource.DEPTH_INFINITE, new SubProgressMonitor(monitor, 1));
					if (resource.getType() == IResource.PROJECT) {
						checkLocationDeleted(((IProject)resource));
					}
					IJavaElement jElement= JavaCore.create(resource);
					if (jElement != null && jElement.exists())
						javaElements.add(jElement);
				}
				IJavaModel model= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());
				model.refreshExternalArchives(
					(IJavaElement[]) javaElements.toArray(new IJavaElement[javaElements.size()]),
					new SubProgressMonitor(monitor, resources.length));
			}
		};
		
		try {
			new ProgressMonitorDialog(getShell()).run(true, true, new WorkbenchRunnableAdapter(operation));
		} catch (InvocationTargetException e) {
			ExceptionHandler.handle(e, getShell(), 
				ActionMessages.getString("RefreshAction.error.title"),  
				ActionMessages.getString("RefreshAction.error.message")); 
		} catch (InterruptedException e) {
			
		}