Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,61 +5,3 @@ FamixAbstractCallGraphNode >> additionalProperties [

^ FamixCallGraphAdditionalProperties current at: self ifAbsent: [ nil ]
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString [

^ (FamixCallGraphAdditionalProperties current at: self) at: aString
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString ifAbsent: aBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dic | dic at: aString ifAbsent: aBlock ]
ifAbsent: aBlock
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString ifPresent: aBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dic | dic at: aString ifPresent: aBlock ]
ifAbsent: [ nil ]
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString ifPresent: aBlock ifAbsent: anotherBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dic |
dic
at: aString
ifPresent: aBlock
ifAbsent: anotherBlock ]
ifAbsent: anotherBlock
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString put: aValue [

^ (FamixCallGraphAdditionalProperties current at: self ifAbsentPut: [ Dictionary new ]) at: aString put: aValue
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> removeAdditionalPropertyNamed: aString [

^ (FamixCallGraphAdditionalProperties current at: self) removeKey: aString
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> removeAdditionalPropertyNamed: aString ifAbsent: aBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dict | dict removeKey: aString ifAbsent: aBlock ]
ifAbsent: aBlock
]
8 changes: 8 additions & 0 deletions src/Famix-CallGraphs-Properties/FamixCallGraph.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Extension { #name : 'FamixCallGraph' }

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraph >> allNodesWithAdditionalProperties [
"Return every nodes with additionnal properties"

^ self allNodes select: [ :each | each additionalProperties isNotNil ]
]
59 changes: 59 additions & 0 deletions src/Famix-CallGraphs-Properties/FamixCallGraphNode.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Extension { #name : 'FamixCallGraphNode' }

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString [

^ (FamixCallGraphAdditionalProperties current at: self) at: aString
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString ifAbsent: aBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dic | dic at: aString ifAbsent: aBlock ]
ifAbsent: aBlock
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString ifPresent: aBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dic | dic at: aString ifPresent: aBlock ]
ifAbsent: [ nil ]
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString ifPresent: aBlock ifAbsent: anotherBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dic |
dic
at: aString
ifPresent: aBlock
ifAbsent: anotherBlock ]
ifAbsent: anotherBlock
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> additionalPropertyNamed: aString put: aValue [

^ (FamixCallGraphAdditionalProperties current at: self ifAbsentPut: [ Dictionary new ]) at: aString put: aValue
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> removeAdditionalPropertyNamed: aString [

^ (FamixCallGraphAdditionalProperties current at: self) removeKey: aString
]

{ #category : '*Famix-CallGraphs-Properties' }
FamixCallGraphNode >> removeAdditionalPropertyNamed: aString ifAbsent: aBlock [

^ FamixCallGraphAdditionalProperties current
at: self
ifPresent: [ :dict | dict removeKey: aString ifAbsent: aBlock ]
ifAbsent: aBlock
]
Loading