Bug 31962 Package Explorer context menu should not allow refresh on a closed project
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/RefreshAction.java
return true;
			parent= parent.getParent();
		}
		return false;
	}
	
	private void checkLocationDeleted(IProject project) throws CoreException {
		if (!project.exists())
			return;
		File location = project.getLocation().toFile();
		if (!location.exists()) {
			final String message = ActionMessages.getFormattedString(
				"RefreshAction.locationDeleted.message", 
				new Object[] {project.getName(), location.getAbsolutePath()});
			final boolean[] result= new boolean[1];
			
			getShell().getDisplay().syncExec(new Runnable() {
				public void run() {
					result[0]= MessageDialog.openQuestion(getShell(), 
						ActionMessages.getString("RefreshAction.locationDeleted.title"), 
						message);
				}
			});
			if (result[0]) { 
				project.delete(true, true, null);
			}
		}
	}	
}