Skip to content

Commit

Permalink
Merge pull request #870 from jecisc/shadowers
Browse files Browse the repository at this point in the history
Update relation of shadowing
  • Loading branch information
jecisc authored Jan 15, 2025
2 parents 818b1bc + 85405c7 commit 82a062c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/Famix-MetamodelGeneration/FamixGenerator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -1645,9 +1645,9 @@ FamixGenerator >> defineRelations [
((tParametricEntity property: #genericization)
comment: 'Generic entity relationship, i.e. the association to the generic entity of this type.').

((tShadowable property: #shadowingEntity)
comment: 'Entity shadowing me in my defining scope.')
-
((tShadowable property: #shadowingEntities)
comment: 'Entities shadowing me in my defining scope.')
-*
((tShadower property: #shadowedEntity)
comment: 'Entity that is been shadowed by myself in my defining scope.')
]
Expand Down
23 changes: 15 additions & 8 deletions src/Famix-Traits/FamixTShadowable.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ The opposite of a shadowable is a shadower.
### Other
| Relation | Origin | Opposite | Type | Comment |
|---|
| `shadowingEntity` | `FamixTShadowable` | `shadowedEntity` | `FamixTShadower` | Entity shadowing me in my defining scope.|
| `shadowingEntities` | `FamixTShadowable` | `shadowedEntity` | `FamixTShadower` | Entities shadowing me in my defining scope.|
"
Trait {
#name : #FamixTShadowable,
#instVars : [
'#shadowingEntity => FMOne type: #FamixTShadower opposite: #shadowedEntity'
'#shadowingEntities => FMMany type: #FamixTShadower opposite: #shadowedEntity'
],
#category : #'Famix-Traits-Traits'
}
Expand All @@ -52,6 +52,12 @@ FamixTShadowable classSide >> annotation [
^ self
]

{ #category : #adding }
FamixTShadowable >> addShadowingEntity: anObject [
<generated>
^ self shadowingEntities add: anObject
]

{ #category : #testing }
FamixTShadowable >> isShadowable [

Expand All @@ -66,17 +72,18 @@ FamixTShadowable >> isShadowed [
]

{ #category : #accessing }
FamixTShadowable >> shadowingEntity [
"Relation named: #shadowingEntity type: #FamixTShadower opposite: #shadowedEntity"
FamixTShadowable >> shadowingEntities [
"Relation named: #shadowingEntities type: #FamixTShadower opposite: #shadowedEntity"

<generated>
<FMComment: 'Entity shadowing me in my defining scope.'>
^ shadowingEntity
<FMComment: 'Entities shadowing me in my defining scope.'>
<derived>
^ shadowingEntities
]

{ #category : #accessing }
FamixTShadowable >> shadowingEntity: anObject [
FamixTShadowable >> shadowingEntities: anObject [

<generated>
shadowingEntity := anObject
shadowingEntities value: anObject
]
7 changes: 3 additions & 4 deletions src/Famix-Traits/FamixTShadower.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ The opposite of a shadower is a shadowable.
### Other
| Relation | Origin | Opposite | Type | Comment |
|---|
| `shadowedEntity` | `FamixTShadower` | `shadowingEntity` | `FamixTShadowable` | Entity that is been shadowed by myself in my defining scope.|
| `shadowedEntity` | `FamixTShadower` | `shadowingEntities` | `FamixTShadowable` | Entity that is been shadowed by myself in my defining scope.|
"
Trait {
#name : #FamixTShadower,
#instVars : [
'#shadowedEntity => FMOne type: #FamixTShadowable opposite: #shadowingEntity'
'#shadowedEntity => FMOne type: #FamixTShadowable opposite: #shadowingEntities'
],
#category : #'Famix-Traits-Traits'
}
Expand All @@ -54,11 +54,10 @@ FamixTShadower classSide >> annotation [

{ #category : #accessing }
FamixTShadower >> shadowedEntity [
"Relation named: #shadowedEntity type: #FamixTShadowable opposite: #shadowingEntity"
"Relation named: #shadowedEntity type: #FamixTShadowable opposite: #shadowingEntities"

<generated>
<FMComment: 'Entity that is been shadowed by myself in my defining scope.'>
<derived>
^ shadowedEntity
]

Expand Down

0 comments on commit 82a062c

Please sign in to comment.