final Set locales= SpellCheckEngine.getAvailableLocales();
final Set locales= SpellCheckEngine.getSupportedLocales();
	protected Control createContents(final Composite parent) {		Composite composite= new Composite(parent, SWT.NONE);		composite.setLayout(new GridLayout());		List allControls= new ArrayList();		final PixelConverter converter= new PixelConverter(parent);		final String[] trueFalse= new String[] { IPreferenceStore.TRUE, IPreferenceStore.FALSE };		Group user= new Group(composite, SWT.NONE);		user.setText(PreferencesMessages.SpellingPreferencePage_preferences_user); 		user.setLayout(new GridLayout());				user.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));		allControls.add(user);		String label= PreferencesMessages.SpellingPreferencePage_ignore_digits_label; 		Control slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_DIGITS, trueFalse, 0);		allControls.add(slave);		label= PreferencesMessages.SpellingPreferencePage_ignore_mixed_label; 		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_MIXED, trueFalse, 0);		allControls.add(slave);		label= PreferencesMessages.SpellingPreferencePage_ignore_sentence_label; 		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_SENTENCE, trueFalse, 0);		allControls.add(slave);		label= PreferencesMessages.SpellingPreferencePage_ignore_upper_label; 		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_UPPER, trueFalse, 0);		allControls.add(slave);		label= PreferencesMessages.SpellingPreferencePage_ignore_url_label; 		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_URLS, trueFalse, 0);		allControls.add(slave);				label= PreferencesMessages.SpellingPreferencePage_ignore_non_letters_label; 		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_NON_LETTERS, trueFalse, 0);		allControls.add(slave);				label= PreferencesMessages.SpellingPreferencePage_ignore_single_letters_label; 		slave= addCheckBox(user, label, PREF_SPELLING_IGNORE_SINGLE_LETTERS, trueFalse, 0);		allControls.add(slave);		final Group engine= new Group(composite, SWT.NONE);		engine.setText(PreferencesMessages.SpellingPreferencePage_preferences_engine); 		engine.setLayout(new GridLayout(4, false));		engine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));		allControls.add(engine);		label= PreferencesMessages.SpellingPreferencePage_dictionary_label; 		final Set locales= SpellCheckEngine.getAvailableLocales();		Combo combo= addComboBox(engine, label, PREF_SPELLING_LOCALE, getDictionaryCodes(locales), getDictionaryLabels(locales), 0);		combo.setEnabled(locales.size() > 1);		allControls.add(combo);		allControls.add(fLabels.get(combo));				new Label(engine, SWT.NONE); // placeholder		label= PreferencesMessages.SpellingPreferencePage_workspace_dictionary_label; 		fDictionaryPath= addTextField(engine, label, PREF_SPELLING_USER_DICTIONARY, 0, 0);		GridData gd= (GridData) fDictionaryPath.getLayoutData();		gd.grabExcessHorizontalSpace= true;		gd.widthHint= converter.convertWidthInCharsToPixels(40);		allControls.add(fDictionaryPath);		allControls.add(fLabels.get(fDictionaryPath));				Button button= new Button(engine, SWT.PUSH);		button.setText(PreferencesMessages.SpellingPreferencePage_browse_label); 		button.addSelectionListener(new SelectionAdapter() {			public void widgetSelected(final SelectionEvent event) {				handleBrowseButtonSelected();			}		});		button.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));		SWTUtil.setButtonDimensionHint(button);		allControls.add(button);				Group advanced= new Group(composite, SWT.NONE);		advanced.setText(PreferencesMessages.SpellingPreferencePage_preferences_advanced); 		advanced.setLayout(new GridLayout(3, false));		advanced.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));		allControls.add(advanced);				label= PreferencesMessages.SpellingPreferencePage_proposals_threshold; 		Text text= addTextField(advanced, label, PREF_SPELLING_PROPOSAL_THRESHOLD, 0, 0);		text.setTextLimit(3);		gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);		gd.widthHint= converter.convertWidthInCharsToPixels(4);		text.setLayoutData(gd);		allControls.add(text);		allControls.add(fLabels.get(text));				label= PreferencesMessages.SpellingPreferencePage_enable_contentassist_label; 		button= addCheckBox(advanced, label, PREF_SPELLING_ENABLE_CONTENTASSIST, trueFalse, 0);		allControls.add(button);		fAllControls= (Control[]) allControls.toArray(new Control[allControls.size()]);				PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.JAVA_EDITOR_PREFERENCE_PAGE);		return composite;	}