allow module libraries without any classes ( IDEA-23835 )

This commit is contained in:
anna
2010-04-30 16:40:08 +04:00
parent a757725530
commit b3edec3560
@@ -1032,13 +1032,9 @@ public class ClasspathPanel extends JPanel {
final Module contextModule = DataKeys.MODULE_CONTEXT.getData(DataManager.getInstance().getDataContext(myParent));
editor.addFileChooserContext(LangDataKeys.MODULE_CONTEXT, contextModule);
myIsOk = editor.openDialog(myParent, Collections.singletonList(library), true) != null;
if (myIsOk && library.getUrls(OrderRootType.CLASSES).length > 0) {
if (myIsOk) {
myChosenLibrary = library;
}
else {
myChosenLibrary = null;
libraryModifiableModel.removeLibrary(library);
}
}
public boolean isOK() {