Skip to content

Commit

Permalink
Abstract Text Editor: don't change StyledText by CSS.
Browse files Browse the repository at this point in the history
Fix for eclipse-platform#869

Change-Id: Ib739afdc301c4e37dcbbe37ef063ed32cb7f53d7
  • Loading branch information
DenisUngemach authored and vogella committed Dec 1, 2023
1 parent 6854743 commit d84f6fd
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,13 @@ private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
/** The width of the vertical ruler. */
protected static final int VERTICAL_RULER_WIDTH= 12;

/*
* The colors of AbstractTextEditor can be configured by the "Text Editors"
* preferences. This color configuration will be changed by theming. This means
* no need for CSS basecolors here.
*/
private static final String DISABLE_CSS = "org.eclipse.e4.ui.css.disabled"; //$NON-NLS-1$

/**
* The complete mapping between action definition IDs used by eclipse and StyledText actions.
*
Expand Down Expand Up @@ -3366,6 +3373,8 @@ public void createPartControl(Composite parent) {
int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION;
fSourceViewer= createSourceViewer(parent, fVerticalRuler, styles);

fSourceViewer.getTextWidget().setData(DISABLE_CSS, Boolean.TRUE);

if (fConfiguration == null)
fConfiguration= new SourceViewerConfiguration();
fSourceViewer.configure(fConfiguration);
Expand Down

0 comments on commit d84f6fd

Please sign in to comment.