diff options
author | 2020-11-15 21:56:45 -0500 | |
---|---|---|
committer | 2020-11-15 21:56:45 -0500 | |
commit | 1cfc2e98ffbba1dc2a489ad415c81264b76d8c14 (patch) | |
tree | b342c3541a5728b775564d8a0f5c6e6d93784694 /Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend | |
parent | fix node type distance measure (diff) | |
download | VIATRA-Generator-Realistic-Generation-SURE.tar.gz VIATRA-Generator-Realistic-Generation-SURE.tar.zst VIATRA-Generator-Realistic-Generation-SURE.zip |
code for paperRealistic-Generation-SURE
Diffstat (limited to 'Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend')
-rw-r--r-- | Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend index 8fa29fe6..2baaa929 100644 --- a/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend +++ b/Metrics/Metrics-Calculation/ca.mcgill.ecse.dslreasoner.realistic.metrics.calculator/src/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculator/graph/EMFGraph.xtend | |||
@@ -13,10 +13,19 @@ class EMFGraph extends Graph{ | |||
13 | @Accessors(PUBLIC_GETTER) | 13 | @Accessors(PUBLIC_GETTER) |
14 | var EObject root; | 14 | var EObject root; |
15 | 15 | ||
16 | def void init (EObject root, List<Metric> metrics, String name, List<EReference> referenceTypes){ | 16 | def void init (EObject root, List<Metric> metrics, String name){ |
17 | val otherContents = root.eAllContents.toList(); | 17 | val otherContents = root.eAllContents.toList(); |
18 | val metaModel = root.eClass.EPackage; | ||
19 | val referenceTypes = new ArrayList<EReference>; | ||
18 | this.root = root; | 20 | this.root = root; |
19 | otherContents.add(root); | 21 | otherContents.add(root); |
22 | |||
23 | metaModel.eAllContents.forEach[ | ||
24 | if(it instanceof EReference){ | ||
25 | referenceTypes.add(it); | ||
26 | } | ||
27 | ] | ||
28 | |||
20 | init(otherContents, metrics, name, referenceTypes); | 29 | init(otherContents, metrics, name, referenceTypes); |
21 | } | 30 | } |
22 | 31 | ||