boolean (TreePath @NotNull [] sources, @NotNull TreePath target) { DropTargetNode node = getLastUserObject(DropTargetNode.class, target); if (node != null && node.canDrop(sources)) return true; PsiElement[] sourceElements = getPsiElements(sources); PsiElement targetElement = getPsiElement(target); return sourceElements.length == 0 || targetElement != null && MoveHandler.canMove(sourceElements, targetElement); }