Skip to content

Commit

Permalink
adding the ability to ask to an entity all its tagged entities and sa…
Browse files Browse the repository at this point in the history
…me for a mooseGroup.

tests are missing
  • Loading branch information
anneetien committed Aug 23, 2024
1 parent 535b79e commit 767b564
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Famix-Tagging/MooseEntity.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,23 @@ MooseEntity >> allTagAssociations: aCollection [
self allTagAssociations value: aCollection
]

{ #category : #'*Famix-Tagging' }
MooseEntity >> allTaggedEntities [
| taggedEntities |

taggedEntities := OrderedCollection new.
self allTaggedEntitiesIn: taggedEntities .
^ taggedEntities .

]

{ #category : #'*Famix-Tagging' }
MooseEntity >> allTaggedEntitiesIn: anOrderedCollection [
self isTagged ifTrue: [ anOrderedCollection add: self ].
self children do: [ :c | c allTaggedEntitiesIn: anOrderedCollection ].
^anOrderedCollection
]

{ #category : #'*Famix-Tagging' }
MooseEntity >> allTags [
"all tags on me"
Expand Down
5 changes: 5 additions & 0 deletions src/Famix-Tagging/MooseGroup.extension.st
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
Extension { #name : #MooseGroup }

{ #category : #'*Famix-Tagging' }
MooseGroup >> allTaggedEntities [
self entities flatCollectAsSet: #allTaggedEntities.
]

{ #category : #'*Famix-Tagging' }
MooseGroup >> tagEntitiesWith: aTag [

Expand Down

0 comments on commit 767b564

Please sign in to comment.