diff --git a/src/Famix-MetamodelGeneration/FamixGenerator.class.st b/src/Famix-MetamodelGeneration/FamixGenerator.class.st index c068f930..9271a1de 100644 --- a/src/Famix-MetamodelGeneration/FamixGenerator.class.st +++ b/src/Famix-MetamodelGeneration/FamixGenerator.class.st @@ -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.') ] diff --git a/src/Famix-Traits/FamixTShadowable.trait.st b/src/Famix-Traits/FamixTShadowable.trait.st index 515801cc..37a471b8 100644 --- a/src/Famix-Traits/FamixTShadowable.trait.st +++ b/src/Famix-Traits/FamixTShadowable.trait.st @@ -30,7 +30,7 @@ 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.| @@ -38,7 +38,7 @@ The opposite of a shadowable is a shadower. Trait { #name : #FamixTShadowable, #instVars : [ - '#shadowingEntity => FMOne type: #FamixTShadower opposite: #shadowedEntity' + '#shadowingEntities => FMMany type: #FamixTShadower opposite: #shadowedEntity' ], #category : #'Famix-Traits-Traits' } @@ -52,6 +52,12 @@ FamixTShadowable classSide >> annotation [ ^ self ] +{ #category : #adding } +FamixTShadowable >> addShadowingEntity: anObject [ + + ^ self shadowingEntities add: anObject +] + { #category : #testing } FamixTShadowable >> isShadowable [ @@ -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" - - ^ shadowingEntity + + + ^ shadowingEntities ] { #category : #accessing } -FamixTShadowable >> shadowingEntity: anObject [ +FamixTShadowable >> shadowingEntities: anObject [ - shadowingEntity := anObject + shadowingEntities value: anObject ] diff --git a/src/Famix-Traits/FamixTShadower.trait.st b/src/Famix-Traits/FamixTShadower.trait.st index e10150a0..1c4c86fa 100644 --- a/src/Famix-Traits/FamixTShadower.trait.st +++ b/src/Famix-Traits/FamixTShadower.trait.st @@ -30,7 +30,7 @@ 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.| @@ -38,7 +38,7 @@ The opposite of a shadower is a shadowable. Trait { #name : #FamixTShadower, #instVars : [ - '#shadowedEntity => FMOne type: #FamixTShadowable opposite: #shadowingEntity' + '#shadowedEntity => FMOne type: #FamixTShadowable opposite: #shadowingEntities' ], #category : #'Famix-Traits-Traits' } @@ -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" - ^ shadowedEntity ]