combo.setEnabled(locales.size() > 1);
combo.setEnabled(locales.size() > 0);
	protected Control createContents(final Composite parent) {		Composite composite= new Composite(parent, SWT.NONE);		GridLayout layout= new GridLayout(); layout.numColumns= 1;		composite.setLayout(layout);		final PixelConverter converter= new PixelConverter(parent);		layout= new GridLayout();		layout.numColumns= 3;		final String[] trueFalse= new String[] { IPreferenceStore.TRUE, IPreferenceStore.FALSE };		Group user= new Group(composite, SWT.NONE);		user.setText(PreferencesMessages.getString("SpellingPreferencePage.preferences.user")); //$NON-NLS-1$		user.setLayout(new GridLayout());				user.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));		String label= PreferencesMessages.getString("SpellingPreferencePage.enable.label"); //$NON-NLS-1$		final Button master= addCheckBox(user, label, PREF_SPELLING_CHECK_SPELLING, trueFalse, 0);		label= PreferencesMessages.getString("SpellingPreferencePage.ignore.digits.label"); //$NON-NLS-1$		Control slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_DIGITS, trueFalse, 20);		createSelectionDependency(master, slave);		label= PreferencesMessages.getString("SpellingPreferencePage.ignore.mixed.label"); //$NON-NLS-1$		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_MIXED, trueFalse, 20);		createSelectionDependency(master, slave);		label= PreferencesMessages.getString("SpellingPreferencePage.ignore.sentence.label"); //$NON-NLS-1$		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_SENTENCE, trueFalse, 20);		createSelectionDependency(master, slave);		label= PreferencesMessages.getString("SpellingPreferencePage.ignore.upper.label"); //$NON-NLS-1$		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_UPPER, trueFalse, 20);		createSelectionDependency(master, slave);		label= PreferencesMessages.getString("SpellingPreferencePage.ignore.url.label"); //$NON-NLS-1$		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_URLS, trueFalse, 20);		createSelectionDependency(master, slave);		final Group engine= new Group(composite, SWT.NONE);		engine.setText(PreferencesMessages.getString("SpellingPreferencePage.preferences.engine")); //$NON-NLS-1$		layout= new GridLayout();		layout.numColumns= 4;		engine.setLayout(layout);		engine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));		label= PreferencesMessages.getString("SpellingPreferencePage.dictionary.label"); //$NON-NLS-1$		final Set locales= SpellCheckEngine.getAvailableLocales();		Combo combo= addComboBox(engine, label, PREF_SPELLING_LOCALE, getDictionaryCodes(locales), getDictionaryLabels(locales), 0);		combo.setEnabled(locales.size() > 1);				new Label(engine, SWT.NONE); // placeholder		label= PreferencesMessages.getString("SpellingPreferencePage.workspace.dictionary.label"); //$NON-NLS-1$		fDictionaryPath= addTextField(engine, label, PREF_SPELLING_USER_DICTIONARY, 0, 0);				Button button= new Button(engine, SWT.PUSH);		button.setText(PreferencesMessages.getString("SpellingPreferencePage.browse.label")); //$NON-NLS-1$		button.addSelectionListener(new SelectionAdapter() {			public void widgetSelected(final SelectionEvent event) {				handleBrowseButtonSelected();			}		});		button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));		SWTUtil.setButtonDimensionHint(button);				layout= new GridLayout();		layout.numColumns= 3;		Group advanced= new Group(composite, SWT.NONE);		advanced.setText(PreferencesMessages.getString("SpellingPreferencePage.preferences.advanced")); //$NON-NLS-1$		layout= new GridLayout();		layout.numColumns= 3;		advanced.setLayout(layout);				advanced.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));				label= PreferencesMessages.getString("SpellingPreferencePage.proposals.threshold"); //$NON-NLS-1$		Text text= addTextField(advanced, label, PREF_SPELLING_PROPOSAL_THRESHOLD, 0, 0);		text.setTextLimit(3);		GridData data= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);		data.widthHint= converter.convertWidthInCharsToPixels(4);		text.setLayoutData(data);				label= PreferencesMessages.getString("SpellingPreferencePage.enable.contentassist.label"); //$NON-NLS-1$		addCheckBox(advanced, label, PREF_SPELLING_ENABLE_CONTENTASSIST, trueFalse, 0);		return composite;	}