mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
typos
GitOrigin-RevId: 23f87918ee55e64f362f103e93753531ae69aeb9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8e5f2bbe64
commit
395e089ede
@@ -6,7 +6,10 @@ import com.intellij.ide.DataManager;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.editor.*;
|
||||
import com.intellij.openapi.editor.Caret;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.RawText;
|
||||
import com.intellij.openapi.editor.SelectionModel;
|
||||
import com.intellij.openapi.editor.actionSystem.EditorActionHandler;
|
||||
import com.intellij.openapi.editor.actions.CopyAction;
|
||||
import com.intellij.openapi.editor.actions.EditorActionUtil;
|
||||
@@ -67,12 +70,12 @@ public class CopyHandler extends EditorActionHandler {
|
||||
final int[] startOffsets = selectionModel.getBlockSelectionStarts();
|
||||
final int[] endOffsets = selectionModel.getBlockSelectionEnds();
|
||||
|
||||
final List<TextBlockTransferableData> transferableDatas = new ArrayList<>();
|
||||
final List<TextBlockTransferableData> transferableDataList = new ArrayList<>();
|
||||
|
||||
DumbService.getInstance(project).withAlternativeResolveEnabled(() -> {
|
||||
for (CopyPastePostProcessor<? extends TextBlockTransferableData> processor : CopyPastePostProcessor.EP_NAME.getExtensionList()) {
|
||||
try {
|
||||
transferableDatas.addAll(processor.collectTransferableData(file, editor, startOffsets, endOffsets));
|
||||
transferableDataList.addAll(processor.collectTransferableData(file, editor, startOffsets, endOffsets));
|
||||
}
|
||||
catch (IndexNotReadyException e) {
|
||||
LOG.debug(e);
|
||||
@@ -84,9 +87,9 @@ public class CopyHandler extends EditorActionHandler {
|
||||
});
|
||||
|
||||
String text = editor.getCaretModel().supportsMultipleCarets()
|
||||
? EditorCopyPasteHelperImpl.getSelectedTextForClipboard(editor, transferableDatas)
|
||||
? EditorCopyPasteHelperImpl.getSelectedTextForClipboard(editor, transferableDataList)
|
||||
: selectionModel.getSelectedText();
|
||||
String rawText = TextBlockTransferable.convertLineSeparators(text, "\n", transferableDatas);
|
||||
String rawText = TextBlockTransferable.convertLineSeparators(text, "\n", transferableDataList);
|
||||
String escapedText = null;
|
||||
for (CopyPastePreProcessor processor : CopyPastePreProcessor.EP_NAME.getExtensionList()) {
|
||||
try {
|
||||
@@ -100,7 +103,7 @@ public class CopyHandler extends EditorActionHandler {
|
||||
}
|
||||
}
|
||||
final Transferable transferable = new TextBlockTransferable(escapedText != null ? escapedText : rawText,
|
||||
transferableDatas,
|
||||
transferableDataList,
|
||||
escapedText != null ? new RawText(rawText) : null);
|
||||
CopyPasteManager.getInstance().setContents(transferable);
|
||||
if (editor instanceof EditorEx) {
|
||||
|
||||
@@ -478,7 +478,7 @@ public class PasteHandler extends EditorActionHandler implements EditorTextInser
|
||||
desiredSymbolsToRemove = -diff;
|
||||
}
|
||||
|
||||
Runnable deindentTask = () -> {
|
||||
Runnable unindentTask = () -> {
|
||||
for (int line = anchorLine + 1; line <= lastLine; line++) {
|
||||
int currentLineStart = document.getLineStartOffset(line);
|
||||
int currentLineIndentOffset = CharArrayUtil.shiftForward(chars, currentLineStart, " \t");
|
||||
@@ -488,7 +488,7 @@ public class PasteHandler extends EditorActionHandler implements EditorTextInser
|
||||
}
|
||||
}
|
||||
};
|
||||
DocumentUtil.executeInBulk(document, lastLine - anchorLine > LINE_LIMIT_FOR_BULK_CHANGE, deindentTask);
|
||||
DocumentUtil.executeInBulk(document, lastLine - anchorLine > LINE_LIMIT_FOR_BULK_CHANGE, unindentTask);
|
||||
}
|
||||
else {
|
||||
CharSequence toInsert = chars.subSequence(anchorLineStart, diff + startOffset);
|
||||
|
||||
Reference in New Issue
Block a user