Bug 156865 Undo / Redo marker actions not updated
I20060906-1200 If a file gets delete after adding/changing/removing a marker then the Undo and Redo actions are not updated and still show, e.g. Undo Add Task Redo Add Task Executing the undo or redo does nothing (no feedback, no .log entry) and the undo and redo menu text remains the same and enabled.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractMarkersOperation.java
*/
	protected void setMarkerDescriptions(MarkerDescription[] descriptions) {
		markerDescriptions = descriptions;
		addUndoContexts();
		updateTargetResources();
	}
	/*
	 * Update the target resources by traversing the currently known markers or
	 * marker descriptions and getting their resources.
	 */
	private void updateTargetResources() {
		IResource[] resources = null;
		if (markers == null) {
			if (markerDescriptions != null) {
				resources = new IResource[markerDescriptions.length];
				for (int i = 0; i < markerDescriptions.length; i++) {
					resources[i] = markerDescriptions[i].resource;
				}
			}
		} else {
			resources = new IResource[markers.length];
			for (int i = 0; i < markers.length; i++) {
				resources[i] = markers[i].getResource();
			}
		}
		setTargetResources(resources);
	}
	/*
	 * Add undo contexts according to marker types. Any unknown marker types
	 * will cause the workspace undo context to be added.