Bug 32033 Spaces for TAB preference is confusing
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java
smartIndentAfterBlockDelimiter(d, c);
		else if (c.text.length() > 1 && getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SMART_PASTE))
			smartPaste(d, c);
			
		clearCachedValues();
	}
	
	private static IPreferenceStore getPreferenceStore() {
		return JavaPlugin.getDefault().getPreferenceStore();
	}
	
	private boolean useSpaces() {
		if (fUseSpaces == null)
			fUseSpaces= new Boolean(JavaCore.SPACE.equals(JavaCore.getOptions().get(JavaCore.FORMATTER_TAB_CHAR)));
		return fUseSpaces.booleanValue();
	}
	
	private int getTabWidth() {
		if (fTabWidth == -1)
			
			fTabWidth= Integer.parseInt(((String)JavaCore.getOptions().get(JavaCore.FORMATTER_TAB_SIZE))); 
		return fTabWidth;
	}
	
	private void clearCachedValues() {
		fTabWidth= -1;
		fUseSpaces= null;
	}
}