-
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.
chore(*): add definition of how we use includeDerivedTypes in JSDoc
- Loading branch information
muhammed-abdulkadir
committed
Nov 1, 2024
1 parent
13442eb
commit c8a185d
Showing
3 changed files
with
6 additions
and
2 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 |
---|---|---|
|
@@ -174,6 +174,8 @@ class ConcertoGraphVisitor extends BaseVisitor { | |
* Visitor design pattern | ||
* @param {ClassDeclaration} classDeclaration - the object being visited | ||
* @param {Object} parameters - the parameter | ||
* @property {boolean} parameters.includeDerivedTypes - If this option is enabled, edges will be created from super types to their derived types. | ||
* This guarantees that if type X exists in the model manager, all types that inherit from X will be represented in the graph. | ||
* @protected | ||
*/ | ||
visitClassDeclaration(classDeclaration, parameters) { | ||
|
@@ -183,7 +185,7 @@ class ConcertoGraphVisitor extends BaseVisitor { | |
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]') { | ||
if(parameters.includeDerivedTypes && classDeclaration.getSuperType() !== '[email protected]') { | ||
parameters.graph.addVertex(classDeclaration.getSuperType()); | ||
parameters.graph.addEdge(classDeclaration.getSuperType(), classDeclaration.getFullyQualifiedName()); | ||
} | ||
|
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