}
}
private IRegion[] changedRegions(IProgressMonitor monitor, IFileEditorInput editorInput, IDocument document)
throws CoreException {
SaveActionsPreferences preferences = preferencesProvider.get();
if (!preferences.shouldRemoveTrailingWhitespace()) {
return NO_CHANGE;
}
if (preferences.shouldRemoveTrailingWhitespaceInEditedLines()) {
return calculator.calculateChangedLineRegions(textFileBuffer(monitor, editorInput), document, monitor);
}
return new IRegion[] { new Region(0, document.getLength()) };
}