| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/saveactions/CodeFormatEditFactory.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/saveactions/CodeFormatEditFactory.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/saveactions/CodeFormatEditFactory.java
|
| index facfc4682f6f3c75dc2633283bb4dc8e2811bafc..26776c69a5a15cbd222d591e3993bd291f4e3822 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/saveactions/CodeFormatEditFactory.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/saveactions/CodeFormatEditFactory.java
|
| @@ -49,8 +49,7 @@ public class CodeFormatEditFactory {
|
| * @return an edit that removes all trailing whitespace
|
| * @throws CoreException if an error occurs in creating the edit
|
| */
|
| - public static MultiTextEdit removeTrailingWhitespace(IDocument document, int selectionStart,
|
| - int selectionEnd) throws CoreException {
|
| + public static MultiTextEdit removeTrailingWhitespace(IDocument document) throws CoreException {
|
|
|
| MultiTextEdit textEdit = new MultiTextEdit();
|
|
|
| @@ -80,13 +79,8 @@ public class CodeFormatEditFactory {
|
| lineStart,
|
| lineExclusiveEnd - 1,
|
| document);
|
| - j++;
|
| -
|
| - if (selectionStart != -1 && j == lineStart && selectionStart > lineStart
|
| - && selectionEnd <= lineExclusiveEnd) {
|
| - j = selectionStart;
|
| - }
|
|
|
| + j++;
|
| if (j < lineExclusiveEnd) {
|
| DeleteEdit edit = new DeleteEdit(j, lineExclusiveEnd - j);
|
| textEdit.addChild(edit);
|
|
|