1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

Use the formatter line length for margin.

There is a similar change in JDT:
https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=6d5249a7460d4eadb7933705626efb5fbb168d42
This commit is contained in:
Sergey Prigogin 2015-08-03 11:38:08 -07:00
parent 93b7f29f9d
commit 566dc53c92

View file

@ -2540,6 +2540,14 @@ public class CEditor extends TextEditor implements ICEditor, ISelectionChangedLi
support.setCharacterPairMatcher(fBracketMatcher);
support.setMatchingCharacterPainterPreferenceKeys(MATCHING_BRACKETS, MATCHING_BRACKETS_COLOR);
((CSourceViewerDecorationSupport) support).setInactiveCodePainterPreferenceKeys(INACTIVE_CODE_ENABLE, INACTIVE_CODE_COLOR);
// The base class will have already called setMarginPainterPreferenceKeys. We override it
// here with more specific values for the C/C++ editor. Note that this needs to go after
// the call to super since the last invocation wins.
support.setMarginPainterPreferenceKeys(
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN,
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR,
DefaultCodeFormatterConstants.FORMATTER_LINE_SPLIT);
}
/**