List<LibraryKind> (@NotNull Library library, @Nullable StructureConfigurableContext context) { final List<LibraryKind> result = new SmartList<>(); final LibraryKind kind = ((LibraryEx)library).getKind(); if (kind != null) { result.add(kind); } final VirtualFile[] files = getLibraryFiles(library, context); LibraryDetectionManager.getInstance().processProperties(Arrays.asList(files), new LibraryDetectionManager.LibraryPropertiesProcessor() { @Override public <P extends LibraryProperties> boolean processProperties(@NotNull LibraryKind kind, @NotNull P properties) { result.add(kind); return true; } }); return result; }