Skip to content
Snippets Groups Projects
Commit a182c6f7 authored by Konstantin Blaschke's avatar Konstantin Blaschke
Browse files

Merging first local review

Issue-Ref: 4310
Issue-Url: af3#4310


Signed-off-by: default avatarKonstantin Blaschke <blaschke@fortiss.org>
parent f57fedc8
No related branches found
No related tags found
1 merge request!210Setting up Metric extraction plugin for AF3 : Issue 4310
AF3QualityActivator.java 353c3d99f423997e4e99a896b3c095fd77d81431 YELLOW AF3QualityActivator.java 353c3d99f423997e4e99a896b3c095fd77d81431 YELLOW
GraphMetricsProvider.java 2d3fff61af2537bc5b10b3c210dc8e4b3ad49c1d YELLOW GraphMetricsProvider.java 2d3fff61af2537bc5b10b3c210dc8e4b3ad49c1d YELLOW
HierarchicElementProvider.java 3c114abd47ecc0d7da751c3f05c83fd49a30717b YELLOW HierarchicElementProvider.java 3c114abd47ecc0d7da751c3f05c83fd49a30717b YELLOW
IMetricProvider.java 5e3d0debc0f81ed4e6c7dbc0f8d0e55df1bfde39 YELLOW IMetricProvider.java 99fc8993b0e65b2f8757978eeb0481d912f5608c YELLOW
...@@ -310,12 +310,18 @@ public class GraphMetricsProvider { ...@@ -310,12 +310,18 @@ public class GraphMetricsProvider {
} }
} }
// Save metric // Save metric
MetricKey key = recursively ? MetricKey.BETWEENESS_CENTRALITY_RECURSIVELY saveMetric(scopeElement, manager, recursively, betweenness);
: MetricKey.BETWEENESS_CENTRALITY; }
for(IHierarchicElement child : scopeElement.getContainedElements()) { }
manager.getTreeNodeLookupTable().get(child).getStoredDoubles().put(key,
betweenness.get(child)); /** Saving the metrics for each contained element of an {@link IHierarchicElement}. */
} private static void saveMetric(IHierarchicElement scopeElement, MetricDataManager manager, boolean recursively,
Map<IHierarchicElement, Double> betweenness) {
MetricKey key = recursively ? MetricKey.BETWEENESS_CENTRALITY_RECURSIVELY
: MetricKey.BETWEENESS_CENTRALITY;
for(IHierarchicElement child : scopeElement.getContainedElements()) {
manager.getTreeNodeLookupTable().get(child).getStoredDoubles().put(key,
betweenness.get(child));
} }
} }
} }
...@@ -27,7 +27,6 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils; ...@@ -27,7 +27,6 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
/** /**
* {@link IMetricProvider} to collect various metrics from an {@link IHierarchicElement}. * {@link IMetricProvider} to collect various metrics from an {@link IHierarchicElement}.
* *
* @author blaschke
* @author groh * @author groh
*/ */
public class HierarchicElementProvider implements IMetricProvider<IHierarchicElement> { public class HierarchicElementProvider implements IMetricProvider<IHierarchicElement> {
......
...@@ -22,7 +22,6 @@ import org.fortiss.tooling.kernel.service.base.IEObjectAware; ...@@ -22,7 +22,6 @@ import org.fortiss.tooling.kernel.service.base.IEObjectAware;
/** /**
* Interface for all metric providers. * Interface for all metric providers.
* <P>
* They are called by {@link IModelQualityService} to collect metrics on model elements. * They are called by {@link IModelQualityService} to collect metrics on model elements.
* *
* @author blaschke * @author blaschke
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment