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
PREF_STYLE_COMPACT_ASSIGNEMENT, PREF_TAB_CHAR, PREF_TAB_SIZE
		};	
	}
	
	/**
	 * Gets the currently configured tab size
	 */
	public static int getTabSize() {
		String string= (String) JavaCore.getOptions().get(PREF_TAB_SIZE);
		return getIntValue(string, 4);
	}
	
	/**
	 * Gets the current compating assignement configuration
	 */	
	public static boolean isCompactingAssignment() {
		return COMPACT.equals(JavaCore.getOptions().get(PREF_STYLE_COMPACT_ASSIGNEMENT));
	}
	
	/**
	 * Gets the current compating assignement configuration
	 */	
	public static boolean useSpaces() {
		return SPACE.equals(JavaCore.getOptions().get(PREF_TAB_CHAR));
	}	
	
	
	private static int getIntValue(String string, int dflt) {
		try {
			return Integer.parseInt(string);