File tree Expand file tree Collapse file tree
generator/org.svis.generator/src/org/svis/generator/famix Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,6 +185,19 @@ class Famix2Famix extends WorkflowComponentWithConfig {
185185 }
186186
187187 ]
188+ graph. execute(" MATCH p=()-[r:EXTENDS]->() RETURN r" ). forEach [ row |
189+ val rel = row. get(" r" ) as Relationship
190+ if (classes. containsKey(rel. startNode. id) && classes. containsKey(rel. endNode. id)) {
191+ val inheritance = famixFactory. createFAMIXInheritance
192+ val subclassRef = famixFactory. createIntegerReference
193+ val superclassRef = famixFactory. createIntegerReference
194+ subclassRef. ref = classes. get(rel. startNode. id)
195+ superclassRef. ref = classes. get(rel. endNode. id)
196+ inheritance. subclass = subclassRef
197+ inheritance. superclass = superclassRef
198+ famixDocument. elements + = inheritance
199+ }
200+ ]
188201 println(" finish" )
189202 tx. success
190203 } catch (Exception e) {
@@ -708,6 +721,8 @@ class Famix2Famix extends WorkflowComponentWithConfig {
708721 class. name = node. id. toString
709722 if (node. hasProperty(" name" )) {
710723 class. value = node. getProperty(" name" ) as String
724+ } else {
725+ class. value = " "
711726 }
712727 if (node. hasProperty(" fqn" )) {
713728 class. fqn = node. getProperty(" fqn" ) as String
Original file line number Diff line number Diff line change 33import org .neo4j .graphdb .RelationshipType ;
44
55public enum Rels implements RelationshipType {
6- CONTAINS , DECLARES
6+ CONTAINS , DECLARES , EXTENDS
77}
You can’t perform that action at this time.
0 commit comments