Bug 37155 [Preferences] StringButtonFieldEditor should disable button when disabled.
setEnabled() should not only enable/disable the text string, it should also enable/disable the button, or should provide the capability for enabling/disabling the button separately. This problem is most evident when using a DirectoryFieldEditor. After disabling it, the user can still press on the "Browse..." button.
bundles/org.eclipse.jface/src/org/eclipse/jface/preference/StringButtonFieldEditor.java
createControl(parent);
}
/* (non-Javadoc)
 * Method declared on FieldEditor.
 */
protected void adjustForNumColumns(int numColumns) {
	((GridData)getTextControl().getLayoutData()).horizontalSpan = numColumns - 2;
}
/**
 * Notifies that this field editor's change button has been pressed.
 * <p>
 * Subclasses must implement this method to provide a corresponding
 * new string for the text field. If the returned value is <code>null</code>,
 * the currently displayed value remains.
 * </p>
 *
 * @return the new string to display, or <code>null</code> to leave the
 *  old string showing
 */
protected abstract String changePressed();
/* (non-Javadoc)
 * Method declared on StringFieldEditor (and FieldEditor).
 */
protected void doFillIntoGrid(Composite parent, int numColumns) {
	super.doFillIntoGrid(parent, numColumns - 1);
	changeButton = getChangeControl(parent);
	GridData gd = new GridData();
	gd.horizontalAlignment = GridData.FILL;
	gd.heightHint = convertVerticalDLUsToPixels(changeButton, IDialogConstants.BUTTON_HEIGHT);
	int widthHint = convertHorizontalDLUsToPixels(changeButton, IDialogConstants.BUTTON_WIDTH);