removed WriteAction for IDEA-CR-33774

This commit is contained in:
Alexey Kudravtsev
2018-06-18 20:16:57 +03:00
parent dca7ec1e10
commit f68008237d
2 changed files with 5 additions and 6 deletions
@@ -16,11 +16,11 @@ import org.jetbrains.annotations.NotNull;
* The only mutating method is setText() which is extremely cheap.
*/
public class EditorTextFieldRendererDocument extends UserDataHolderBase implements DocumentEx {
RangeMarkerTree<RangeMarkerEx> myRangeMarkers = new RangeMarkerTree<RangeMarkerEx>(this) {
private final RangeMarkerTree<RangeMarkerEx> myRangeMarkers = new RangeMarkerTree<RangeMarkerEx>(this) {
};
char[] myChars = ArrayUtil.EMPTY_CHAR_ARRAY;
String myString = "";
LineSet myLineSet = LineSet.createLineSet(myString);
private char[] myChars = ArrayUtil.EMPTY_CHAR_ARRAY;
private String myString = "";
private LineSet myLineSet = LineSet.createLineSet(myString);
@Override
public void setModificationStamp(long modificationStamp) {
@@ -16,7 +16,6 @@
package com.intellij.ui;
import com.intellij.openapi.Disposable;
import com.intellij.openapi.application.WriteAction;
import com.intellij.openapi.editor.SelectionModel;
import com.intellij.openapi.editor.colors.EditorColors;
import com.intellij.openapi.editor.colors.EditorColorsScheme;
@@ -188,7 +187,7 @@ public abstract class EditorTextFieldCellRenderer implements TableCellRenderer,
void setTextToEditor(String text) {
myEditor.getMarkupModel().removeAllHighlighters();
WriteAction.run(() -> myEditor.getDocument().setText(text));
myEditor.getDocument().setText(text);
((EditorImpl)myEditor).resetSizes();
myEditor.getHighlighter().setText(text);
if (myTextAttributes != null) {