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/preferences/NameConventionConfigurationBlock.java
fUseIsForBooleanGettersBox= new SelectionButtonDialogField(SWT.CHECK | SWT.WRAP);
		fUseIsForBooleanGettersBox.setDialogFieldListener(adapter);
		fUseIsForBooleanGettersBox.setLabelText(PreferencesMessages.NameConventionConfigurationBlock_isforbooleangetters_label); 
		
		updateControls();
	}
	
	private static Key[] getAllKeys() {
		return new Key[] {
			PREF_FIELD_PREFIXES, PREF_FIELD_SUFFIXES, PREF_STATIC_FIELD_PREFIXES, PREF_STATIC_FIELD_SUFFIXES,
			PREF_ARGUMENT_PREFIXES, PREF_ARGUMENT_SUFFIXES, PREF_LOCAL_PREFIXES, PREF_LOCAL_SUFFIXES,
			PREF_EXCEPTION_NAME, PREF_KEYWORD_THIS, PREF_IS_FOR_GETTERS
		};	
	}	
	protected Control createContents(Composite parent) {
		setShell(parent.getShell());
		
		GridLayout layout= new GridLayout();
		layout.numColumns= 3;
		layout.marginHeight= 0;
		layout.marginWidth= 0;
		Composite composite= new Composite(parent, SWT.NONE);
		composite.setLayout(layout);
		fNameConventionList.doFillIntoGrid(composite, 4);
		LayoutUtil.setHorizontalSpan(fNameConventionList.getLabelControl(null), 2);
		Table table= fNameConventionList.getTableViewer().getTable();
		GridData data= (GridData)fNameConventionList.getListControl(null).getLayoutData();
		data.heightHint= SWTUtil.getTableHeightHint(table, 5);
		data.grabExcessHorizontalSpace= true;