Bug 6969 NPE in code formatter preference page
20011206 Open the code formatter preference page Go to the style tab Go to the number of spaces... field Backspace until the field is empty NPE
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java
String number= textControl.getText();
		IStatus status= validatePositiveNumber(number);
		if (!status.matches(IStatus.ERROR)) {
			fWorkingValues.put(key, number);
		}
		if (PREF_TAB_SIZE.equals(key)) {
			fSourceViewer.getTextWidget().setTabs(Integer.parseInt(number));
		}		
		updateStatus(status);
		updatePreview();
	}
		
	
	/*
	 * @see IPreferencePage#performOk()
	 */
	public boolean performOk() {
		String[] allKeys= getAllKeys();
		
		
		Hashtable actualOptions= JavaCore.getOptions();
		IPreferenceStore store= getPreferenceStore();
		for (int i= 0; i < allKeys.length; i++) {
			String key= allKeys[i];
			String val=  (String) fWorkingValues.get(key);
			actualOptions.put(key, val);
			store.setValue(key, val);
		}
		JavaCore.setOptions(actualOptions);
		return super.performOk();