use of org.eclipse.wst.css.core.internal.format.FormatProcessorCSS in project webtools.sourceediting by eclipse.
the class StructuredTextViewerConfigurationCSS method getContentFormatter.
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
IContentFormatter formatter = super.getContentFormatter(sourceViewer);
// generic one
if (!(formatter instanceof MultiPassContentFormatter))
formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), ICSSPartitions.STYLE);
((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new FormatProcessorCSS()));
return formatter;
}
use of org.eclipse.wst.css.core.internal.format.FormatProcessorCSS in project webtools.sourceediting by eclipse.
the class TestFormatProcessorCSS method setUp.
protected void setUp() throws Exception {
// set up preferences
Preferences prefs = CSSCorePlugin.getDefault().getPluginPreferences();
fOldClearBlankLinesPref = prefs.getBoolean(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES);
fOldMaxLineWidthPref = prefs.getInt(CSSCorePreferenceNames.LINE_WIDTH);
fOldIndentationCharPref = prefs.getString(CSSCorePreferenceNames.INDENTATION_CHAR);
fOldIndentationSizePref = prefs.getInt(CSSCorePreferenceNames.INDENTATION_SIZE);
prefs.setValue(CSSCorePreferenceNames.CLEAR_ALL_BLANK_LINES, false);
prefs.setValue(CSSCorePreferenceNames.LINE_WIDTH, 72);
prefs.setValue(CSSCorePreferenceNames.INDENTATION_CHAR, CSSCorePreferenceNames.TAB);
prefs.setValue(CSSCorePreferenceNames.INDENTATION_SIZE, 1);
formatProcessor = new FormatProcessorCSS();
fStringCompareUtil = new StringCompareUtil();
}
Aggregations