List<OrderRoot> (@Nullable VirtualFile initialSelection) { final String name = getLibraryEditor().getName(); final FileChooserDescriptor chooserDescriptor = myDescriptor.createAttachFilesChooserDescriptor(name); if (myContextModule != null) { chooserDescriptor.putUserData(LangDataKeys.MODULE_CONTEXT, myContextModule); } final VirtualFile[] files = FileChooser.chooseFiles(chooserDescriptor, myPanel, myProject, initialSelection); if (files.length == 0) return Collections.emptyList(); return RootDetectionUtil.detectRoots(Arrays.asList(files), myPanel, myProject, myDescriptor); }