SnapshotAnalyzer snapshotAnalyzer = fGraphPanel.getGraphLoader().getSnapshotAnalyzer();
DependencyGraph graph = fGraphPanel.getGraph();
NodeMap map = graph.getRegisteredNodeMaps()[0];
Node[] nodes = graph.getNodeArray();
for (int i = 0; i < nodes.length; i++) {
AbstractFamixEntity entity = (AbstractFamixEntity) map.get(nodes[i]);
// check if entity is already processed
// entities ending with <clinit>() or <oinit>() must be ignored to
// get suitable visual data
Set<String> possibleMetrics = MetricStore.listMetricsFor(entity);
if (!metricIdentifier.equalsIgnoreCase(PolymetricViewControllerView.METRIC_UNIFORM)) {
if (possibleMetrics.contains(metricIdentifier)) {
CompositeKey<AbstractFamixEntity, String> key = new CompositeKey<AbstractFamixEntity, String>(entity, metricIdentifier);
if (!fFamixEntityMetricToValueMap.containsKey(key)
&& !(entity.getUniqueName().endsWith(AbstractFamixEntity.CLASS_INIT_METHOD)
|| entity.getUniqueName().endsWith(AbstractFamixEntity.OBJECT_INIT_METHOD))) {
Float value = 0f;
value = new Float(MetricStore.calculateMetricValue(entity, metricIdentifier, snapshotAnalyzer.getEvolizerSession()));
fFamixEntityMetricToValueMap.put(key, value);
if (fMaxMetricValues.get(metricIdentifier).get(entity.getClass()) < value) {
fMaxMetricValues.get(metricIdentifier).put(entity.getClass(), value);
}
}
}
}
}