void () { ProductivityFeaturesRegistry registry = ProductivityFeaturesRegistry.getInstance(); if (registry == null) return; ActionsLocalSummary actionsSummary = ApplicationManager.getApplication().getService(ActionsLocalSummary.class); registry.getFeatureIds().stream() .map(id -> registry.getFeatureDescriptor(id)) .forEach(feature -> { List<ActionExtendedSummary> summary = ContainerUtil.mapNotNull(feature.getActionEvents(), action -> actionsSummary.getActionStatsById(action.getActionId())); int adjustedUsageCount = summary.stream().map(s -> s.usageCount).reduce(Integer::sum).orElse(0); long adjustedLastTimeUsed = summary.stream().map(s -> s.lastUsedTimestamp).max(Long::compare).orElse(0L); feature.adjustUsageInfo(adjustedUsageCount, adjustedLastTimeUsed); }); }