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
/**
	 * LabelProviderChangedEvent sent out by the ProblemsLabelDecorator.
	 */
	public static class ProblemsLabelChangedEvent extends LabelProviderChangedEvent {
		private boolean fMarkerChange;
		public ProblemsLabelChangedEvent(IBaseLabelProvider source, IResource[] changedResource, boolean isMarkerChange) {
			super(source, changedResource);
			fMarkerChange= isMarkerChange;
		}
		
		/**
		 * Returns if this event origins from marker changes. If set to <code>false</code>, an annotation model change
		 * was the origin. Viewers not displaying working copies can ignore these events.
		 */
		public boolean isMarkerChange() {
			return fMarkerChange;
		}
	}
	private static final int ERRORTICK_WARNING= JavaElementImageDescriptor.WARNING;
	private static final int ERRORTICK_ERROR= JavaElementImageDescriptor.ERROR;	
	private ImageDescriptorRegistry fRegistry;
	private boolean fRegistryNeedsDispose= false;
	private IProblemChangedListener fProblemChangedListener;
	
	private ListenerList fListeners;
	/**
	 * Constructor for ProblemsLabelDecorator.