-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1240 from moosetechnology/dsm-non-association-dep…
…endencies Dsm non association dependencies
- Loading branch information
Showing
8 changed files
with
159 additions
and
33 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Extension { #name : #FamixTClass } | ||
|
||
{ #category : #'*MooseIDE-Dependency' } | ||
FamixTClass >> addDeclaredTypesIn: dependencies [ | ||
FamixTClass >> addNonAssociationDependenciesTo: dependencies [ | ||
|
||
self children do: [ :c | c addDeclaredTypesIn: dependencies ]. | ||
self children do: [ :c | c addNonAssociationDependenciesTo: dependencies ]. | ||
|
||
] |
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 |
---|---|---|
@@ -1,8 +1,20 @@ | ||
Extension { #name : #FamixTMethod } | ||
|
||
{ #category : #'*MooseIDE-Dependency' } | ||
FamixTMethod >> addDeclaredTypesIn: dependencies [ | ||
FamixTMethod >> addNonAssociationDependenciesTo: dependencies [ | ||
|
||
self children do: [ :c | c addDeclaredTypesIn: dependencies ]. | ||
self declaredType ifNotNil: [ dependencies add: self declaredType ] | ||
self children do: [ :c | c addNonAssociationDependenciesTo: dependencies ]. | ||
|
||
declaredType ifNotNil: [ | ||
dependencies add: declaredType. | ||
|
||
( (declaredType usesFamixTrait: FamixTParametricEntity) and: | ||
[ declaredType genericization isNotNil ]) | ||
ifTrue: [ | ||
declaredType concreteParameters do: [ :param | | ||
param children ifNotEmpty: [ dependencies add: param ] | ||
] | ||
] | ||
|
||
] | ||
] |
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Extension { #name : #FamixTPackage } | ||
|
||
{ #category : #'*MooseIDE-Dependency' } | ||
FamixTPackage >> addDeclaredTypesIn: dependencies [ | ||
FamixTPackage >> addNonAssociationDependenciesTo: dependencies [ | ||
|
||
self children do: [ :c | c addDeclaredTypesIn: dependencies ]. | ||
self children do: [ :c | c addNonAssociationDependenciesTo: dependencies ]. | ||
] |
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 |
---|---|---|
@@ -1,7 +1,21 @@ | ||
Extension { #name : #FamixTTypedEntity } | ||
|
||
{ #category : #'*MooseIDE-Dependency' } | ||
FamixTTypedEntity >> addDeclaredTypesIn: dependencies [ | ||
FamixTTypedEntity >> addNonAssociationDependenciesTo: dependencies [ | ||
"if declaredType is a Concretization of a ParametricEntity, then must look at its concreteParameters | ||
if they are actual classes (not GenericParameterType), then add them as dependencies | ||
This is check through an heuristic: if they have some children, then it must be an actual class" | ||
|
||
self declaredType ifNotNil: [dependencies add: self declaredType] | ||
declaredType ifNotNil: [ | ||
dependencies add: declaredType. | ||
|
||
( (declaredType usesFamixTrait: FamixTParametricEntity) and: | ||
[ declaredType genericization isNotNil ]) | ||
ifTrue: [ | ||
declaredType concreteParameters do: [ :param | | ||
param children ifNotEmpty: [ dependencies add: param ] | ||
] | ||
] | ||
|
||
] | ||
] |
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
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