Skip to content

Commit d84f6fd

Browse files
DenisUngemachvogella
authored andcommitted
Abstract Text Editor: don't change StyledText by CSS.
Fix for #869 Change-Id: Ib739afdc301c4e37dcbbe37ef063ed32cb7f53d7
1 parent 6854743 commit d84f6fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,13 @@ private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
22762276
/** The width of the vertical ruler. */
22772277
protected static final int VERTICAL_RULER_WIDTH= 12;
22782278

2279+
/*
2280+
* The colors of AbstractTextEditor can be configured by the "Text Editors"
2281+
* preferences. This color configuration will be changed by theming. This means
2282+
* no need for CSS basecolors here.
2283+
*/
2284+
private static final String DISABLE_CSS = "org.eclipse.e4.ui.css.disabled"; //$NON-NLS-1$
2285+
22792286
/**
22802287
* The complete mapping between action definition IDs used by eclipse and StyledText actions.
22812288
*
@@ -3366,6 +3373,8 @@ public void createPartControl(Composite parent) {
33663373
int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
33673374
fSourceViewer= createSourceViewer(parent, fVerticalRuler, styles);
33683375

3376+
fSourceViewer.getTextWidget().setData(DISABLE_CSS, Boolean.TRUE);
3377+
33693378
if (fConfiguration == null)
33703379
fConfiguration= new SourceViewerConfiguration();
33713380
fSourceViewer.configure(fConfiguration);

0 commit comments

Comments
 (0)