public class CopyFilesOrDirectoriesHandler extends CopyHandlerDelegateBase
EP_NAME
Constructor and Description |
---|
CopyFilesOrDirectoriesHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCopy(PsiElement[] elements,
boolean fromUpdate) |
static boolean |
checkFileExist(PsiDirectory targetDirectory,
int[] choice,
PsiFile file,
java.lang.String name,
java.lang.String title) |
static void |
copyAsFiles(PsiElement[] elements,
PsiDirectory defaultTargetDirectory,
Project project) |
static PsiFile |
copyToDirectory(PsiFileSystemItem elementToCopy,
java.lang.String newName,
PsiDirectory targetDirectory) |
static PsiFile |
copyToDirectory(PsiFileSystemItem elementToCopy,
java.lang.String newName,
PsiDirectory targetDirectory,
int [] choice,
java.lang.String title) |
void |
doClone(PsiElement element) |
static void |
doCloneFile(PsiElement element) |
void |
doCopy(PsiElement[] elements,
PsiDirectory defaultTargetDirectory) |
java.lang.String |
getActionName(PsiElement[] elements) |
static PsiDirectory |
resolveDirectory(PsiDirectory defaultTargetDirectory) |
canCopy, forbidToClone
public boolean canCopy(PsiElement[] elements, boolean fromUpdate)
canCopy
in class CopyHandlerDelegateBase
public void doCopy(PsiElement[] elements, PsiDirectory defaultTargetDirectory)
public static void copyAsFiles(PsiElement[] elements, PsiDirectory defaultTargetDirectory, Project project)
public void doClone(PsiElement element)
public static void doCloneFile(PsiElement element)
public static PsiFile copyToDirectory(PsiFileSystemItem elementToCopy, java.lang.String newName, PsiDirectory targetDirectory) throws IncorrectOperationException, java.io.IOException
elementToCopy
- PsiFile or PsiDirectorynewName
- can be not null only if elements.length == 1IncorrectOperationException
java.io.IOException
public static PsiFile copyToDirectory(PsiFileSystemItem elementToCopy, java.lang.String newName, PsiDirectory targetDirectory, int [] choice, java.lang.String title) throws IncorrectOperationException, java.io.IOException
elementToCopy
- PsiFile or PsiDirectorynewName
- can be not null only if elements.length == 1choice
- a horrible way to pass/keep user preferenceIncorrectOperationException
java.io.IOException
public static boolean checkFileExist(PsiDirectory targetDirectory, int[] choice, PsiFile file, java.lang.String name, java.lang.String title)
public static PsiDirectory resolveDirectory(PsiDirectory defaultTargetDirectory)
public java.lang.String getActionName(PsiElement[] elements)