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/SourceActionDialog.java
IJavaElement[] members= fType.getChildren();
		IMethod[] methods= fType.getMethods();
		
		fInsertPositions.add(methods.length > 0 ? methods[0]: null); 
		fInsertPositions.add(null); 
		
		fLabels.add(ActionMessages.SourceActionDialog_first_method); 
		fLabels.add(ActionMessages.SourceActionDialog_last_method); 
		if (hasCursorPositionElement(fEditor, members, fInsertPositions)) {
			fLabels.add(ActionMessages.SourceActionDialog_cursor); 
			fCurrentPositionIndex= 2;
		} else {
			
			fCurrentPositionIndex= Math.max(fCurrentPositionIndex, 0);
			fCurrentPositionIndex= Math.min(fCurrentPositionIndex, 1);
		}
		
		for (int i = 0; i < methods.length; i++) {
			IMethod curr= methods[i];
			String methodLabel= JavaElementLabels.getElementLabel(curr, JavaElementLabels.M_PARAMETER_TYPES);
			fLabels.add(Messages.format(ActionMessages.SourceActionDialog_after, methodLabel)); 
			fInsertPositions.add(findSibling(curr, members));
		}
		fInsertPositions.add(null);
	}
	
	private boolean asBoolean(String string, boolean defaultValue) {
		if (string != null) {
			return StringConverter.asBoolean(string, defaultValue);
		}