mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+4
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -165,8 +165,6 @@ public final class TrailingSpacesStripper extends FileDocumentManagerAdapter {
|
||||
// when virtual space enabled, we can strip whitespace anywhere
|
||||
boolean isVirtualSpaceEnabled = activeEditor == null || activeEditor.getSettings().isVirtualSpace();
|
||||
|
||||
boolean markAsNeedsStrippingLater;
|
||||
|
||||
final List<Caret> carets = activeEditor == null ? Collections.<Caret>emptyList() : activeEditor.getCaretModel().getAllCarets();
|
||||
final List<VisualPosition> visualCarets = new ArrayList<VisualPosition>(carets.size());
|
||||
int[] caretOffsets = new int[carets.size()];
|
||||
@@ -176,8 +174,9 @@ public final class TrailingSpacesStripper extends FileDocumentManagerAdapter {
|
||||
caretOffsets[i] = caret.getOffset();
|
||||
}
|
||||
|
||||
markAsNeedsStrippingLater = ((DocumentImpl)document).stripTrailingSpaces(activeEditor == null ? null : activeEditor.getProject(),
|
||||
inChangedLinesOnly, isVirtualSpaceEnabled, caretOffsets);
|
||||
boolean markAsNeedsStrippingLater =
|
||||
((DocumentImpl)document).stripTrailingSpaces(activeEditor == null ? null : activeEditor.getProject(),
|
||||
inChangedLinesOnly, isVirtualSpaceEnabled, caretOffsets);
|
||||
|
||||
if (activeEditor != null && !ShutDownTracker.isShutdownHookRunning()) {
|
||||
activeEditor.getCaretModel().runBatchCaretOperation(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user