Bug 93564 Preference setting for @Override annotation
20050503 The story for adding the @Override annotation is currently abit confusing. Only the override dialog offers to add the annotation, all other override actions (quick fix, code assist) don't add it. A code style preference setting should be added to be used by all of them and the override wizatd checkbox removed. Requesting PMC approval for new the preference constant /** * A named preference that controls whether to add a override annotation for newly created methods * <p> * Value is of type <code>Boolean</code>. * </p> * @since 3.1 */ PreferenceConstants.CODEGEN_USE_OVERRIDE_ANNOTATION
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OverrideMethodDialog.java
private ITypeBinding[] fAllTypes;
		public OverrideMethodSorter(ITypeBinding curr) {
			ITypeBinding[] superTypes= Bindings.getAllSuperTypes(curr);
			fAllTypes= new ITypeBinding[superTypes.length + 1];
			fAllTypes[0]= curr;
			System.arraycopy(superTypes, 0, fAllTypes, 1, superTypes.length);
		}
		/*
		 * @see ViewerSorter#compare(Viewer, Object, Object)
		 */
		public int compare(Viewer viewer, Object first, Object second) {
			if (first instanceof ITypeBinding && second instanceof ITypeBinding) {
				final ITypeBinding left= (ITypeBinding) first;
				final ITypeBinding right= (ITypeBinding) second;
				if (right.getQualifiedName().equals("java.lang.Object")) 
					return -1;
				if (left.isEqualTo(right))
					return 0;
				if (Bindings.isSuperType(left, right))
					return +1;
				else if (Bindings.isSuperType(right, left))
					return -1;
				return 0;
			} else
				return super.compare(viewer, first, second);
		}
	}
	private static class OverrideMethodValidator implements ISelectionStatusValidator {