diff --git a/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/.ratings b/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/.ratings index 060cb0ae422db6f2d11faade102b4ffa722b21fc..acf41227e3852d427479a08b12e20574560e2173 100644 --- a/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/.ratings +++ b/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/.ratings @@ -1,3 +1,3 @@ IModelQualityViewPart.java 708f8089645df12098ea67190805cce343045d2e GREEN -ModelQualityFXController.java 91a82ea532fda6ef6b6db0430cece98016add60f RED +ModelQualityFXController.java 0d87d4084efc965e813f3f36ccf9cb96bf2096cb YELLOW ModelQualityFXViewPart.java 9cfc7f60a86ea5b915c726b16712f8be7dec2c5f GREEN diff --git a/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/ModelQualityFXController.java b/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/ModelQualityFXController.java index 91a82ea532fda6ef6b6db0430cece98016add60f..0d87d4084efc965e813f3f36ccf9cb96bf2096cb 100644 --- a/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/ModelQualityFXController.java +++ b/org.fortiss.tooling.ext.quality.ui/src/org/fortiss/tooling/ext/quality/ui/view/fx/ModelQualityFXController.java @@ -328,9 +328,9 @@ public class ModelQualityFXController extends CompositeFXControllerBase<SplitPan private SpiderChartViewer buildSpiderChart() { // Calculate the intersection of the keys, i.e. a set of keys which have a non-null value in // all elements of the lastViewedElements list - // TODO (SB): Add check that lastViewedElements is non empty, and add a corresponding - // comment - // to the .get(0) statement + + // lastViewedElements is never empty due to the fact, that updateLastViewedElements() is + // always executed before in updateCharts(), which ensure that there is at least one element Set<MetricKey> keysIntersection = lastViewedElements.get(0).getValue(); for(var p : lastViewedElements) { keysIntersection.retainAll(p.getValue()); @@ -437,7 +437,7 @@ public class ModelQualityFXController extends CompositeFXControllerBase<SplitPan */ private void updateLastViewedElements(MetricTreeNode node) { - // Create set of keys which store values in the ndoe + // Create set of keys which store values in the node Set<MetricKey> keys = new HashSet<>(); keys.addAll(node.getDoubleMetrics().keySet()); keys.addAll(node.getIntegerMetrics().keySet());