if (!Qualifiers.isProject(resource, true)) {
return;
}
// Load previous profiles
Measure previousMeasure = getPreviousMeasure(resource, CoreMetrics.QUALITY_PROFILES);
if (previousMeasure == null || previousMeasure.getData() == null) {
// first analysis -> do not generate events
return;
}
Map<String, QProfile> previousProfiles = UsedQProfiles.fromJson(previousMeasure.getData()).profilesByKey();
// Load current profiles
Measure currentMeasure = context.getMeasure(CoreMetrics.QUALITY_PROFILES);
Map<String, QProfile> currentProfiles = UsedQProfiles.fromJson(currentMeasure.getData()).profilesByKey();
detectNewOrUpdatedProfiles(context, previousProfiles, currentProfiles);
detectNoMoreUsedProfiles(context, previousProfiles, currentProfiles);
}