@Override
 public void paintSelection(
     Graphics g, Color c, boolean drawBorder, ParentSettings parentSettings) {
   List<? extends EditorCell> selectionCells = myCellLayout.getSelectionCells(this);
   if (selectionCells != null) {
     ParentSettings selection = isSelectionPaintedOnAncestor(parentSettings);
     for (EditorCell cell : selectionCells) {
       if (g.hitClip(cell.getX(), cell.getY(), cell.getWidth(), cell.getHeight())) {
         ((jetbrains.mps.nodeEditor.cells.EditorCell) cell).paintSelection(g, c, false, selection);
       }
     }
   } else {
     List<Rectangle> selection = myCellLayout.getSelectionBounds(this);
     g.setColor(c);
     for (Rectangle part : selection) {
       g.fillRect(part.x, part.y, part.width, part.height);
     }
   }
 }
  @Override
  public ParentSettings paintBackground(Graphics g, ParentSettings parentSettings) {
    if (!parentSettings.isSkipBackground()) {
      if (getCellBackgroundColor() != null) {
        g.setColor(getCellBackgroundColor());
        List<Rectangle> selection = myCellLayout.getSelectionBounds(this);
        for (Rectangle part : selection) {
          g.fillRect(part.x, part.y, part.width, part.height);
        }
      }
    }
    boolean hasMessages = false;

    List<EditorMessage> messages = getMessages(EditorMessage.class);
    for (EditorMessage message : messages) {
      if (message != null && message.isBackground()) {
        message.paint(g, getEditor(), this);
        hasMessages = true;
      }
    }
    return ParentSettings.createBackgroundlessSetting(hasMessages).combineWith(parentSettings);
  }
 @Override
 public TextBuilder renderText() {
   return myCellLayout.doLayoutText(this);
 }
 @Override
 public boolean canBePossiblyFolded() {
   return myCanBeFolded && myCellLayout.canBeFolded();
 }
 @Override
 protected void relayoutImpl() {
   myCellLayout.doLayout(this);
   myAscent = myCellLayout.getAscent(this);
   myDescent = myCellLayout.getDescent(this);
 }