Bug 80429 [Preferences] [Dialogs] FieldEditors should relax requirements to support DialogPages
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEWorkbenchPreferencePage.java
private void createAutoRefreshControls(Composite parent) {
        this.autoRefreshButton = new Button(parent, SWT.CHECK);
        this.autoRefreshButton.setText(IDEWorkbenchMessages
                .getString("WorkbenchPreference.RefreshButtonText")); 
        this.autoRefreshButton.setToolTipText(IDEWorkbenchMessages
                .getString("WorkbenchPreference.RefreshButtonToolTip")); 
        boolean autoRefresh = ResourcesPlugin.getPlugin()
                .getPluginPreferences().getBoolean(
                        ResourcesPlugin.PREF_AUTO_REFRESH);
        this.autoRefreshButton.setSelection(autoRefresh);
    }
    /**
     * Check the state of the text
     * @param text The widget to check
     * @return <code>true</code> if the text has a valid number entered.
     */
    protected boolean checkState(Text text) {
        if (text == null)
            return false;
        try {
            Integer.valueOf(text.getText()).intValue();
            setErrorMessage(null);
            return true;
        } catch (NumberFormatException e1) {
            setErrorMessage(WorkInProgressMessages
                    .getString("WorkInProgressPreferencePage.InvalidMessage")); 
        }
        return false;
    }
}