View | Details | Raw Unified | Return to bug 28454
Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/text/java/JavaAutoIndentStrategy.java (-4 / +3 lines)
Lines 521-533 Link Here
521
521
522
	}
522
	}
523
523
524
	private static String createIndent(int level, boolean useSpaces) {
524
	private String createIndent(int level, boolean useSpaces) {
525
525
526
		StringBuffer buffer= new StringBuffer();
526
		StringBuffer buffer= new StringBuffer();
527
527
528
		if (useSpaces) {
528
		if (useSpaces) {
529
			int tabWidth= getPreferenceStore().getInt(PreferenceConstants.EDITOR_TAB_WIDTH);
529
			int width= level * getTabWidth();
530
			int width= level * tabWidth;
531
			for (int i= 0; i != width; ++i)
530
			for (int i= 0; i != width; ++i)
532
				buffer.append(' ');
531
				buffer.append(' ');
533
532
Lines 683-689 Link Here
683
	
682
	
684
	private int getTabWidth() {
683
	private int getTabWidth() {
685
		if (fTabWidth == -1)
684
		if (fTabWidth == -1)
686
			fTabWidth= JavaPlugin.getDefault().getPreferenceStore().getInt(PreferenceConstants.EDITOR_TAB_WIDTH);
685
			fTabWidth= Integer.parseInt(((String)JavaCore.getOptions().get(JavaCore.FORMATTER_TAB_SIZE))); 
687
		return fTabWidth;
686
		return fTabWidth;
688
	}
687
	}
689
	
688
	

Return to bug 28454