String (PsiElement initialTargetElement, final PsiElement[] movedElements) { String name = getContainerPackageName(initialTargetElement); if (name == null) { if (movedElements != null) { name = getTargetPackageNameForMovedElement(movedElements[0]); } if (name == null) { final PsiDirectory commonDirectory = getCommonDirectory(movedElements); if (commonDirectory != null && JavaDirectoryService.getInstance().getPackage(commonDirectory) != null) { name = JavaDirectoryService.getInstance().getPackage(commonDirectory).getQualifiedName(); } } } if (name == null) { name = ""; } return name; }