[HOW TO] Trim right edges of a Document programmatically

I see that when saving a com.intellij.openapi.editor.Document, the right edges are being trimmed. Is there a way to call this functionality? My virtual files are not local file system files, and saving is not done on "focus-lost", but rather intentionally. I want to do this trimming business when "save" is pressed.

1 comment
Comment actions Permalink

the answer is DocumentEx.stripTrailingSpaces()


Please sign in to leave a comment.