TextRange (TextRange textRange, ASTNode nodeAfter, String whiteSpace) { if (myBaseModel instanceof FormattingModelEx) { return ((FormattingModelEx) myBaseModel).replaceWhiteSpace(textRange, nodeAfter, whiteSpace); } return myBaseModel.replaceWhiteSpace(textRange, whiteSpace); }