-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(graph): add comment about cyclic dependency between classDec and…
… its supertype Signed-off-by: muhammed-abdulkadir <[email protected]>
- Loading branch information
muhammed-abdulkadir
committed
Nov 1, 2024
1 parent
fb0fd3e
commit 13442eb
Showing
3 changed files
with
82 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,6 +181,12 @@ class ConcertoGraphVisitor extends BaseVisitor { | |
|
||
if (classDeclaration.getSuperType()){ | ||
parameters.graph.addEdge(classDeclaration.getFullyQualifiedName(), classDeclaration.getSuperType()); | ||
|
||
// Adds a reverse edge to create a cyclic dependency between a class declaration and its supertype. | ||
if(!parameters.createDependencyGraph && classDeclaration.getSuperType() !== '[email protected]') { | ||
parameters.graph.addVertex(classDeclaration.getSuperType()); | ||
parameters.graph.addEdge(classDeclaration.getSuperType(), classDeclaration.getFullyQualifiedName()); | ||
} | ||
} | ||
super.visitClassDeclaration(classDeclaration, parameters); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters