diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/FormatterModifyTabPage.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/FormatterModifyTabPage.java
index 1bdfd68..a4bfb99 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/FormatterModifyTabPage.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/FormatterModifyTabPage.java
@@ -192,8 +192,8 @@
 	public void updatePreview() {
 		if (previewViewer != null) {
 			FormatterPreviewUtils.updatePreview(previewViewer,
-					getPreviewContent(), dialog.getFormatterFactory(), dialog
-							.getPreferences());
+					getPreviewContent(), dialog.getFormatterFactory(),
+					dialog.getPreferences());
 		}
 	}
 
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/IFormatterControlManager.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/IFormatterControlManager.java
index 64685eb..f7b36e4 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/IFormatterControlManager.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/IFormatterControlManager.java
@@ -18,7 +18,7 @@
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Text;
 
-public interface IFormatterControlManager extends IPreferenceDelegate {
+public interface IFormatterControlManager extends IPreferenceDelegate<String> {
 
 	public interface IInitializeListener {
 		void initialize();
@@ -28,9 +28,9 @@
 
 	void removeInitializeListener(IInitializeListener listener);
 
-	Button createCheckbox(Composite parent, Object key, String text);
+	Button createCheckbox(Composite parent, String key, String text);
 
-	Button createCheckbox(Composite parent, Object key, String text, int hspan);
+	Button createCheckbox(Composite parent, String key, String text, int hspan);
 
 	/**
 	 * @param parent
@@ -40,12 +40,12 @@
 	 * @return
 	 * @deprecated
 	 */
-	Combo createCombo(Composite parent, Object key, String label, String[] items);
+	Combo createCombo(Composite parent, String key, String label, String[] items);
 
-	Combo createCombo(Composite parent, Object key, String label,
+	Combo createCombo(Composite parent, String key, String label,
 			String[] itemValues, String[] itemLabels);
 
-	Text createNumber(Composite parent, Object key, String label);
+	Text createNumber(Composite parent, String key, String label);
 
 	void enableControl(Control control, boolean enabled);
 
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterControlManager.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterControlManager.java
index 5220679..15f9da7 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterControlManager.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterControlManager.java
@@ -34,22 +34,22 @@
 public class FormatterControlManager implements IFormatterControlManager,
 		IStatusChangeListener {
 
-	private final IPreferenceDelegate delegate;
-	private final ControlBindingManager bindingManager;
+	private final IPreferenceDelegate<String> delegate;
+	private final ControlBindingManager<String> bindingManager;
 	private final IStatusChangeListener listener;
 
-	public FormatterControlManager(IPreferenceDelegate delegate,
+	public FormatterControlManager(IPreferenceDelegate<String> delegate,
 			IStatusChangeListener listener) {
 		this.delegate = delegate;
-		this.bindingManager = new ControlBindingManager(delegate, this);
+		this.bindingManager = new ControlBindingManager<String>(delegate, this);
 		this.listener = listener;
 	}
 
-	public Button createCheckbox(Composite parent, Object key, String text) {
+	public Button createCheckbox(Composite parent, String key, String text) {
 		return createCheckbox(parent, key, text, 1);
 	}
 
-	public Button createCheckbox(Composite parent, Object key, String text,
+	public Button createCheckbox(Composite parent, String key, String text,
 			int hspan) {
 		Button button = SWTFactory.createCheckButton(parent, text, null, false,
 				hspan);
@@ -57,7 +57,7 @@
 		return button;
 	}
 
-	public Combo createCombo(Composite parent, Object key, String label,
+	public Combo createCombo(Composite parent, String key, String label,
 			String[] items) {
 		final Label labelControl = SWTFactory.createLabel(parent, label, 1);
 		Combo combo = SWTFactory.createCombo(parent,
@@ -67,7 +67,7 @@
 		return combo;
 	}
 
-	public Combo createCombo(Composite parent, Object key, String label,
+	public Combo createCombo(Composite parent, String key, String label,
 			String[] itemValues, String[] itemLabels) {
 		final Label labelControl = SWTFactory.createLabel(parent, label, 1);
 		Combo combo = SWTFactory.createCombo(parent,
@@ -77,7 +77,7 @@
 		return combo;
 	}
 
-	public Text createNumber(Composite parent, Object key, String label) {
+	public Text createNumber(Composite parent, String key, String label) {
 		final Label labelControl = SWTFactory.createLabel(parent, label, 1);
 		Text text = SWTFactory.createText(parent, SWT.BORDER, 1,
 				Util.EMPTY_STRING);
@@ -137,19 +137,19 @@
 		}
 	}
 
-	public boolean getBoolean(Object key) {
+	public boolean getBoolean(String key) {
 		return delegate.getBoolean(key);
 	}
 
-	public String getString(Object key) {
+	public String getString(String key) {
 		return delegate.getString(key);
 	}
 
-	public void setBoolean(Object key, boolean value) {
+	public void setBoolean(String key, boolean value) {
 		delegate.setBoolean(key, value);
 	}
 
-	public void setString(Object key, String value) {
+	public void setString(String key, String value) {
 		delegate.setString(key, value);
 	}
 
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterDialogPreferences.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterDialogPreferences.java
index 4efaa2d..1523ef1 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterDialogPreferences.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/formatter/internal/FormatterDialogPreferences.java
@@ -18,24 +18,24 @@
 import org.eclipse.dltk.compiler.util.Util;
 import org.eclipse.dltk.ui.preferences.IPreferenceDelegate;
 
-public class FormatterDialogPreferences implements IPreferenceDelegate {
+public class FormatterDialogPreferences implements IPreferenceDelegate<String> {
 
 	private final Map<String, String> preferences = new HashMap<String, String>();
 
-	public String getString(Object key) {
+	public String getString(String key) {
 		final String value = preferences.get(key);
 		return value != null ? value : Util.EMPTY_STRING;
 	}
 
-	public boolean getBoolean(Object key) {
+	public boolean getBoolean(String key) {
 		return Boolean.valueOf(getString(key)).booleanValue();
 	}
 
-	public void setString(Object key, String value) {
-		preferences.put((String) key, value);
+	public void setString(String key, String value) {
+		preferences.put(key, value);
 	}
 
-	public void setBoolean(Object key, boolean value) {
+	public void setBoolean(String key, boolean value) {
 		setString(key, String.valueOf(value));
 	}
 
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractConfigurationBlock.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractConfigurationBlock.java
index f8afaa7..99b9e7b 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractConfigurationBlock.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractConfigurationBlock.java
@@ -23,9 +23,9 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.dltk.internal.corext.util.Messages;
-import org.eclipse.dltk.ui.dialogs.StatusInfo;
 import org.eclipse.dltk.internal.ui.dialogs.StatusUtil;
 import org.eclipse.dltk.internal.ui.preferences.ScrolledPageContent;
+import org.eclipse.dltk.ui.dialogs.StatusInfo;
 import org.eclipse.dltk.ui.util.PixelConverter;
 import org.eclipse.dltk.ui.util.SWTFactory;
 import org.eclipse.jface.dialogs.Dialog;
@@ -99,7 +99,7 @@
 		/** The preference setting for keeping no section open. */
 		private static final String __NONE = "__none"; //$NON-NLS-1$
 
-		private Set fSections = new HashSet();
+		private Set<ExpandableComposite> fSections = new HashSet<ExpandableComposite>();
 
 		private boolean fIsBeingManaged = false;
 
@@ -113,10 +113,9 @@
 				if (e.getState()) {
 					try {
 						fIsBeingManaged = true;
-						for (Iterator iter = fSections.iterator(); iter
-								.hasNext();) {
-							ExpandableComposite composite = (ExpandableComposite) iter
-									.next();
+						for (Iterator<ExpandableComposite> iter = fSections
+								.iterator(); iter.hasNext();) {
+							ExpandableComposite composite = iter.next();
 							if (composite != source)
 								composite.setExpanded(false);
 						}
@@ -124,8 +123,8 @@
 						fIsBeingManaged = false;
 					}
 					if (fLastOpenKey != null && fDialogSettingsStore != null)
-						fDialogSettingsStore.setValue(fLastOpenKey, source
-								.getText());
+						fDialogSettingsStore.setValue(fLastOpenKey,
+								source.getText());
 				} else {
 					if (!fIsBeingManaged && fLastOpenKey != null
 							&& fDialogSettingsStore != null)
@@ -179,8 +178,8 @@
 		 * composite within that, to ensure that expanding the sections will
 		 * always have enough space, unless there already is a
 		 * <code>ScrolledComposite</code> along the parent chain of
-		 * <code>parent</code>, in which case a normal <code>Composite</code>
-		 * is created.
+		 * <code>parent</code>, in which case a normal <code>Composite</code> is
+		 * created.
 		 * <p>
 		 * The receiver keeps a reference to the inner body composite, so that
 		 * new sections can be added via <code>createSection</code>.
@@ -254,7 +253,7 @@
 
 	private OverlayPreferenceStore fStore;
 
-	private Map fCheckBoxes = new HashMap();
+	private Map<Button, String> fCheckBoxes = new HashMap<Button, String>();
 
 	private ArrayList fRadioButtons = new ArrayList();
 
@@ -266,8 +265,7 @@
 
 		public void widgetSelected(SelectionEvent e) {
 			Button button = (Button) e.widget;
-			fStore.setValue((String) fCheckBoxes.get(button), button
-					.getSelection());
+			fStore.setValue(fCheckBoxes.get(button), button.getSelection());
 		}
 	};
 
@@ -300,12 +298,12 @@
 		}
 	};
 
-	private Map fTextFields = new HashMap();
+	private Map<Text, String> fTextFields = new HashMap<Text, String>();
 
 	private ModifyListener fTextFieldListener = new ModifyListener() {
 		public void modifyText(ModifyEvent e) {
 			Text text = (Text) e.widget;
-			fStore.setValue((String) fTextFields.get(text), text.getText());
+			fStore.setValue(fTextFields.get(text), text.getText());
 		}
 	};
 
@@ -328,7 +326,7 @@
 	private org.eclipse.dltk.ui.dialogs.StatusInfo fStatus;
 
 	private final PreferencePage fMainPage;
-	
+
 	protected Shell getShell() {
 		return fMainPage.getShell();
 	}
@@ -469,10 +467,10 @@
 	}
 
 	/**
-	 * Returns an array of size 2: - first element is of type <code>Label</code> -
-	 * second element is of type <code>Text</code> Use
-	 * <code>getLabelControl</code> and <code>getTextControl</code> to get
-	 * the 2 controls.
+	 * Returns an array of size 2: - first element is of type <code>Label</code>
+	 * - second element is of type <code>Text</code> Use
+	 * <code>getLabelControl</code> and <code>getTextControl</code> to get the 2
+	 * controls.
 	 * 
 	 * @param composite
 	 *            the parent composite
@@ -485,8 +483,7 @@
 	 * @param indentation
 	 *            the field's indentation
 	 * @param isNumber
-	 *            <code>true</code> iff this text field is used to edit a
-	 *            number
+	 *            <code>true</code> iff this text field is used to edit a number
 	 * @return the controls added
 	 */
 	protected Control[] addLabelledTextField(Composite composite, String label,
@@ -643,23 +640,18 @@
 	private IStatus validatePositiveNumber(String number) {
 		StatusInfo status = new StatusInfo();
 		if (number.length() == 0) {
-			status
-					.setError(PreferencesMessages.DLTKEditorPreferencePage_empty_input);
+			status.setError(PreferencesMessages.DLTKEditorPreferencePage_empty_input);
 		} else {
 			try {
 				int value = Integer.parseInt(number);
 				if (value < 0)
-					status
-							.setError(Messages
-									.format(
-											PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
-											number));
+					status.setError(Messages
+							.format(PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
+									number));
 			} catch (NumberFormatException e) {
-				status
-						.setError(Messages
-								.format(
-										PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
-										number));
+				status.setError(Messages
+						.format(PreferencesMessages.DLTKEditorPreferencePage_invalid_input,
+								number));
 			}
 		}
 		return status;
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractOptionsBlock.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractOptionsBlock.java
index dbe05ed..2d33a1f 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractOptionsBlock.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/AbstractOptionsBlock.java
@@ -21,18 +21,19 @@
 import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
 
 public abstract class AbstractOptionsBlock extends OptionsConfigurationBlock
-		implements IPreferenceDelegate {
+		implements IPreferenceDelegate<PreferenceKey> {
 
 	private final List<PreferenceKey> keys = new ArrayList<PreferenceKey>();
 
-	private ControlBindingManager bindManager;
+	private ControlBindingManager<PreferenceKey> bindManager;
 
 	public AbstractOptionsBlock(IStatusChangeListener context,
 			IProject project, PreferenceKey[] allKeys,
 			IWorkbenchPreferenceContainer container) {
 		super(context, project, allKeys, container);
 
-		this.bindManager = new ControlBindingManager(this, context);
+		this.bindManager = new ControlBindingManager<PreferenceKey>(this,
+				context);
 	}
 
 	public Control createContents(Composite parent) {
@@ -189,8 +190,8 @@
 	 * org.eclipse.dltk.ui.preferences.IPreferenceDelegate#getBoolean(java.lang
 	 * .Object)
 	 */
-	public final boolean getBoolean(Object key) {
-		return getBooleanValue((PreferenceKey) key);
+	public final boolean getBoolean(PreferenceKey key) {
+		return getBooleanValue(key);
 	}
 
 	/*
@@ -198,8 +199,8 @@
 	 * org.eclipse.dltk.ui.preferences.IPreferenceDelegate#getString(java.lang
 	 * .Object)
 	 */
-	public final String getString(Object key) {
-		return getValue((PreferenceKey) key);
+	public final String getString(PreferenceKey key) {
+		return getValue(key);
 	}
 
 	/*
@@ -207,8 +208,8 @@
 	 * org.eclipse.dltk.ui.preferences.IPreferenceDelegate#setBoolean(java.lang
 	 * .Object, boolean)
 	 */
-	public final void setBoolean(Object key, boolean value) {
-		super.setValue((PreferenceKey) key, value);
+	public final void setBoolean(PreferenceKey key, boolean value) {
+		super.setValue(key, value);
 	}
 
 	/*
@@ -216,8 +217,8 @@
 	 * org.eclipse.dltk.ui.preferences.IPreferenceDelegate#setString(java.lang
 	 * .Object, java.lang.String)
 	 */
-	public final void setString(Object key, String value) {
-		setValue((PreferenceKey) key, value);
+	public final void setString(PreferenceKey key, String value) {
+		setValue(key, value);
 	}
 
 	protected final IProject getProject() {
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ControlBindingManager.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ControlBindingManager.java
index 6fe5a28..b904f59 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ControlBindingManager.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ControlBindingManager.java
@@ -24,20 +24,20 @@
 
 /**
  */
-public class ControlBindingManager {
-	private IStatusChangeListener changeListener;
+public class ControlBindingManager<KEY> {
+	final IStatusChangeListener changeListener;
 
-	private Map checkBoxControls;
-	private Map comboControls;
-	private final Map comboValueProviders = new IdentityHashMap();
+	private Map<Button, KEY> checkBoxControls;
+	private Map<Combo, KEY> comboControls;
+	private final Map<Combo, IComboSelectedValueProvider> comboValueProviders = new IdentityHashMap<Combo, IComboSelectedValueProvider>();
 
 	private DependencyManager dependencyManager;
 
-	private IPreferenceDelegate preferenceDelegate;
-	private Map radioControls;
+	final IPreferenceDelegate<KEY> preferenceDelegate;
+	private Map<Button, KEY> radioControls;
 
-	private Map textControls;
-	private final Map textTransformers = new HashMap();
+	private Map<Text, KEY> textControls;
+	private final Map<Text, ITextConverter> textTransformers = new HashMap<Text, ITextConverter>();
 	private ValidatorManager validatorManager;
 
 	public static class DependencyMode {
@@ -51,12 +51,12 @@
 		int indexOf(String value);
 	}
 
-	public ControlBindingManager(IPreferenceDelegate delegate,
+	public ControlBindingManager(IPreferenceDelegate<KEY> delegate,
 			IStatusChangeListener listener) {
-		this.checkBoxControls = new HashMap();
-		this.comboControls = new HashMap();
-		this.textControls = new HashMap();
-		this.radioControls = new HashMap();
+		this.checkBoxControls = new HashMap<Button, KEY>();
+		this.comboControls = new HashMap<Combo, KEY>();
+		this.textControls = new HashMap<Text, KEY>();
+		this.radioControls = new HashMap<Button, KEY>();
 
 		this.validatorManager = new ValidatorManager();
 		this.dependencyManager = new DependencyManager();
@@ -65,7 +65,7 @@
 		this.preferenceDelegate = delegate;
 	}
 
-	public void bindControl(final Combo combo, final Object key) {
+	public void bindControl(final Combo combo, final KEY key) {
 		bindControl(combo, key, new IComboSelectedValueProvider() {
 
 			public String getValueAt(int index) {
@@ -85,7 +85,7 @@
 		});
 	}
 
-	public void bindControl(Combo combo, Object key, final String[] itemValues) {
+	public void bindControl(Combo combo, KEY key, final String[] itemValues) {
 		bindControl(combo, key, new IComboSelectedValueProvider() {
 			public String getValueAt(int index) {
 				return itemValues[index];
@@ -102,7 +102,7 @@
 		});
 	}
 
-	public void bindControl(final Combo combo, final Object key,
+	public void bindControl(final Combo combo, final KEY key,
 			final IComboSelectedValueProvider itemValueProvider) {
 		if (key != null) {
 			comboControls.put(combo, key);
@@ -116,16 +116,15 @@
 
 			public void widgetSelected(SelectionEvent e) {
 				int index = combo.getSelectionIndex();
-				preferenceDelegate.setString(key, itemValueProvider
-						.getValueAt(index));
+				preferenceDelegate.setString(key,
+						itemValueProvider.getValueAt(index));
 
 				changeListener.statusChanged(StatusInfo.OK_STATUS);
 			}
 		});
 	}
 
-	public void bindControl(final Button button, final Object key,
-			Control[] slaves) {
+	public void bindControl(final Button button, final KEY key, Control[] slaves) {
 		if (key != null) {
 			checkBoxControls.put(button, key);
 		}
@@ -146,12 +145,12 @@
 		});
 	}
 
-	public void bindControl(final Text text, final Object key,
+	public void bindControl(final Text text, final KEY key,
 			IFieldValidator validator) {
 		bindControl(text, key, validator, null);
 	}
 
-	public void bindControl(final Text text, final Object key,
+	public void bindControl(final Text text, final KEY key,
 			IFieldValidator validator, final ITextConverter transformer) {
 		if (key != null) {
 			if (textControls.containsKey(key)) {
@@ -193,7 +192,7 @@
 		});
 	}
 
-	public void bindRadioControl(final Button button, final String key,
+	public void bindRadioControl(final Button button, final KEY key,
 			final Object enable, Control[] dependencies) {
 		if (key != null) {
 			radioControls.put(button, key);
@@ -227,9 +226,9 @@
 
 	public IStatus getStatus() {
 		IStatus status = StatusInfo.OK_STATUS;
-		Iterator iter = textControls.keySet().iterator();
+		Iterator<Text> iter = textControls.keySet().iterator();
 		while (iter.hasNext()) {
-			IStatus s = validateText((Text) iter.next());
+			IStatus s = validateText(iter.next());
 			status = StatusUtil.getMoreSevere(s, status);
 		}
 
@@ -247,9 +246,9 @@
 
 	protected void updateStatus(IStatus status) {
 		if (!status.matches(IStatus.ERROR)) {
-			Iterator iter = textControls.keySet().iterator();
+			Iterator<Text> iter = textControls.keySet().iterator();
 			while (iter.hasNext()) {
-				IStatus s = validateText((Text) iter.next());
+				IStatus s = validateText(iter.next());
 				status = StatusUtil.getMoreSevere(s, status);
 			}
 		}
@@ -258,21 +257,20 @@
 	}
 
 	private void initCheckBoxes() {
-		Iterator it = checkBoxControls.keySet().iterator();
+		Iterator<Button> it = checkBoxControls.keySet().iterator();
 		while (it.hasNext()) {
-			final Button button = (Button) it.next();
-			final Object key = checkBoxControls.get(button);
+			final Button button = it.next();
+			final KEY key = checkBoxControls.get(button);
 			button.setSelection(preferenceDelegate.getBoolean(key));
 		}
 	}
 
 	private void initCombos() {
-		for (Iterator it = comboControls.entrySet().iterator(); it.hasNext();) {
-			final Map.Entry entry = (Map.Entry) it.next();
-			final Combo combo = (Combo) entry.getKey();
-			final Object key = entry.getValue();
+		for (final Map.Entry<Combo, KEY> entry : comboControls.entrySet()) {
+			final Combo combo = entry.getKey();
+			final KEY key = entry.getValue();
 			final String value = preferenceDelegate.getString(key);
-			final IComboSelectedValueProvider valueProvider = (IComboSelectedValueProvider) comboValueProviders
+			final IComboSelectedValueProvider valueProvider = comboValueProviders
 					.get(combo);
 			if (valueProvider != null) {
 				int index = valueProvider.indexOf(value);
@@ -286,10 +284,10 @@
 	}
 
 	private void initRadioControls() {
-		Iterator it = radioControls.keySet().iterator();
+		Iterator<Button> it = radioControls.keySet().iterator();
 		while (it.hasNext()) {
-			Button button = (Button) it.next();
-			Object key = radioControls.get(button);
+			Button button = it.next();
+			KEY key = radioControls.get(button);
 
 			String enable = (String) button.getData();
 			String value = preferenceDelegate.getString(key);
@@ -303,13 +301,12 @@
 	}
 
 	private void initTextControls() {
-		Iterator it = textControls.keySet().iterator();
+		Iterator<Text> it = textControls.keySet().iterator();
 		while (it.hasNext()) {
-			final Text text = (Text) it.next();
-			final Object key = textControls.get(text);
+			final Text text = it.next();
+			final KEY key = textControls.get(text);
 			String value = preferenceDelegate.getString(key);
-			final ITextConverter textTransformer = (ITextConverter) textTransformers
-					.get(text);
+			final ITextConverter textTransformer = textTransformers.get(text);
 			if (textTransformer != null) {
 				value = textTransformer.convertPreference(value);
 			}
@@ -330,7 +327,7 @@
 	/**
      */
 	class DependencyManager {
-		private List masterSlaveListeners = new ArrayList();
+		private List<SelectionListener> masterSlaveListeners = new ArrayList<SelectionListener>();
 
 		public void createDependency(final Button master,
 				final Control[] slaves, final DependencyMode mode) {
@@ -359,29 +356,26 @@
 		}
 
 		public void initialize() {
-			Iterator it = masterSlaveListeners.iterator();
+			Iterator<SelectionListener> it = masterSlaveListeners.iterator();
 			while (it.hasNext()) {
-				((SelectionListener) it.next()).widgetSelected(null);
+				it.next().widgetSelected(null);
 			}
 		}
 	}
 
-	/**
-     */
-	class ValidatorManager {
-
-		private Map map = new HashMap();
+	@SuppressWarnings("serial")
+	static class ValidatorManager extends HashMap<Control, IFieldValidator> {
 
 		public IFieldValidator getValidator(Control control) {
-			return (IFieldValidator) map.get(control);
+			return get(control);
 		}
 
 		public void registerValidator(Text text, IFieldValidator validator) {
-			map.put(text, validator);
+			put(text, validator);
 		}
 
 		public void unregisterValidator(Text text) {
-			map.remove(text);
+			remove(text);
 		}
 
 	}
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/IPreferenceDelegate.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/IPreferenceDelegate.java
index 1d464bb..b5c3d24 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/IPreferenceDelegate.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/IPreferenceDelegate.java
@@ -16,25 +16,25 @@
  * @see AbstractOptionsBlock
  * @see ImprovedAbstractConfigurationBlock
  */
-public interface IPreferenceDelegate {
+public interface IPreferenceDelegate<KEY> {
 
 	/**
 	 * Returns the string value for the given preference key
 	 */
-	String getString(Object key);
+	String getString(KEY key);
 
 	/**
 	 * Returns the boolean value for the given preference key
 	 */
-	boolean getBoolean(Object key);
+	boolean getBoolean(KEY key);
 
 	/**
 	 * Set a boolean preference value
 	 */
-	void setBoolean(Object key, boolean value);
+	void setBoolean(KEY key, boolean value);
 
 	/**
 	 * Set a string preference value
 	 */
-	void setString(Object key, String value);
+	void setString(KEY key, String value);
 }
diff --git a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ImprovedAbstractConfigurationBlock.java b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ImprovedAbstractConfigurationBlock.java
index 3bcec55..5e28a81 100644
--- a/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ImprovedAbstractConfigurationBlock.java
+++ b/core/plugins/org.eclipse.dltk.ui/src/org/eclipse/dltk/ui/preferences/ImprovedAbstractConfigurationBlock.java
@@ -28,19 +28,20 @@
  * Configures preferences.
  */
 public abstract class ImprovedAbstractConfigurationBlock implements
-		IPreferenceConfigurationBlock, IPreferenceDelegate {
+		IPreferenceConfigurationBlock, IPreferenceDelegate<String> {
 
 	private PreferencePage page;
 	private OverlayPreferenceStore store;
 
-	private ControlBindingManager bindManager;
+	private final ControlBindingManager<String> bindManager;
 
 	public ImprovedAbstractConfigurationBlock(OverlayPreferenceStore store,
 			final PreferencePage page) {
 		this.page = page;
 		this.store = store;
 
-		bindManager = new ControlBindingManager(this, getStatusListener());
+		bindManager = new ControlBindingManager<String>(this,
+				getStatusListener());
 		addOverlayKeys();
 	}
 
@@ -60,20 +61,20 @@
 		// do nothing
 	}
 
-	public boolean getBoolean(Object key) {
-		return store.getBoolean((String) key);
+	public boolean getBoolean(String key) {
+		return store.getBoolean(key);
 	}
 
-	public String getString(Object key) {
-		return store.getString((String) key);
+	public String getString(String key) {
+		return store.getString(key);
 	}
 
-	public void setBoolean(Object key, boolean value) {
-		store.setValue((String) key, value);
+	public void setBoolean(String key, boolean value) {
+		store.setValue(key, value);
 	}
 
-	public void setString(Object key, String value) {
-		store.setValue((String) key, value);
+	public void setString(String key, String value) {
+		store.setValue(key, value);
 	}
 
 	/**
