Bug 75316 [preferences] Provide a generic way to update dependencies
I200409280800 On the spelling preference page, check to spell-check comments Click Restore defaults The nested checkboxes under "spell-check comments" remain enabled.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/SpellingConfigurationBlock.java
* @param master
	 *                   The master button that controls the state of the slave
	 * @param slave
	 *                   The slave control that is enabled only if the master is
	 *                   selected
	 */
	protected static void createSelectionDependency(final Button master, final Control slave) {
		master.addSelectionListener(new SelectionListener() {
			public void widgetDefaultSelected(SelectionEvent event) {
				
			}
			public void widgetSelected(SelectionEvent event) {
				slave.setEnabled(master.getSelection());
			}
		});
		slave.setEnabled(master.getSelection());
	}
	/**
	 * Returns the locale codes for the locale list.
	 * 
	 * @param locales
	 *                   The list of locales
	 * @return Array of locale codes for the list
	 */
	protected static String[] getDictionaryCodes(final Set locales) {
		int index= 0;
		Locale locale= null;
		final String[] codes= new String[locales.size()];
		for (final Iterator iterator= locales.iterator(); iterator.hasNext();) {
			locale= (Locale)iterator.next();