Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update relation of shadowing #870

Merged
merged 1 commit into from
Jan 15, 2025
Merged
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
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
Loading