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
toImplement.add(overridable[i]);
			}
		}
		IMethodBinding[] toImplementArray= (IMethodBinding[]) toImplement.toArray(new IMethodBinding[toImplement.size()]);
		setInitialSelections(toImplementArray);
		HashSet expanded= new HashSet(toImplementArray.length);
		for (int i= 0; i < toImplementArray.length; i++) {
			expanded.add(toImplementArray[i].getDeclaringClass());
		}
		HashSet types= new HashSet(overridable.length);
		for (int i= 0; i < overridable.length; i++) {
			types.add(overridable[i].getDeclaringClass());
		}
		ITypeBinding[] typesArrays= (ITypeBinding[]) types.toArray(new ITypeBinding[types.size()]);
		ViewerSorter sorter= new OverrideMethodSorter(binding);
		if (expanded.isEmpty() && typesArrays.length > 0) {
			sorter.sort(null, typesArrays);
			expanded.add(typesArrays[0]);
		}
		setExpandedElements(expanded.toArray());
		((OverrideMethodContentProvider) getContentProvider()).init(overridable, typesArrays);
		setTitle(JavaUIMessages.OverrideMethodDialog_dialog_title); 
		setMessage(null);
		setValidator(new OverrideMethodValidator(overridable.length));
		setSorter(sorter);
		setContainerMode(true);
		setSize(60, 18);
		setInput(new Object());
	}
	public CompilationUnit getCompilationUnit() {