Bug 19567 ProblemsLabelDecorator throws ResourceException when project not open
In the F2 build, org.eclipse.jdt.ui.ProblemsLabelDecorator throws a ResourceException if the IResource passed to decorateImage() is a Project that is closed. The exception is a result of calling findMarkers() on line 178 with the closed project. The fix is to change the first line of getErrorTicksFromMarkers() on line 164 from: if (res == null || !res.exists()) { to: if (res == null || !res.isAccessible()) { isAccessible() is the same as exists() except for projects it tests that the project is open. Thanks.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/ProblemsLabelDecorator.java
if (cu.isWorkingCopy()) {
								
								return getErrorTicksFromWorkingCopy((ICompilationUnit) cu.getOriginalElement(), ref);
							}
							return getErrorTicksFromMarkers(cu.getResource(), IResource.DEPTH_ONE, ref);
						}
						break;
					default:
				}
			} else if (obj instanceof IResource) {
				return getErrorTicksFromMarkers((IResource) obj, IResource.DEPTH_INFINITE, null);
			}
		} catch (CoreException e) {
			JavaPlugin.logIgnoringNotPresentException(e);
		}
		return 0;
	}
	private int getErrorTicksFromMarkers(IResource res, int depth, ISourceReference sourceElement) throws CoreException {
		if (res == null || !res.exists()) {
			return 0;
		}
		int info= 0;
		
		IMarker[] markers= res.findMarkers(IMarker.PROBLEM, true, depth);
		if (markers != null) {
			for (int i= 0; i < markers.length && (info != ERRORTICK_ERROR); i++) {
				IMarker curr= markers[i];
				if (sourceElement == null || isMarkerInRange(curr, sourceElement)) {
					int priority= curr.getAttribute(IMarker.SEVERITY, -1);
					if (priority == IMarker.SEVERITY_WARNING) {