Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anna Kozlova
2015-01-09 12:35:21 +01:00
3 changed files with 7 additions and 3 deletions
@@ -90,7 +90,7 @@ public class CopyHandler extends EditorActionHandler {
List<TextBlockTransferableData> transferableDatas = new ArrayList<TextBlockTransferableData>();
CopyPastePostProcessor<? extends TextBlockTransferableData>[] postProcessors = Extensions.getExtensions(CopyPastePostProcessor.EP_NAME);
for (CopyPastePostProcessor<? extends TextBlockTransferableData> processor : DumbService.getInstance(project).filterByDumbAwareness( Arrays.asList(postProcessors))) {
for (CopyPastePostProcessor<? extends TextBlockTransferableData> processor : DumbService.getInstance(project).filterByDumbAwareness(Arrays.asList(postProcessors))) {
transferableDatas.addAll(processor.collectTransferableData(file, editor, startOffsets, endOffsets));
}
@@ -19,6 +19,7 @@ package com.intellij.codeInsight.editorActions;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.RangeMarker;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Ref;
import com.intellij.psi.PsiFile;
@@ -29,6 +30,10 @@ import java.util.Collections;
import java.util.List;
/**
* An extension to collect and apply additional transferable data when performing copy-paste in editors.<p/>
*
* Can be {@link DumbAware}
*
* @author yole
*/
public abstract class CopyPastePostProcessor<T extends TextBlockTransferableData> {
@@ -18,7 +18,6 @@ package com.intellij.ui;
import com.intellij.openapi.application.Result;
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.command.undo.UndoConstants;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
@@ -58,7 +57,7 @@ public class StringComboboxEditor extends EditorComboBoxEditor {
if (usePlainMatcher) {
document.putUserData(USE_PLAIN_PREFIX_MATCHER, true);
}
document.putUserData(UndoConstants.DONT_RECORD_UNDO, true);
super.setItem(document);
}