Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Text Editor: don't change StyledText by CSS. #1036

Merged
merged 2 commits into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2276,6 +2276,8 @@ private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) {
/** The width of the vertical ruler. */
protected static final int VERTICAL_RULER_WIDTH= 12;

private static final String DISABLE_CSS = "org.eclipse.e4.ui.css.disabled"; //$NON-NLS-1$
iloveeclipse marked this conversation as resolved.
Show resolved Hide resolved

/**
* The complete mapping between action definition IDs used by eclipse and StyledText actions.
*
Expand Down Expand Up @@ -3366,6 +3368,11 @@ 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);

// We're managing our appearance from our preferences. Disable CSS styling.
// The CSS engine does set the editor preferences on theme switches, so we
// will pick up changes.
fSourceViewer.getTextWidget().setData(DISABLE_CSS, Boolean.TRUE);
sratz marked this conversation as resolved.
Show resolved Hide resolved

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