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
}
/* (non-Javadoc)
 * Method declared on FieldEditor.
 */
public int getNumberOfControls() {
	return 3;
}
/**
 * Returns this field editor's shell.
 *
 * @return the shell
 */
protected Shell getShell() {
	if (changeButton == null)
		return null;
	return changeButton.getShell();
}
/**
 * Sets the text of the change button.
 *
 * @param text the new text
 */
public void setChangeButtonText(String text) {
	Assert.isNotNull(text);
	changeButtonText = text;
	if (changeButton != null)
		changeButton.setText(text);
}
}