Bug 3348 DCR: Code formatter enhancement (1GIYHQR)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterPreferencePage.java
private static final String CLEAR_ALL= "clear all";
	private static final String PRESERVE_ONE= "preserve one";
	
	private static String[] getAllKeys() {
		return new String[] {
			PREF_NEWLINE_OPENING_BRACES, PREF_NEWLINE_CONTROL_STATEMENT, PREF_NEWLINE_CLEAR_ALL,
			PREF_NEWLINE_ELSE_IF, PREF_NEWLINE_EMPTY_BLOCK, PREF_LINE_SPLIT,
			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));
	}
	
	
	private static int getIntValue(String string, int dflt) {
		try {
			return Integer.parseInt(string);