Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 71271 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/html/core/internal/format/HTMLFormatProcessorImpl.java (-5 / +5 lines)
Lines 41-58 Link Here
41
				((IStructuredFormatPreferencesXML) fFormatPreferences).setSplitMultiAttrs(preferences.getBoolean(HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
41
				((IStructuredFormatPreferencesXML) fFormatPreferences).setSplitMultiAttrs(preferences.getBoolean(HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
42
				fFormatPreferences.setClearAllBlankLines(preferences.getBoolean(HTMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
42
				fFormatPreferences.setClearAllBlankLines(preferences.getBoolean(HTMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
43
43
44
				String indentChar = " "; //$NON-NLS-1$
44
				char indentChar = ' ';
45
				String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
45
				String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
46
				if (HTMLCorePreferenceNames.TAB.equals(indentCharPref)) {
46
				if (HTMLCorePreferenceNames.TAB.equals(indentCharPref)) {
47
					indentChar = "\t"; //$NON-NLS-1$
47
					indentChar = '\t';
48
				}
48
				}
49
				int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
49
				int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
50
50
51
				String indent = ""; //$NON-NLS-1$
51
				StringBuffer indent = new StringBuffer();
52
				for (int i = 0; i < indentationWidth; i++) {
52
				for (int i = 0; i < indentationWidth; i++) {
53
					indent += indentChar;
53
					indent.append(indentChar);
54
				}
54
				}
55
				fFormatPreferences.setIndent(indent);
55
				fFormatPreferences.setIndent(indent.toString());
56
			}
56
			}
57
		}
57
		}
58
58
(-)src/org/eclipse/wst/html/core/internal/format/HTMLFormatter.java (-5 / +5 lines)
Lines 616-633 Link Here
616
				((IStructuredFormatPreferencesXML) fFormatPreferences).setSplitMultiAttrs(preferences.getBoolean(HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
616
				((IStructuredFormatPreferencesXML) fFormatPreferences).setSplitMultiAttrs(preferences.getBoolean(HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
617
				fFormatPreferences.setClearAllBlankLines(preferences.getBoolean(HTMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
617
				fFormatPreferences.setClearAllBlankLines(preferences.getBoolean(HTMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
618
618
619
				String indentChar = " "; //$NON-NLS-1$
619
				char indentChar = ' ';
620
				String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
620
				String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
621
				if (HTMLCorePreferenceNames.TAB.equals(indentCharPref)) {
621
				if (HTMLCorePreferenceNames.TAB.equals(indentCharPref)) {
622
					indentChar = "\t"; //$NON-NLS-1$
622
					indentChar = '\t';
623
				}
623
				}
624
				int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
624
				int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
625
625
626
				String indent = ""; //$NON-NLS-1$
626
				StringBuffer indent = new StringBuffer();
627
				for (int i = 0; i < indentationWidth; i++) {
627
				for (int i = 0; i < indentationWidth; i++) {
628
					indent += indentChar;
628
					indent.append(indentChar);
629
				}
629
				}
630
				fFormatPreferences.setIndent(indent);
630
				fFormatPreferences.setIndent(indent.toString());
631
			}
631
			}
632
		}
632
		}
633
633
(-)src/org/eclipse/wst/html/core/internal/format/HTMLFormatterFactory.java (-5 / +5 lines)
Lines 89-106 Link Here
89
				fFormatPreferences.setSplitMultiAttrs(preferences.getBoolean(HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
89
				fFormatPreferences.setSplitMultiAttrs(preferences.getBoolean(HTMLCorePreferenceNames.SPLIT_MULTI_ATTRS));
90
				fFormatPreferences.setClearAllBlankLines(preferences.getBoolean(HTMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
90
				fFormatPreferences.setClearAllBlankLines(preferences.getBoolean(HTMLCorePreferenceNames.CLEAR_ALL_BLANK_LINES));
91
91
92
				String indentChar = " "; //$NON-NLS-1$
92
				char indentChar = ' ';
93
				String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
93
				String indentCharPref = preferences.getString(HTMLCorePreferenceNames.INDENTATION_CHAR);
94
				if (HTMLCorePreferenceNames.TAB.equals(indentCharPref)) {
94
				if (HTMLCorePreferenceNames.TAB.equals(indentCharPref)) {
95
					indentChar = "\t"; //$NON-NLS-1$
95
					indentChar = '\t';
96
				}
96
				}
97
				int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
97
				int indentationWidth = preferences.getInt(HTMLCorePreferenceNames.INDENTATION_SIZE);
98
98
99
				String indent = ""; //$NON-NLS-1$
99
				StringBuffer indent = new StringBuffer();
100
				for (int i = 0; i < indentationWidth; i++) {
100
				for (int i = 0; i < indentationWidth; i++) {
101
					indent += indentChar;
101
					indent.append(indentChar);
102
				}
102
				}
103
				fFormatPreferences.setIndent(indent);
103
				fFormatPreferences.setIndent(indent.toString());
104
			}
104
			}
105
		}
105
		}
106
106

Return to bug 71271