Bug 229983 [Markers] Order of Quick Fix entries should not be random
I20080502-0100 I am going through a number of problems reported by API tooling, specifically, missing @since tags. When invoking the quick fix from the Problems view, the order of suggested fixes is not deterministic for the same kind of problem (missing @since tag). Sometimes, the first suggested fix is adding the @since tag (which is what I want), and sometimes the suggested fix is to add a problem filter. The order of suggested fixes should be the same for each problem type, and the first suggested fix for any problem type (if possible) should be one that changes the code, not one that adds problem filters.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/MarkerHelpRegistry.java
import org.eclipse.ui.IMarkerResolutionGenerator;
import org.eclipse.ui.IMarkerResolutionGenerator2;
import org.eclipse.ui.internal.ide.Policy;
import org.osgi.framework.Bundle;
/**
 * This class is a registry for marker help contexts and resolutions.
 */
public class MarkerHelpRegistry implements IMarkerHelpRegistry {
	/**
	 * Table of queries for marker F1 help.
	 */
	private Map helpQueries = new HashMap();
	/**
	 * Sorted list of help queries. Used to ensure that the "most specific"
	 * query is tried first
	 */
	private List sortedHelpQueries;
	/**
	 * Table of queries for marker resolutions
	 */
	private Map resolutionQueries = new HashMap();
	/**
	 * Help context id attribute in configuration element
	 */
	private static final String ATT_HELP = "helpContextId"; 
	/**
	 * Resolution class attribute name in configuration element
	 */
	private static final String ATT_CLASS = "class"; 
	private class QueryComparator implements Comparator {