Library () { ProjectStructureElement element = myConfigurable.getSelectedElement(); return element instanceof LibraryProjectStructureElement ? ((LibraryProjectStructureElement)element).getLibrary() : null; }