suggest to skip all/overwrite all for dirs (IDEA-88413)

This commit is contained in:
anna
2012-07-06 18:45:15 +02:00
parent 4eb5530581
commit 4a516f069f
2 changed files with 2 additions and 2 deletions
@@ -185,7 +185,7 @@ public class CopyFilesOrDirectoriesHandler extends CopyHandlerDelegateBase {
public void run() {
try {
PsiFile firstFile = null;
final int[] choice = elements.length > 1 ? new int[]{-1} : null;
final int[] choice = elements.length > 1 || elements[0] instanceof PsiDirectory ? new int[]{-1} : null;
for (PsiElement element : elements) {
PsiFile f = copyToDirectory((PsiFileSystemItem)element, newName, targetDirectory, choice);
if (firstFile == null) {
@@ -137,7 +137,7 @@ public class MoveFilesOrDirectoriesUtil {
PsiManager manager = PsiManager.getInstance(project);
try {
final int[] choice = elements.length > 1 ? new int[]{-1} : null;
final int[] choice = elements.length > 1 || elements[0] instanceof PsiDirectory ? new int[]{-1} : null;
final List<PsiElement> els = new ArrayList<PsiElement>();
for (int i = 0, newElementsLength = newElements.length; i < newElementsLength; i++) {
final PsiElement psiElement = newElements[i];