void (RunConfiguration runConfiguration, Object2IntMap<Template> templates) { if (runConfiguration instanceof RunConfigurationBase) { PluginInfo info = PluginInfoDetectorKt.getPluginInfo(runConfiguration.getClass()); if (!info.isSafeToReport()) return; Object state = ((RunConfigurationBase<?>)runConfiguration).getState(); if (state instanceof RunConfigurationOptions runConfigurationOptions) { List<StoredProperty<Object>> properties = runConfigurationOptions.__getProperties(); for (StoredProperty<Object> property : properties) { String name = property.getName(); if (name == null || name.equals("isAllowRunningInParallel") || name.equals("isNameGenerated")) continue; Object value = property.getValue(runConfigurationOptions); boolean featureUsed; if (value instanceof Boolean) { featureUsed = (Boolean)value; } else if (value instanceof String) { featureUsed = StringUtil.isNotEmpty((String)value); } else if (value instanceof Collection) { featureUsed = ((Collection<?>)value).size() > 0; } else if (value instanceof Map) { featureUsed = ((Map<?, ?>)value).size() > 0; } else { continue; } if (featureUsed) { List<EventPair<?>> pairs = new ArrayList<>(); pairs.add(ID_FIELD.with(runConfiguration.getType().getId())); pairs.add(EventFields.PluginInfo.with(info)); pairs.add(FEATURE_NAME_FIELD.with(name)); addOrIncrement(templates, new Template(FEATURE_USED_EVENT, pairs)); } } } } }