boolean (final PsiElement element, final Project project, final DataContext dataContext, final PsiReference reference, final Editor editor) { if ((element instanceof PsiFile && ((PsiFile)element).getVirtualFile() != null) || element instanceof PsiDirectory) { doMove(project, new PsiElement[]{element}, LangDataKeys.TARGET_PSI_ELEMENT.getData(dataContext), null); return true; } if (element instanceof PsiPlainText) { PsiFile file = element.getContainingFile(); if (file != null) { doMove(project, new PsiElement[]{file}, null, null); } return true; } return false; }