/**
* Applies all AbstractPolymetricViewUpdaters updateRealizer() method to each NodeRealizer in the graph.
*/
private void updateNodeRealizers(List<AbstractPolymetricViewUpdater> polyViewUpdater) {
PolymetricViewDataContainer dataCollector = fGraphPanel.getPolymetricViewDataCollector();
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]);
for (AbstractPolymetricViewUpdater updater : polyViewUpdater) {
NodeRealizer realizer = graph.getRealizer(nodes[i]);
String metricIdentifier = updater.getMetricToRepresent();
// if(!metricIdentifier.equalsIgnoreCase(PolymetricViewControllerView.METRIC_UNIFORM)) {
if (dataCollector.containsEntry(entity, metricIdentifier)) {
float value = dataCollector.getValue(entity, metricIdentifier);
INormalizer normalizer = updater.getNormalizer();
float normalizedVal = normalizer.normalize(value, dataCollector.getMaxValue(metricIdentifier, entity.getClass()));
if (!(entity instanceof AbstractFamixVariable)) {
updater.updateNodeRealizer(realizer, normalizedVal);
}
} else {
// sLogger.error("No metric data found for metric: " + updater.getAttributeToRepresent());