String (ProjectFileIndex fileIndex, Object selectedItem) { if (myInitialTargetDirectory != null && selectedItem instanceof DirectoryChooser.ItemWrapper && selectedItem != DirectoryChooser.ItemWrapper.NULL) { final PsiDirectory directory = ((DirectoryChooser.ItemWrapper)selectedItem).getDirectory(); final boolean isSelectionInTestSourceContent = fileIndex.isInTestSourceContent(directory.getVirtualFile()); final boolean inTestSourceContent = fileIndex.isInTestSourceContent(myInitialTargetDirectory.getVirtualFile()); if (isSelectionInTestSourceContent != inTestSourceContent) { if (inTestSourceContent && reportBaseInTestSelectionInSource()) { return JavaBundle.message("destination.combo.source.root.not.expected.conflict"); } if (isSelectionInTestSourceContent && reportBaseInSourceSelectionInTest()) { return JavaBundle.message("destination.combo.test.root.not.expected.conflict"); } } } return null; }