RIDER-81825 fold new line symbols in sandbox editors

GitOrigin-RevId: 41002ca4327321340892f941d754c05a12ccf416
This commit is contained in:
Ivan.Yarkov
2023-10-18 18:17:48 +03:00
committed by intellij-monorepo-bot
parent 01b9d2dbc0
commit 05768d000f
3 changed files with 5 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package com.intellij.xdebugger.evaluation;
import com.intellij.lang.Language;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.LanguageFileType;
import com.intellij.openapi.project.Project;
@@ -37,6 +38,8 @@ public abstract class XDebuggerEditorsProvider {
@NotNull EvaluationMode mode) {
return createDocument(project, expression.getExpression(), sourcePosition, mode);
}
public void afterEditorCreated(@Nullable Editor editor) {}
@NotNull
public Collection<Language> getSupportedLanguages(@NotNull Project project, @Nullable XSourcePosition sourcePosition) {

View File

@@ -333,7 +333,7 @@ public abstract class XDebuggerEditorBase implements Expandable {
}
}
protected static void foldNewLines(EditorEx editor) {
public static void foldNewLines(EditorEx editor) {
editor.getColorsScheme().setAttributes(EditorColors.FOLDED_TEXT_ATTRIBUTES, null);
editor.reinitSettings();
FoldingModelEx foldingModel = editor.getFoldingModel();

View File

@@ -130,6 +130,7 @@ public class XDebuggerExpressionComboBox extends XDebuggerEditorBase {
.inSmartMode(getProject())
.finishOnUiThread(ModalityState.any(), document -> {
myEditor.getEditorTextField().setNewDocumentAndFileType(getFileType(text), document);
getEditorsProvider().afterEditorCreated(getEditor());
})
.coalesceBy(this)
.submit(AppExecutorUtil.getAppExecutorService());